Documentation / scene / SphereCreationOptions
Interface: SphereCreationOptions
Defined in: libs/scene/src/shapes/sphere.ts:11
Creation options for sphere shape
Extends
Properties
needNormal?
optionalneedNormal?:boolean
Defined in: libs/scene/src/shapes/shape.ts:12
true if we need to calculate normals for the shape
Inherited from
ShapeCreationOptions.needNormal
needTangent?
optionalneedTangent?:boolean
Defined in: libs/scene/src/shapes/shape.ts:14
true if we need to calculate tangents for the shape
Inherited from
ShapeCreationOptions.needTangent
needUV?
optionalneedUV?:boolean
Defined in: libs/scene/src/shapes/shape.ts:16
true if we need to calculate texture coordinates for the shape
Inherited from
transform?
optionaltransform?:Matrix4x4
Defined in: libs/scene/src/shapes/shape.ts:18
Transform matrix for the shape
Inherited from
ShapeCreationOptions.transform
radius?
optionalradius?:number
Defined in: libs/scene/src/shapes/sphere.ts:13
Radius of the sphere, default 1
verticalDetail?
optionalverticalDetail?:number
Defined in: libs/scene/src/shapes/sphere.ts:15
The vertical detail level, default 20
horizonalDetail?
optionalhorizonalDetail?:number
Defined in: libs/scene/src/shapes/sphere.ts:17
The horizonal detail level, default 20
eyeCompatible?
optionaleyeCompatible?:boolean
Defined in: libs/scene/src/shapes/sphere.ts:31
Generate UVs and tangents for EyeMaterial.
When enabled, the sphere's polar axis follows Z and the front hemisphere uses a planar projection along +Z, with its centre at (0.5, 0.5). The rear hemisphere is unwrapped outside that front disc so it cannot produce a second iris at -Z. The tangent follows +U. The sphere topology is otherwise unchanged, so this option remains compatible with the analytical raycast and with existing sphere consumers. The material must still opt into the tangent frame with EyeMaterial.vertexTangent = true.
Default Value
false