Tidy up
This commit is contained in:
@@ -17,7 +17,7 @@ module.exports.runScad = async ({
|
|||||||
const { x: rx, y: ry, z: rz } = rotation
|
const { x: rx, y: ry, z: rz } = rotation
|
||||||
const { x: px, y: py, z: pz } = position
|
const { x: px, y: py, z: pz } = position
|
||||||
const cameraArg = `--camera=${px},${py},${pz},${rx},${ry},${rz},300`
|
const cameraArg = `--camera=${px},${py},${pz},${rx},${ry},${rz},300`
|
||||||
const command = `xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" openscad -o /tmp/${tempFile}/output.png ${cameraArg} --imgsize=${x},${y} /tmp/${tempFile}/main.scad`
|
const command = `xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" openscad -o /tmp/${tempFile}/output.png ${cameraArg} --imgsize=${x},${y} --colorscheme DeepOcean /tmp/${tempFile}/main.scad`
|
||||||
console.log('command', command)
|
console.log('command', command)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const IdeViewer = () => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
className={`opacity-0 opacity- absolute inset-0 transition-opacity duration-500 ${
|
className={`opacity-0 absolute inset-0 transition-opacity duration-500 ${
|
||||||
isDragging ? 'opacity-100' : 'hover:opacity-50'
|
isDragging ? 'opacity-100' : 'hover:opacity-50'
|
||||||
}`}
|
}`}
|
||||||
onMouseDown={() => setIsDragging(true)}
|
onMouseDown={() => setIsDragging(true)}
|
||||||
|
|||||||
@@ -4,11 +4,14 @@ import { cadPackages } from 'src/helpers/cadPackages'
|
|||||||
export const useIdeState = () => {
|
export const useIdeState = () => {
|
||||||
const initialState = {
|
const initialState = {
|
||||||
ideType: 'openScad',
|
ideType: 'openScad',
|
||||||
consoleMessages: [
|
consoleMessages: [{ type: 'message', message: 'Initialising OpenSCAD' }],
|
||||||
{ type: 'error', message: 'line 15 is being very naughty' },
|
code: `difference(){
|
||||||
{ type: 'message', message: '5 bodies produced' },
|
union(){
|
||||||
],
|
cube(60);
|
||||||
code: 'cube(60);sphere(25);',
|
sphere(25);
|
||||||
|
}
|
||||||
|
translate([30,30,30])cylinder(r=25,h=100);
|
||||||
|
}`,
|
||||||
objectData: {
|
objectData: {
|
||||||
type: 'stl',
|
type: 'stl',
|
||||||
data: 'some binary',
|
data: 'some binary',
|
||||||
|
|||||||
Reference in New Issue
Block a user