[name]

A class containing utility functions for data.

Methods

[method:Number toHalfFloat]( [param:Number val] )

val -- A single precision floating point value.

Returns a half precision floating point value from the given single precision floating point value.

[method:Number fromHalfFloat]( [param:Number val] )

val -- A half precision floating point value.

Returns a single precision floating point value from the given half precision floating point value.

[method:Uint32Array toRGB9E5]( [param:Number r], [param:Number g], [param:Number b], [param:Uint32Array target] )

r -- A float representing the R channel.
g -- A float representing the G channel.
b -- A float representing the B channel.
target -- An instance of `Uint32Array` with length `1`.

This method packs three floats into a single Uint32 value which is required for the `RGB9E5` texture format.

[method:Array fromRGB9E5]( [param:Uint32Array val], [param:Array target] )

val -- An instance of `Uint32Array` with length `1`.
target -- An array holding the three unpacked floats.

This method unpacks three floats from a single Uint32 value holding a `RGB9E5` texel.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]