0

import * as THREEObjLoader from 'three-obj-loader';

const objLoader = new THREEObjLoader(THREE);

objLoader is undefined.

Could someone let me know why the object instance is not created?

1 Answer 1

2

Please do not use the three-obj-loader package anymore. Instead you can import all examples JS files from the main repository (three). For OBJLoader, it looks like so:

import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.