Skip to content

Does not work with React (r3f) #10

@bravebox

Description

@bravebox

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions