How to use OBJLoader?
See original GitHub issueForgive me if this is a trivial question, but I am trying to load an OBJ from within the three-seed structure, in a similar way to how the standard examples use ObjectLoader
, but can’t quite figure out how to get it done.
I import what I assume is the correct loader:
import { Group, OBJLoader } from 'three';
But if I try
const loader = new OBJLoader();
Then I get the error:
TypeError: _threeObjLoader.OBJLoader is not a constructor
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
OBJLoader – three.js docs
Returns an Object3D. It contains the parsed meshes as Mesh and lines as LineSegments. All geometry is created as BufferGeometry. Default materials are...
Read more >OBJ Model Loader - Three.js Tutorials - sbcode.net
The 3D models used in this lesson can be easily created using Blender. If you don't want to use blender to create the...
Read more >Three.js Loading a .OBJ File
The .OBJ loader can be passed an object of name / material pairs. When it loads the .OBJ file, any material name it...
Read more >Trying to load an object with OBJLoader locally | Three.js
I am testing how three.js works with 3d objects in a web page with a .obj file, I am using OBJLoader to load...
Read more >Example of loading a Three JS object with OBJLoader as well ...
Still learning observable, JS and Three Js so might not have done it the best way. I want to put limitations on how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try this 😃
logs…
Wonderful, thank you!
(I had thought somehow that importing from a non-JS file would throw parsing errors, but it seems my understanding of Webpack might be a little deficient.)