processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.7k stars 3.33k forks source link

loadModel changed to accept STL files #2734

Closed jeremydouglass closed 5 years ago

jeremydouglass commented 6 years ago

Nature of issue?

Which platform were you using when you encountered this?

New feature details:

The STL file format (stereolithography files) are an old lowest-common-denominator ASCII-based format used in 3D modeling and 3D printing. It would be nice to support loading them through loadModel().

This would be analogous to the previously added feature of "Loading 3d Objects from OBJ" (#904) only for the simple STL file format instead.

In Processing(Java), STL support is implemented in the third-party toxiclibs library, the STLReader class, under the loadBinary method.

See a previous discussion of p5.js STL support on the forum here: https://forum.processing.org/two/discussion/18812/import-stl

stalgiag commented 5 years ago

Just putting a note here that the ThreeJS implementation of this loader is already fairly close to something that would work for us.

sanketsingh24 commented 5 years ago

@stalgiag Shall I work on this issue? I want to take this up.

stalgiag commented 5 years ago

Sounds good @sanketsingh24 !

sanketsingh24 commented 5 years ago

I have one doubt, what does uvs do here?

EDIT: I mean, not exactly there, but in general what are uvs for?

Spongman commented 5 years ago

uv usually refers to texture coordinates: https://en.wikipedia.org/wiki/Texel_(graphics), https://en.wikipedia.org/wiki/UV_mapping