import type { AnimationInterpolationEnum } from '../foundation/definitions/AnimationInterpolation'; import type { ISceneGraphEntity } from '../foundation/helpers/EntityHelper'; import type { IAnimatedValue } from '../foundation/math/IAnimatedValue'; import type { Second, VectorComponentN } from './CommonTypes'; /** * animation path name * type of animation.channel.target.path in glTF2 * See: https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#_animation_channels */ export type AnimationPathName = 'undefined' | 'translate' | 'quaternion' | 'scale' | 'weights' | 'visibility' | `material/${string}` | 'light_color' | 'light_intensity' | 'light_range' | 'light_spot_innerConeAngle' | 'light_spot_outerConeAngle' | 'camera_znear' | 'camera_zfar' | 'camera_fovy' | 'camera_xmag' | 'camera_ymag' | 'effekseer'; export type AnimationTrackName = string; export interface AnimationInfo { name: AnimationTrackName; minStartInputTime: Second; maxEndInputTime: Second; } /** * Similar to [Animation](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-animation) */ export type AnimationTrack = Map; export type AnimationSamplers = Map; /** * Similar to [Animation.Channel](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-animation-channel) */ export interface AnimationChannel { animatedValue: IAnimatedValue; target: AnimationChannelTarget; } /** * Similar to [Animation.Channel.Target](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-animation-channel-target) */ export interface AnimationChannelTarget { pathName: AnimationPathName; entity: ISceneGraphEntity; } /** * Similar to [Animation.Sampler](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-animation-sampler) */ export interface AnimationSampler { input: Float32Array; output: Float32Array; outputComponentN: VectorComponentN; interpolationMethod: AnimationInterpolationEnum; } export interface ChangeAnimationInfoEvent { infoMap: Map; } export type AnimationComponentEventType = symbol;