Skip to main content

Function: scatterOnMesh()

scatterOnMesh(source, options): SurfacePoint[]

Defined in: src/mobjects/three-d/scatter.ts:236

Scatter points uniformly by area on the surface of a mobject, a Three.js object, or a bare geometry. Positions are in world space (the mobject's current transform); normals are interpolated vertex normals.

Parameters​

source​

Object3D<Object3DEventMap> | BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap> | Mobject

options​

ScatterOnMeshOptions

Returns​

SurfacePoint[]

Post​

result.length <= options.count