Start adding ide colors, includes adding custom theme to openscad
Resolves #365
This commit is contained in:
@@ -42,6 +42,8 @@ RUN npm install
|
||||
RUN echo "OPENSCADPATH=/var/task/openscad" >>/etc/profile && \
|
||||
wget -P /var/task/openscad/ https://github.com/Irev-Dev/Round-Anything/archive/refs/tags/1.0.4.zip && \
|
||||
unzip /var/task/openscad/1.0.4
|
||||
# Add our own theming (based on DeepOcean with a different "background" and "opencsg-face-back")
|
||||
COPY openscad/cadhubtheme.json /usr/share/openscad/color-schemes/render/
|
||||
|
||||
COPY openscad/*.js /var/task/
|
||||
COPY common/*.js /var/common/
|
||||
|
||||
19
app/api/src/docker/openscad/cadhubtheme.json
Normal file
19
app/api/src/docker/openscad/cadhubtheme.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name" : "CadHub",
|
||||
"index" : 1600,
|
||||
"show-in-gui" : true,
|
||||
|
||||
"colors" : {
|
||||
"background" : "#1A1A1D",
|
||||
"axes-color" : "#c1c1c1",
|
||||
"opencsg-face-front" : "#eeeeee",
|
||||
"opencsg-face-back" : "#8732F2",
|
||||
"cgal-face-front" : "#eeeeee",
|
||||
"cgal-face-back" : "#0babc8",
|
||||
"cgal-face-2d" : "#9370db",
|
||||
"cgal-edge-front" : "#0000ff",
|
||||
"cgal-edge-back" : "#0000ff",
|
||||
"cgal-edge-2d" : "#ff00ff",
|
||||
"crosshair" : "#f0f0f0"
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ module.exports.runScad = async ({
|
||||
const { x: px, y: py, z: pz } = position
|
||||
const cameraArg = `--camera=${px},${py},${pz},${rx},${ry},${rz},${dist}`
|
||||
const fullPath = `/tmp/${tempFile}/output.png`
|
||||
const command = `xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" openscad -o ${fullPath} ${cameraArg} --imgsize=${x},${y} --colorscheme DeepOcean /tmp/${tempFile}/main.scad`
|
||||
const command = `xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" openscad -o ${fullPath} ${cameraArg} --imgsize=${x},${y} --colorscheme CadHub /tmp/${tempFile}/main.scad`
|
||||
console.log('command', command)
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user