-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Description
Describe the bug
TypeScript projects that import the typings from examples/jsm/modifiers/CurveModifier.d.ts, or TessellateModifier.d.ts fail to compile due to some type errors.
In CurveModifier.d.ts
Material is imported several times at the start resulting in duplicate identifiers:
import { Geometry, Material, Mesh } from '../../../build/three.module';
import {
DataTexture,
Curve,
Uniform,
Material,
InstancedMesh
} from '../../../src/Three';
I believe the solution to this is to remove that first import line, moving Geomery and Mesh into the import line below it.
This line looks to refer to the accompanying js file, and introduces a duplicate identifier:
import { Flow } from './CurveModifier';
I believe the solution is to remove the line.
The use of Curve in this file is missing a type argument. I'm not sure what Flow does so I'm not sure what value that argument should be, but perhaps it should be THREE.Vector3?
In TessellateModifier.d.ts
There are some initializers despite this being an ambient context:
maxEdgeLength: number = 0.1;
maxIterations: number = 6;
maxFaces: number = Infinity;
I believe these should not provide values.
Let me know if I've messed something up in my TypeScript settings though 😂 . I can probably provide a PR with these fixes if it's helpful!