Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.
/ elm-obj-loader Public archive

An elm library for importing wavefront .obj files into your WebGL application.

License

Notifications You must be signed in to change notification settings

declension/elm-obj-loader

Repository files navigation

⚠️ This repo is now deprecated, in favour of the excellent elm-obj-file which works well with Elm 3D Scene


elm-obj-loader

Node.js CI

This is an Elm library for importing simple Wavefront .obj files into your WebGL application.

It is currently Elm 0.19, though the previous incarnation works for 0.18.

Examples

See the demo source.

Usage

  • Export / convert your model from Blender or other 3D content creation tool as an .obj file.
  • The default export options from Blender work fine.
  • Make sure you keep Write Normals selected.

Limitations

Completely supported face types are those with vertex position, normals and optionally vertex texture coordinates. (v, vn, vt) Only a small subset of the specification is supported though - specifically:

  • Your model needs vertex normals (vn).
  • Smooth groups are ignored (s n).
  • Only tris and quads are supported. (Tris might load slightly faster)
  • No free-form curves / surfaces.
  • No material library (mtllib) support.
  • No negative indexing.