Skip to content

Function: orderTranslucent() ​

ts
function orderTranslucent(objects, camera, base?, step?): number;

Experimental

Give the translucent meshes among objects (searched recursively) render orders base, base + step, … from the farthest to the nearest (view depth of their world bounding box center), for scenes where three.js' own depth sort doesn't apply. Returns the next free order.

Parameters ​

ParameterTypeDefault value
objectsreadonly Object3D<Object3DEventMap>[]undefined
cameraCameraundefined
basenumber0
stepnumber1e-3

Returns ​

number

Released under the MIT License.