Function: encodePickId()
Call Signature
ts
function encodePickId(id): Float32Array;Experimental
Encode a pick id as normalized RGBA floats (0–1), e.g. for a custom pick material's color uniform. Output order is R, G, B, A with R the most significant byte of id + 1.
Parameters
| Parameter | Type |
|---|---|
id | number |
Returns
Float32Array
Throws
RangeError if id is not an integer in [0, MAX_PICK_ID].
Call Signature
ts
function encodePickId<T>(id, out, offset?): T;Experimental
Encode a pick id as normalized RGBA floats (0–1), e.g. for a custom pick material's color uniform. Output order is R, G, B, A with R the most significant byte of id + 1.
Type Parameters
| Type Parameter |
|---|
T extends number[] | Float32Array<ArrayBufferLike> |
Parameters
| Parameter | Type |
|---|---|
id | number |
out | T |
offset? | number |
Returns
T
Throws
RangeError if id is not an integer in [0, MAX_PICK_ID].