UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

35 lines (33 loc) 639 B
class AnimationKey { constructor(time, position, rotation, scale){ this.time = time; this.position = position; this.rotation = rotation; this.scale = scale; } } class AnimationNode { constructor(){ this._name = ''; this._keys = []; } } class Animation { getNode(name) { return this._nodeDict[name]; } addNode(node) { this._nodes.push(node); this._nodeDict[node._name] = node; } get nodes() { return this._nodes; } constructor(){ this.name = ''; this.duration = 0; this._nodes = []; this._nodeDict = {}; } } export { Animation, AnimationKey, AnimationNode };