mapComponent Method

Pass the (x,y,z) of each point to a function which returns a replacement for one of the 3 components.

mapComponent(componentIndex: "0" | "1" | "2", func: (x: number, y: number, z: number) => number): void

Parameter Type Description
componentIndex "0" | "1" | "2" Index (0,1,2) of component to be replaced.
func (x: number, y: number, z: number) => number function to be called as func(x,y,z), returning a replacement value for componentIndex

Returns - void

Defined in

Last Updated: 14 November, 2024