eulerjs API / @eulerjs/scene / primitiveShape
primitiveShape()
function primitiveShape(geometry, scale):
| ColliderShorthand
| undefined;Defined in: packages/scene/src/shapes.ts:38
The primitive collider a geometry is, from three.js's own geometries: a box for BoxGeometry, its hull for RoundedBoxGeometry (convex, and rounder than a box), a sphere for SphereGeometry and IcosahedronGeometry, a cylinder, a cone or a capsule for theirs. Only while the geometry is still the shape its parameters say, centred on its origin and standing along y, as three.js made it: one translated, turned or cut since (a half sphere, a slice of a cylinder) isn't, nor is a round one with too few sides to be round (see ROUNDNESS), and neither is one that scale stretches out of round. Undefined for those and for any other geometry.
Parameters
| Parameter | Type |
|---|---|
geometry | BufferGeometry |
scale | Vector3 |
Returns
| ColliderShorthand | undefined
