import * as THREE from 'three' ; param value export function saturate ( value ) { return Math . max ( Math . min ( value , 1.0 ) , 0.0 ) ; } param x param min param max export function linstep ( x , min , max ) { if ( x <= min ) return 0 ; if ( x >= max ) return 1 ; return ( x - min ) / ( max - min ) ; } const _position = new THREE . Vector3 ( ) ; const _scale = new THREE . Vector3 ( ) ; const _rotation = new THREE . Quaternion ( ) ; param object param out export function getWorldPositionLite ( object , out ) { object . matrixWorld . decompose ( out , _rotation , _scale ) ; return out ; } param object param out export function getWorldScaleLite ( object , out ) { object . matrixWorld . decompose ( _position , _rotation , out ) ; return out ; } param object param out export function getWorldQuaternionLite ( object , out ) { object . matrixWorld . decompose ( _position , out , _scale ) ; return out ; }