-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizing JSCadFixture #25
Comments
I like the idea of exposing props for basic customization, but I would recommend we create a component called |
So the basic idea of the implementation is this, @r-bt lmk if you're interested in implementing otherwise I can probably implement ~tomorrow import { createRoot } from "../somewhere-in-jscad-fiber"
export const JscadThreeMesh = ({ children }) => {
const threeMesh = useMemo(() => {
const jscadElms = []
createRoot(children, jscadElms)
const mesh = convertCsgToThree(jscadElms)
}, [])
return <primitive mesh={mesh} />
} Usage would be like: <Scene>
<Light {/* ... */} />
<JscadThreeMesh>
<Cube size={1} />
</JscadThreeMesh>
</Scene> |
Awesome, I can give it a shot |
I'd like to be able to custom JSCadFixture. Specifically the size, background colour, and positioning of the ThreeJS camera.
I was wondering are there any thoughts about the best way to do this. My initial ideas are either:
Other thoughts?
The text was updated successfully, but these errors were encountered: