Open ianmackenzie opened 5 years ago
Models can also come with animations. Probably good to have in mind when deciding where to put an eventual “setAnimationFrame” function 😁
@schoening what kind of setAnimationFrame
function were you thinking of?
@ianmackenzie a quick and dirty example from babylonjs, here you see I am setting the frame manually:
Ah gotcha - I thought you were referring to the browser's animation frame, e.g. https://package.elm-lang.org/packages/elm/browser/latest/Browser-Events#onAnimationFrame.
Hi! What's the current best way / workaround to try loading STLs with elm-3d-scene
?
Currently I think the two options are:
I realize those are both kind of non-answers - once elm-3d-scene
1.0 is out I'll hopefully have time to start looking at implementing some proper import packages.
Hi! What's the current best way / workaround to try loading STLs with elm-3d-scene?
I am not sure if my experience is useful but I do it that way:
parse stl to jscad: https://www.npmjs.com/package/@jscad/stl-deserializer
that will return CSG object
which will have polygons
attribute
that could be sent to an Elm app from ports and can be rendered there using elm-3d-scene.
Hope that helps.
This is a bit of a placeholder issue since my current thinking is that support for different file formats should live in their own packages, so (e.g.) a COLLADA package can be focused on parsing COLLADA files into nice Elm data types and
elm-3d-scene
can remain focused on rendering. That said, one way or another there should definitely be an easy way to load models intoelm-3d-scene
. Potential file formats to support include:Please add a comment if there's a particular file format you'd like to see supported!