import { vec3 } from 'gl-matrix' ; import MdlxGeosetAnimation from '../../../parsers/mdlx/geosetanimation' ; import AnimatedObject from './animatedobject' ; import MdxModel from './model' ; /**
 * A geoset animation.
 */ export default class GeosetAnimation extends AnimatedObject { alpha : number ; color : vec3 ; geosetId : number ; constructor ( model , geosetAnimation ) { super ( model , geosetAnimation ) ; const color = geosetAnimation . color ; this . alpha = geosetAnimation . alpha ; this . color = vec3 . fromValues ( color [ 2 ] , color [ 1 ] , color [ 0 ] ) ; this . geosetId = geosetAnimation . geosetId ; this . addVariants ( 'KGAO' , 'alpha' ) ; this . addVariants ( 'KGAC' , 'color' ) ; } getAlpha ( out , sequence , frame , counter ) { return this . getScalarValue ( out , 'KGAO' , sequence , frame , counter , this . alpha ) ; } getColor ( out , sequence , frame , counter ) { return this . getVectorValue ( out , 'KGAC' , sequence , frame , counter , < Float32Array > this . color ) ; } }