import Vector3 from './Vector3' ; import { IVector3 , IVector4 } from './IVector' ; import { IColorRgb } from './IColor' ; import { TypedArray } from '../../types/CommonTypes' ; export default class ColorRgb extends Vector3 implements IVector3 , IColorRgb { constructor ( r ) { super ( r ) ; } get x ( ) { return this . _v [ 0 ] ; } get y ( ) { return this . _v [ 1 ] ; } get z ( ) { return this . _v [ 2 ] ; } get w ( ) { return 1 ; } get r ( ) { return this . _v [ 0 ] ; } get g ( ) { return this . _v [ 1 ] ; } get b ( ) { return this . _v [ 2 ] ; } get a ( ) { return 1 ; } static zero ( ) { return super . _zero ( Float32Array ) as ColorRgb ; } static one ( ) { return super . _one ( Float32Array ) as ColorRgb ; } static dummy ( ) { return super . _dummy ( Float32Array ) as ColorRgb ; } static normalize ( vec ) { return super . _normalize ( vec , Float32Array ) as ColorRgb ; } static add ( l_vec , r_vec ) { return super . _add ( l_vec , r_vec , Float32Array ) as ColorRgb ; } static subtract ( l_vec , r_vec ) { return super . _subtract ( l_vec , r_vec , Float32Array ) as ColorRgb ; } static multiply ( vec , value ) { return super . _multiply ( vec , value , Float32Array ) as ColorRgb ; } static multiplyVector ( l_vec , r_vec ) { return super . _multiplyVector ( l_vec , r_vec , Float32Array ) as ColorRgb ; } static divide ( vec , value ) { return super . _divide ( vec , value , Float32Array ) as ColorRgb ; } static divideVector ( l_vec , r_vec ) { return super . _divideVector ( l_vec , r_vec , Float32Array ) as ColorRgb ; } static cross ( l_vec , r_vec ) { return super . _cross ( l_vec , r_vec , Float32Array ) as ColorRgb ; } clone ( ) { return super . clone ( ) as ColorRgb ; } }