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: px, y: py, z: pz } = position
|
||||
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)
|
||||
|
||||
try {
|
||||
|
||||
@@ -116,7 +116,7 @@ const IdeViewer = () => {
|
||||
</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'
|
||||
}`}
|
||||
onMouseDown={() => setIsDragging(true)}
|
||||
|
||||
@@ -4,11 +4,14 @@ import { cadPackages } from 'src/helpers/cadPackages'
|
||||
export const useIdeState = () => {
|
||||
const initialState = {
|
||||
ideType: 'openScad',
|
||||
consoleMessages: [
|
||||
{ type: 'error', message: 'line 15 is being very naughty' },
|
||||
{ type: 'message', message: '5 bodies produced' },
|
||||
],
|
||||
code: 'cube(60);sphere(25);',
|
||||
consoleMessages: [{ type: 'message', message: 'Initialising OpenSCAD' }],
|
||||
code: `difference(){
|
||||
union(){
|
||||
cube(60);
|
||||
sphere(25);
|
||||
}
|
||||
translate([30,30,30])cylinder(r=25,h=100);
|
||||
}`,
|
||||
objectData: {
|
||||
type: 'stl',
|
||||
data: 'some binary',
|
||||
|
||||
Reference in New Issue
Block a user