Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with React (r3f) #10

Open
bravebox opened this issue Jan 21, 2023 · 0 comments
Open

Does not work with React (r3f) #10

bravebox opened this issue Jan 21, 2023 · 0 comments

Comments

@bravebox
Copy link

It has an error when init in react (code is inside a useEffect)

const pointsArr = [new THREE.Vector3(0, 0, 0), new THREE.Vector3(2, 2, 2)];
const pathBuilder = new PathBuilder();
const pathPointList = new pathBuilder.PathPointList();
pathPointList.set(pointsArr, 1, 5, false);

// Throws error
const geometry = new pathBuilder.PathTubeGeometry();
react-reconciler.development.js:14370 Uncaught TypeError: Class constructor BufferGeometry cannot be invoked without 'new'
at PathTubeGeometry.PathGeometry [as constructor] (three-path-builder.js:432:20)
at new PathTubeGeometry (three-path-builder.js:626:18)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant