Align orientation of model-viewer w/ OpenSCAD
This commit is contained in:
parent
950dc7ec98
commit
ba79a7cd87
2 changed files with 17 additions and 17 deletions
|
|
@ -32,6 +32,7 @@ export default function ViewerPanel({className, style}: {className?: string, sty
|
|||
}}>
|
||||
{(state.output?.displayFileURL || state.output?.outFile && state.output.outFile.name.endsWith('.glb') && state.output?.outFileURL) && (
|
||||
<model-viewer
|
||||
orientation="0deg -90deg 0deg"
|
||||
src={state.output?.displayFileURL ?? state.output?.outFileURL ?? ''}
|
||||
style={{
|
||||
width: '100%',
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ export default `/*
|
|||
title = "OpenSCAD";
|
||||
|
||||
color("gray")
|
||||
translate([0, debug ? -60 : -20, 0])
|
||||
linear_extrude(1)
|
||||
text(title,
|
||||
halign="center",
|
||||
valign="center");
|
||||
rotate([90, 0, 0])
|
||||
translate([0, debug ? -60 : -20, 0])
|
||||
linear_extrude(1)
|
||||
text(title,
|
||||
halign="center",
|
||||
valign="center");
|
||||
|
||||
// You can find the original for the following example in the file explorer above,
|
||||
// under openscad / examples / Basic / CSG-modules.scad
|
||||
|
|
@ -38,20 +39,18 @@ debug = true;
|
|||
$fs=$preview ? 1 : 0.1; // Don't generate smaller facets than 0.1 mm
|
||||
$fa=$preview ? 15 : 5; // Don't generate larger angles than 5 degrees
|
||||
|
||||
rotate([-90, 0, 0]) {
|
||||
// Main geometry
|
||||
difference() {
|
||||
intersection() {
|
||||
body();
|
||||
intersector();
|
||||
}
|
||||
holes();
|
||||
}
|
||||
|
||||
// Helpers
|
||||
if (debug) helpers();
|
||||
// Main geometry
|
||||
difference() {
|
||||
intersection() {
|
||||
body();
|
||||
intersector();
|
||||
}
|
||||
holes();
|
||||
}
|
||||
|
||||
// Helpers
|
||||
if (debug) helpers();
|
||||
|
||||
// Core geometric primitives.
|
||||
// These can be modified to create variations of the final object
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue