AMF finds its way into three.js

130 views
Skip to first unread message

esn...@tamarintech.com

unread,
Sep 22, 2015, 11:23:27 AM9/22/15
to STL 2.0
AMF has found its way into three.js. If you aren't familiar with three.js it is a very mature javascript library that enables developers to uniformly and easily leverage WebGL in a browser. Sites like Thingiverse, Github, YouMagine, etc all use a three.js as parts of their widgets used to render and display models for users as part of their UIs.

three.js includes a number of example loaders to help users import models from basic STLs to Collada format assets. AMF was missing. Now it isn't. :)

You can see some of the discussion at https://github.com/mrdoob/three.js/issues/7198 which is referenced in a pull request to include AMF support in the dev branch of three.js where it will eventually be included as part of the official three.js release.

three.js generally includes a model as part of an example loader. If anyone has a specific model they'd like to see in the three.js examples of the AMFLoader please let me know! My current plan is to use the three.js pyramid from the tutorial.

Jonathan Hiller

unread,
Sep 22, 2015, 5:08:29 PM9/22/15
to st...@googlegroups.com
Awesome! Thanks Elijah. Support for viewing within Threejs is a great asset for the AMF community.

You could use the rook model (as featured in the official AMF icon) if you wanted something unique (http://amf.wikispaces.com/file/view/Rook.amf/268219202/Rook.amf). But ultimately you did the work so you can choose!

  ~Jon


--
You received this message because you are subscribed to the Google Groups "STL 2.0" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stl2+uns...@googlegroups.com.
To post to this group, send email to st...@googlegroups.com.
Visit this group at http://groups.google.com/group/stl2.
For more options, visit https://groups.google.com/d/optout.

Reinoud Zandijk

unread,
Sep 23, 2015, 6:23:16 AM9/23/15
to st...@googlegroups.com
Hi Folks, hi Jonathan,

On Tue, Sep 22, 2015 at 03:08:27PM -0600, Jonathan Hiller wrote:
> Awesome! Thanks Elijah. Support for viewing within Threejs is a great asset
> for the AMF community.
>
> You could use the rook model (as featured in the official AMF icon) if you
> wanted something unique (
> http://amf.wikispaces.com/file/view/Rook.amf/268219202/Rook.amf). But
> ultimately you did the work so you can choose!

Good that its now supported in three.js though I haven't used three.js yet to
work on things. I normally stick to my own lightning fast AMF viewer :) ...
It was build to become a full blown slicer kit one day but oh well, maybe
later :) It doesn't support textures and colour gradients yet :(

Talking of viewing, the last version of AMF tools is not displaying any
rounded triangles anymore when asked to; even the ball is a regular figure
instead of a ball. Has that been explicitly disabled?

The files themselves are OK as far as I can see though I got dependency errors
when opening the more complex ones. The face worked but the others fail.

Cheers,
Reinoud

esn...@tamarintech.com

unread,
Sep 23, 2015, 7:15:20 PM9/23/15
to STL 2.0
I went with the rook. :)

Jonathan Hiller

unread,
Sep 23, 2015, 9:10:00 PM9/23/15
to st...@googlegroups.com
Hi Reinoud,

The curved triangles were not explicitly disabled. Looks like they got lost in the 0.9.7 to 0.9.7.1 release. For now the best bet is to just use 0.9.7.

  ~Jon

Reply all
Reply to author
Forward
0 new messages