Closed bjornstar closed 3 years ago
could you make it a named triplet? [number: x, number: y, number: z] ? then we get better IDE context
could you make it a named triplet? [number: x, number: y, number: z] ? then we get better IDE context
Sure, already done.
Also added names for some of the args:
type CylinderArgs = [radiusTop: number, radiusBottom: number, height: number, numSegments: number]
type TrimeshArgs = [vertices: (THREE.Vector3 | Triplet)[], indices: Triplet[]]
type HeightfieldArgs = [
data: number[],
options: { minValue?: number; maxValue?: number; elementSize?: number },
]
type ConvexPolyhedronArgs = [
vertices: (THREE.Vector3 | Triplet)[],
faces: number[],
normals: (THREE.Vector3 | Triplet)[],
]
nice, could you add it to the docs and then lets merge
nice, could you add it to the docs and then lets merge
README has been updated. I tested it out on racing-game, it's nice to have types for the args :)
Triplet
interface to use instead ofnumber[]
for improved type accuracyargs
propertyargs
property is now required for two components:ConvexPolyhedron
&Trimesh
I can update the docs if you're happy with the changes.