@babylonjs/core 6.32.0 → 6.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeAnimation.js","sourceRoot":"","sources":["../../../../dev/core/src/Animations/runtimeAnimation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EACH,SAAS,EACT,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,aAAa,CAAC;AAMrB;;GAEG;AACH,MAAM,OAAO,gBAAgB;IA2GzB;;OAEG;IACH,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;IAC/C,CAAC;IAKD;;;;;;OAMG;IACH,YAAmB,MAAW,EAAE,SAAoB,EAAE,KAAY,EAAE,IAAgB;QA9J5E,YAAO,GAAG,IAAI,KAAK,EAAkB,CAAC;QAE9C;;WAEG;QACK,kBAAa,GAAW,CAAC,CAAC;QAiBlC;;WAEG;QACK,mBAAc,GAAG,IAAI,KAAK,EAAO,CAAC;QAE1C;;WAEG;QACK,wBAAmB,GAAkB,IAAI,CAAC;QAElD;;WAEG;Q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CAAC;yBACX;wBACD,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;wBACpB,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;qBAC9B,CAAC,wDAAwD;iBAC7D;aACJ;SACJ;QAED,IAAI,CAAC,WAAW,EAAE;YACd,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACxB;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport { Matrix } from \"../Maths/math.vector\";\r\nimport type { _IAnimationState } from \"./animation\";\r\nimport {\r\n Animation,\r\n _staticOffsetValueColor3,\r\n _staticOffsetValueColor4,\r\n _staticOffsetValueQuaternion,\r\n _staticOffsetValueSize,\r\n _staticOffsetValueVector2,\r\n _staticOffsetValueVector3,\r\n} from \"./animation\";\r\nimport type { AnimationEvent } from \"./animationEvent\";\r\nimport type { Animatable } from \"./animatable\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { IAnimationKey } from \"./animationKey\";\r\n\r\n/**\r\n * Defines a runtime animation\r\n */\r\nexport class RuntimeAnimation {\r\n private _events = new Array<AnimationEvent>();\r\n\r\n /**\r\n * The current frame of the runtime animation\r\n */\r\n private _currentFrame: number = 0;\r\n\r\n /**\r\n * The animation used by the runtime animation\r\n */\r\n private _animation: Animation;\r\n\r\n /**\r\n * The target of the runtime animation\r\n */\r\n private _target: any;\r\n\r\n /**\r\n * The initiating animatable\r\n */\r\n private _host: Animatable;\r\n\r\n /**\r\n * The original value of the runtime animation\r\n */\r\n private _originalValue = new Array<any>();\r\n\r\n /**\r\n * The original blend value of the runtime animation\r\n */\r\n private _originalBlendValue: Nullable<any> = null;\r\n\r\n /**\r\n * The offsets cache of the runtime animation\r\n */\r\n private _offsetsCache: { [key: string]: any } = {};\r\n\r\n /**\r\n * The high limits cache of the runtime animation\r\n */\r\n private _highLimitsCache: { [key: string]: any } = {};\r\n\r\n /**\r\n * Specifies if the runtime animation has been stopped\r\n */\r\n private _stopped = false;\r\n\r\n /**\r\n * The blending factor of the runtime animation\r\n */\r\n private _blendingFactor = 0;\r\n\r\n /**\r\n * The BabylonJS scene\r\n */\r\n private _scene: Scene;\r\n\r\n /**\r\n * The current value of the runtime animation\r\n */\r\n private _currentValue: Nullable<any> = null;\r\n\r\n /** @internal */\r\n public _animationState: _IAnimationState;\r\n\r\n /**\r\n * The active target of the runtime animation\r\n */\r\n private _activeTargets: any[];\r\n private _currentActiveTarget: Nullable<any> = null;\r\n private _directTarget: Nullable<any> = null;\r\n\r\n /**\r\n * The target path of the runtime animation\r\n */\r\n private _targetPath: string = \"\";\r\n\r\n /**\r\n * The weight of the runtime animation\r\n */\r\n private _weight = 1.0;\r\n\r\n /**\r\n * The absolute frame offset of the runtime animation\r\n */\r\n private _absoluteFrameOffset = 0;\r\n\r\n /**\r\n * The previous elapsed time (since start of animation) of the runtime animation\r\n */\r\n private _previousElapsedTime: number = 0;\r\n\r\n /**\r\n * The previous absolute frame of the runtime animation (meaning, without taking into account the from/to values, only the elapsed time and the fps)\r\n */\r\n private _previousAbsoluteFrame: number = 0;\r\n\r\n private _enableBlending: boolean;\r\n\r\n private _keys: IAnimationKey[];\r\n private _minFrame: number;\r\n private _maxFrame: number;\r\n private _minValue: any;\r\n private _maxValue: any;\r\n private _targetIsArray = false;\r\n\r\n /**\r\n * Gets the current frame of the runtime animation\r\n */\r\n public get currentFrame(): number {\r\n return this._currentFrame;\r\n }\r\n\r\n /**\r\n * Gets the weight of the runtime animation\r\n */\r\n public get weight(): number {\r\n return this._weight;\r\n }\r\n\r\n /**\r\n * Gets the current value of the runtime animation\r\n */\r\n public get currentValue(): any {\r\n return this._currentValue;\r\n }\r\n\r\n /**\r\n * Gets or sets the target path of the runtime animation\r\n */\r\n public get targetPath(): string {\r\n return this._targetPath;\r\n }\r\n\r\n /**\r\n * Gets the actual target of the runtime animation\r\n */\r\n public get target(): any {\r\n return this._currentActiveTarget;\r\n }\r\n\r\n /**\r\n * Gets the additive state of the runtime animation\r\n */\r\n public get isAdditive(): boolean {\r\n return this._host && this._host.isAdditive;\r\n }\r\n\r\n /** @internal */\r\n public _onLoop: () => void;\r\n\r\n /**\r\n * Create a new RuntimeAnimation object\r\n * @param target defines the target of the animation\r\n * @param animation defines the source animation object\r\n * @param scene defines the hosting scene\r\n * @param host defines the initiating Animatable\r\n */\r\n public constructor(target: any, animation: Animation, scene: Scene, host: Animatable) {\r\n this._animation = animation;\r\n this._target = target;\r\n this._scene = scene;\r\n this._host = host;\r\n this._activeTargets = [];\r\n\r\n animation._runtimeAnimations.push(this);\r\n\r\n // State\r\n this._animationState = {\r\n key: 0,\r\n repeatCount: 0,\r\n loopMode: this._getCorrectLoopMode(),\r\n };\r\n\r\n if (this._animation.dataType === Animation.ANIMATIONTYPE_MATRIX) {\r\n this._animationState.workValue = Matrix.Zero();\r\n }\r\n\r\n // Limits\r\n this._keys = this._animation.getKeys();\r\n this._minFrame = this._keys[0].frame;\r\n this._maxFrame = this._keys[this._keys.length - 1].frame;\r\n this._minValue = this._keys[0].value;\r\n this._maxValue = this._keys[this._keys.length - 1].value;\r\n\r\n // Add a start key at frame 0 if missing\r\n if (this._minFrame !== 0) {\r\n const newKey = { frame: 0, value: this._minValue };\r\n this._keys.splice(0, 0, newKey);\r\n }\r\n\r\n // Check data\r\n if (this._target instanceof Array) {\r\n let index = 0;\r\n for (const target of this._target) {\r\n this._preparePath(target, index);\r\n this._getOriginalValues(index);\r\n index++;\r\n }\r\n this._targetIsArray = true;\r\n } else {\r\n this._preparePath(this._target);\r\n this._getOriginalValues();\r\n this._targetIsArray = false;\r\n this._directTarget = this._activeTargets[0];\r\n }\r\n\r\n // Cloning events locally\r\n const events = animation.getEvents();\r\n if (events && events.length > 0) {\r\n events.forEach((e) => {\r\n this._events.push(e._clone());\r\n });\r\n }\r\n\r\n this._enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;\r\n }\r\n\r\n private _preparePath(target: any, targetIndex = 0) {\r\n const targetPropertyPath = this._animation.targetPropertyPath;\r\n\r\n if (targetPropertyPath.length > 1) {\r\n let property = target[targetPropertyPath[0]];\r\n\r\n for (let index = 1; index < targetPropertyPath.length - 1; index++) {\r\n property = property[targetPropertyPath[index]];\r\n }\r\n\r\n this._targetPath = targetPropertyPath[targetPropertyPath.length - 1];\r\n this._activeTargets[targetIndex] = property;\r\n } else {\r\n this._targetPath = targetPropertyPath[0];\r\n this._activeTargets[targetIndex] = target;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the animation from the runtime animation\r\n */\r\n public get animation(): Animation {\r\n return this._animation;\r\n }\r\n\r\n /**\r\n * Resets the runtime animation to the beginning\r\n * @param restoreOriginal defines whether to restore the target property to the original value\r\n */\r\n public reset(restoreOriginal = false): void {\r\n if (restoreOriginal) {\r\n if (this._target instanceof Array) {\r\n let index = 0;\r\n for (const target of this._target) {\r\n if (this._originalValue[index] !== undefined) {\r\n this._setValue(target, this._activeTargets[index], this._originalValue[index], -1, index);\r\n }\r\n index++;\r\n }\r\n } else {\r\n if (this._originalValue[0] !== undefined) {\r\n this._setValue(this._target, this._directTarget, this._originalValue[0], -1, 0);\r\n }\r\n }\r\n }\r\n\r\n this._offsetsCache = {};\r\n this._highLimitsCache = {};\r\n this._currentFrame = 0;\r\n this._blendingFactor = 0;\r\n\r\n // Events\r\n for (let index = 0; index < this._events.length; index++) {\r\n this._events[index].isDone = false;\r\n }\r\n }\r\n\r\n /**\r\n * Specifies if the runtime animation is stopped\r\n * @returns Boolean specifying if the runtime animation is stopped\r\n */\r\n public isStopped(): boolean {\r\n return this._stopped;\r\n }\r\n\r\n /**\r\n * Disposes of the runtime animation\r\n */\r\n public dispose(): void {\r\n const index = this._animation.runtimeAnimations.indexOf(this);\r\n\r\n if (index > -1) {\r\n this._animation.runtimeAnimations.splice(index, 1);\r\n }\r\n }\r\n\r\n /**\r\n * Apply the interpolated value to the target\r\n * @param currentValue defines the value computed by the animation\r\n * @param weight defines the weight to apply to this value (Defaults to 1.0)\r\n */\r\n public setValue(currentValue: any, weight: number) {\r\n if (this._targetIsArray) {\r\n for (let index = 0; index < this._target.length; index++) {\r\n const target = this._target[index];\r\n this._setValue(target, this._activeTargets[index], currentValue, weight, index);\r\n }\r\n return;\r\n }\r\n this._setValue(this._target, this._directTarget, currentValue, weight, 0);\r\n }\r\n\r\n private _getOriginalValues(targetIndex = 0) {\r\n let originalValue: any;\r\n const target = this._activeTargets[targetIndex];\r\n\r\n if (target.getLocalMatrix && this._targetPath === \"_matrix\") {\r\n // For bones\r\n originalValue = target.getLocalMatrix();\r\n } else {\r\n originalValue = target[this._targetPath];\r\n }\r\n\r\n if (originalValue && originalValue.clone) {\r\n this._originalValue[targetIndex] = originalValue.clone();\r\n } else {\r\n this._originalValue[targetIndex] = originalValue;\r\n }\r\n }\r\n\r\n private _setValue(target: any, destination: any, currentValue: any, weight: number, targetIndex: number): void {\r\n // Set value\r\n this._currentActiveTarget = destination;\r\n\r\n this._weight = weight;\r\n\r\n if (this._enableBlending && this._blendingFactor <= 1.0) {\r\n if (!this._originalBlendValue) {\r\n const originalValue = destination[this._targetPath];\r\n\r\n if (originalValue.clone) {\r\n this._originalBlendValue = originalValue.clone();\r\n } else {\r\n this._originalBlendValue = originalValue;\r\n }\r\n }\r\n\r\n if (this._originalBlendValue.m) {\r\n // Matrix\r\n if (Animation.AllowMatrixDecomposeForInterpolation) {\r\n if (this._currentValue) {\r\n Matrix.DecomposeLerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);\r\n } else {\r\n this._currentValue = Matrix.DecomposeLerp(this._originalBlendValue, currentValue, this._blendingFactor);\r\n }\r\n } else {\r\n if (this._currentValue) {\r\n Matrix.LerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);\r\n } else {\r\n this._currentValue = Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);\r\n }\r\n }\r\n } else {\r\n this._currentValue = Animation._UniversalLerp(this._originalBlendValue, currentValue, this._blendingFactor);\r\n }\r\n\r\n const blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;\r\n this._blendingFactor += blendingSpeed;\r\n } else {\r\n if (!this._currentValue) {\r\n if (currentValue?.clone) {\r\n this._currentValue = currentValue.clone();\r\n } else {\r\n this._currentValue = currentValue;\r\n }\r\n } else if (this._currentValue.copyFrom) {\r\n this._currentValue.copyFrom(currentValue);\r\n } else {\r\n this._currentValue = currentValue;\r\n }\r\n }\r\n\r\n if (weight !== -1.0) {\r\n this._scene._registerTargetForLateAnimationBinding(this, this._originalValue[targetIndex]);\r\n } else {\r\n destination[this._targetPath] = this._currentValue;\r\n }\r\n\r\n if (target.markAsDirty) {\r\n target.markAsDirty(this._animation.targetProperty);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the loop pmode of the runtime animation\r\n * @returns Loop Mode\r\n */\r\n private _getCorrectLoopMode(): number | undefined {\r\n if (this._target && this._target.animationPropertiesOverride) {\r\n return this._target.animationPropertiesOverride.loopMode;\r\n }\r\n\r\n return this._animation.loopMode;\r\n }\r\n\r\n /**\r\n * Move the current animation to a given frame\r\n * @param frame defines the frame to move to\r\n */\r\n public goToFrame(frame: number): void {\r\n const keys = this._animation.getKeys();\r\n\r\n if (frame < keys[0].frame) {\r\n frame = keys[0].frame;\r\n } else if (frame > keys[keys.length - 1].frame) {\r\n frame = keys[keys.length - 1].frame;\r\n }\r\n\r\n // Need to reset animation events\r\n const events = this._events;\r\n if (events.length) {\r\n for (let index = 0; index < events.length; index++) {\r\n if (!events[index].onlyOnce) {\r\n // reset events in the future\r\n events[index].isDone = events[index].frame < frame;\r\n }\r\n }\r\n }\r\n\r\n this._currentFrame = frame;\r\n const currentValue = this._animation._interpolate(frame, this._animationState);\r\n\r\n this.setValue(currentValue, -1);\r\n }\r\n\r\n /**\r\n * @internal Internal use only\r\n */\r\n public _prepareForSpeedRatioChange(newSpeedRatio: number): void {\r\n const newAbsoluteFrame = (this._previousElapsedTime * (this._animation.framePerSecond * newSpeedRatio)) / 1000.0;\r\n\r\n this._absoluteFrameOffset = this._previousAbsoluteFrame - newAbsoluteFrame;\r\n }\r\n\r\n /**\r\n * Execute the current animation\r\n * @param elapsedTimeSinceAnimationStart defines the elapsed time (in milliseconds) since the animation was started\r\n * @param from defines the lower frame of the animation range\r\n * @param to defines the upper frame of the animation range\r\n * @param loop defines if the current animation must loop\r\n * @param speedRatio defines the current speed ratio\r\n * @param weight defines the weight of the animation (default is -1 so no weight)\r\n * @returns a boolean indicating if the animation is running\r\n */\r\n public animate(elapsedTimeSinceAnimationStart: number, from: number, to: number, loop: boolean, speedRatio: number, weight = -1.0): boolean {\r\n const animation = this._animation;\r\n const targetPropertyPath = animation.targetPropertyPath;\r\n if (!targetPropertyPath || targetPropertyPath.length < 1) {\r\n this._stopped = true;\r\n return false;\r\n }\r\n\r\n let returnValue = true;\r\n\r\n // Check limits\r\n if (from < this._minFrame || from > this._maxFrame) {\r\n from = this._minFrame;\r\n }\r\n if (to < this._minFrame || to > this._maxFrame) {\r\n to = this._maxFrame;\r\n }\r\n\r\n const frameRange = to - from;\r\n let offsetValue: any;\r\n\r\n // Compute the frame according to the elapsed time and the fps of the animation (\"from\" and \"to\" are not factored in!)\r\n let absoluteFrame = (elapsedTimeSinceAnimationStart * (animation.framePerSecond * speedRatio)) / 1000.0 + this._absoluteFrameOffset;\r\n let highLimitValue = 0;\r\n\r\n // Apply the yoyo function if required\r\n if (loop && this._animationState.loopMode === Animation.ANIMATIONLOOPMODE_YOYO) {\r\n const position = (absoluteFrame - from) / frameRange;\r\n\r\n // Apply the yoyo curve\r\n const yoyoPosition = Math.abs(Math.sin(position * Math.PI));\r\n\r\n // Map the yoyo position back to the range\r\n absoluteFrame = yoyoPosition * frameRange + from;\r\n }\r\n\r\n this._previousElapsedTime = elapsedTimeSinceAnimationStart;\r\n this._previousAbsoluteFrame = absoluteFrame;\r\n\r\n if (!loop && to >= from && absoluteFrame >= frameRange) {\r\n // If we are out of range and not looping get back to caller\r\n returnValue = false;\r\n highLimitValue = animation._getKeyValue(this._maxValue);\r\n } else if (!loop && from >= to && absoluteFrame <= frameRange) {\r\n returnValue = false;\r\n highLimitValue = animation._getKeyValue(this._minValue);\r\n } else if (this._animationState.loopMode !== Animation.ANIMATIONLOOPMODE_CYCLE) {\r\n const keyOffset = to.toString() + from.toString();\r\n if (!this._offsetsCache[keyOffset]) {\r\n this._animationState.repeatCount = 0;\r\n this._animationState.loopMode = Animation.ANIMATIONLOOPMODE_CYCLE; // force a specific codepath in animation._interpolate()!\r\n const fromValue = animation._interpolate(from, this._animationState);\r\n const toValue = animation._interpolate(to, this._animationState);\r\n\r\n this._animationState.loopMode = this._getCorrectLoopMode();\r\n switch (animation.dataType) {\r\n // Float\r\n case Animation.ANIMATIONTYPE_FLOAT:\r\n this._offsetsCache[keyOffset] = toValue - fromValue;\r\n break;\r\n // Quaternion\r\n case Animation.ANIMATIONTYPE_QUATERNION:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Vector3\r\n case Animation.ANIMATIONTYPE_VECTOR3:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Vector2\r\n case Animation.ANIMATIONTYPE_VECTOR2:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Size\r\n case Animation.ANIMATIONTYPE_SIZE:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Color3\r\n case Animation.ANIMATIONTYPE_COLOR3:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n this._highLimitsCache[keyOffset] = toValue;\r\n }\r\n\r\n highLimitValue = this._highLimitsCache[keyOffset];\r\n offsetValue = this._offsetsCache[keyOffset];\r\n }\r\n\r\n if (offsetValue === undefined) {\r\n switch (animation.dataType) {\r\n // Float\r\n case Animation.ANIMATIONTYPE_FLOAT:\r\n offsetValue = 0;\r\n break;\r\n // Quaternion\r\n case Animation.ANIMATIONTYPE_QUATERNION:\r\n offsetValue = _staticOffsetValueQuaternion;\r\n break;\r\n // Vector3\r\n case Animation.ANIMATIONTYPE_VECTOR3:\r\n offsetValue = _staticOffsetValueVector3;\r\n break;\r\n // Vector2\r\n case Animation.ANIMATIONTYPE_VECTOR2:\r\n offsetValue = _staticOffsetValueVector2;\r\n break;\r\n // Size\r\n case Animation.ANIMATIONTYPE_SIZE:\r\n offsetValue = _staticOffsetValueSize;\r\n break;\r\n // Color3\r\n case Animation.ANIMATIONTYPE_COLOR3:\r\n offsetValue = _staticOffsetValueColor3;\r\n break;\r\n case Animation.ANIMATIONTYPE_COLOR4:\r\n offsetValue = _staticOffsetValueColor4;\r\n break;\r\n }\r\n }\r\n\r\n // Compute value\r\n let currentFrame: number;\r\n\r\n if (this._host && this._host.syncRoot) {\r\n // If we must sync with an animatable, calculate the current frame based on the frame of the root animatable\r\n const syncRoot = this._host.syncRoot;\r\n const hostNormalizedFrame = (syncRoot.masterFrame - syncRoot.fromFrame) / (syncRoot.toFrame - syncRoot.fromFrame);\r\n currentFrame = from + frameRange * hostNormalizedFrame;\r\n } else {\r\n if ((absoluteFrame > 0 && from > to) || (absoluteFrame < 0 && from < to)) {\r\n currentFrame = returnValue && frameRange !== 0 ? to + (absoluteFrame % frameRange) : from;\r\n } else {\r\n currentFrame = returnValue && frameRange !== 0 ? from + (absoluteFrame % frameRange) : to;\r\n }\r\n }\r\n\r\n const events = this._events;\r\n\r\n // Reset event/state if looping\r\n if ((speedRatio > 0 && this.currentFrame > currentFrame) || (speedRatio < 0 && this.currentFrame < currentFrame)) {\r\n this._onLoop();\r\n\r\n // Need to reset animation events\r\n for (let index = 0; index < events.length; index++) {\r\n if (!events[index].onlyOnce) {\r\n // reset event, the animation is looping\r\n events[index].isDone = false;\r\n }\r\n }\r\n\r\n this._animationState.key = speedRatio > 0 ? 0 : animation.getKeys().length - 1;\r\n }\r\n this._currentFrame = currentFrame;\r\n this._animationState.repeatCount = frameRange === 0 ? 0 : (absoluteFrame / frameRange) >> 0;\r\n this._animationState.highLimitValue = highLimitValue;\r\n this._animationState.offsetValue = offsetValue;\r\n\r\n const currentValue = animation._interpolate(currentFrame, this._animationState);\r\n\r\n // Set value\r\n this.setValue(currentValue, weight);\r\n\r\n // Check events\r\n if (events.length) {\r\n for (let index = 0; index < events.length; index++) {\r\n // Make sure current frame has passed event frame and that event frame is within the current range\r\n // Also, handle both forward and reverse animations\r\n if (\r\n (frameRange > 0 && currentFrame >= events[index].frame && events[index].frame >= from) ||\r\n (frameRange < 0 && currentFrame <= events[index].frame && events[index].frame <= from)\r\n ) {\r\n const event = events[index];\r\n if (!event.isDone) {\r\n // If event should be done only once, remove it.\r\n if (event.onlyOnce) {\r\n events.splice(index, 1);\r\n index--;\r\n }\r\n event.isDone = true;\r\n event.action(currentFrame);\r\n } // Don't do anything if the event has already been done.\r\n }\r\n }\r\n }\r\n\r\n if (!returnValue) {\r\n this._stopped = true;\r\n }\r\n\r\n return returnValue;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"runtimeAnimation.js","sourceRoot":"","sources":["../../../../dev/core/src/Animations/runtimeAnimation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EACH,SAAS,EACT,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,aAAa,CAAC;AAMrB;;GAEG;AACH,MAAM,OAAO,gBAAgB;IA2GzB;;OAEG;IACH,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,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{ Nullable } from \"../types\";\r\nimport { Matrix } from \"../Maths/math.vector\";\r\nimport type { _IAnimationState } from \"./animation\";\r\nimport {\r\n Animation,\r\n _staticOffsetValueColor3,\r\n _staticOffsetValueColor4,\r\n _staticOffsetValueQuaternion,\r\n _staticOffsetValueSize,\r\n _staticOffsetValueVector2,\r\n _staticOffsetValueVector3,\r\n} from \"./animation\";\r\nimport type { AnimationEvent } from \"./animationEvent\";\r\nimport type { Animatable } from \"./animatable\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { IAnimationKey } from \"./animationKey\";\r\n\r\n/**\r\n * Defines a runtime animation\r\n */\r\nexport class RuntimeAnimation {\r\n private _events = new Array<AnimationEvent>();\r\n\r\n /**\r\n * The current frame of the runtime animation\r\n */\r\n private _currentFrame: number = 0;\r\n\r\n /**\r\n * The animation used by the runtime animation\r\n */\r\n private _animation: Animation;\r\n\r\n /**\r\n * The target of the runtime animation\r\n */\r\n private _target: any;\r\n\r\n /**\r\n * The initiating animatable\r\n */\r\n private _host: Animatable;\r\n\r\n /**\r\n * The original value of the runtime animation\r\n */\r\n private _originalValue = new Array<any>();\r\n\r\n /**\r\n * The original blend value of the runtime animation\r\n */\r\n private _originalBlendValue: Nullable<any> = null;\r\n\r\n /**\r\n * The offsets cache of the runtime animation\r\n */\r\n private _offsetsCache: { [key: string]: any } = {};\r\n\r\n /**\r\n * The high limits cache of the runtime animation\r\n */\r\n private _highLimitsCache: { [key: string]: any } = {};\r\n\r\n /**\r\n * Specifies if the runtime animation has been stopped\r\n */\r\n private _stopped = false;\r\n\r\n /**\r\n * The blending factor of the runtime animation\r\n */\r\n private _blendingFactor = 0;\r\n\r\n /**\r\n * The BabylonJS scene\r\n */\r\n private _scene: Scene;\r\n\r\n /**\r\n * The current value of the runtime animation\r\n */\r\n private _currentValue: Nullable<any> = null;\r\n\r\n /** @internal */\r\n public _animationState: _IAnimationState;\r\n\r\n /**\r\n * The active target of the runtime animation\r\n */\r\n private _activeTargets: any[];\r\n private _currentActiveTarget: Nullable<any> = null;\r\n private _directTarget: Nullable<any> = null;\r\n\r\n /**\r\n * The target path of the runtime animation\r\n */\r\n private _targetPath: string = \"\";\r\n\r\n /**\r\n * The weight of the runtime animation\r\n */\r\n private _weight = 1.0;\r\n\r\n /**\r\n * The absolute frame offset of the runtime animation\r\n */\r\n private _absoluteFrameOffset = 0;\r\n\r\n /**\r\n * The previous elapsed time (since start of animation) of the runtime animation\r\n */\r\n private _previousElapsedTime: number = 0;\r\n\r\n /**\r\n * The previous absolute frame of the runtime animation (meaning, without taking into account the from/to values, only the elapsed time and the fps)\r\n */\r\n private _previousAbsoluteFrame: number = 0;\r\n\r\n private _enableBlending: boolean;\r\n\r\n private _keys: IAnimationKey[];\r\n private _minFrame: number;\r\n private _maxFrame: number;\r\n private _minValue: any;\r\n private _maxValue: any;\r\n private _targetIsArray = false;\r\n\r\n /**\r\n * Gets the current frame of the runtime animation\r\n */\r\n public get currentFrame(): number {\r\n return this._currentFrame;\r\n }\r\n\r\n /**\r\n * Gets the weight of the runtime animation\r\n */\r\n public get weight(): number {\r\n return this._weight;\r\n }\r\n\r\n /**\r\n * Gets the current value of the runtime animation\r\n */\r\n public get currentValue(): any {\r\n return this._currentValue;\r\n }\r\n\r\n /**\r\n * Gets or sets the target path of the runtime animation\r\n */\r\n public get targetPath(): string {\r\n return this._targetPath;\r\n }\r\n\r\n /**\r\n * Gets the actual target of the runtime animation\r\n */\r\n public get target(): any {\r\n return this._currentActiveTarget;\r\n }\r\n\r\n /**\r\n * Gets the additive state of the runtime animation\r\n */\r\n public get isAdditive(): boolean {\r\n return this._host && this._host.isAdditive;\r\n }\r\n\r\n /** @internal */\r\n public _onLoop: () => void;\r\n\r\n /**\r\n * Create a new RuntimeAnimation object\r\n * @param target defines the target of the animation\r\n * @param animation defines the source animation object\r\n * @param scene defines the hosting scene\r\n * @param host defines the initiating Animatable\r\n */\r\n public constructor(target: any, animation: Animation, scene: Scene, host: Animatable) {\r\n this._animation = animation;\r\n this._target = target;\r\n this._scene = scene;\r\n this._host = host;\r\n this._activeTargets = [];\r\n\r\n animation._runtimeAnimations.push(this);\r\n\r\n // State\r\n this._animationState = {\r\n key: 0,\r\n repeatCount: 0,\r\n loopMode: this._getCorrectLoopMode(),\r\n };\r\n\r\n if (this._animation.dataType === Animation.ANIMATIONTYPE_MATRIX) {\r\n this._animationState.workValue = Matrix.Zero();\r\n }\r\n\r\n // Limits\r\n this._keys = this._animation.getKeys();\r\n this._minFrame = this._keys[0].frame;\r\n this._maxFrame = this._keys[this._keys.length - 1].frame;\r\n this._minValue = this._keys[0].value;\r\n this._maxValue = this._keys[this._keys.length - 1].value;\r\n\r\n // Add a start key at frame 0 if missing\r\n if (this._minFrame !== 0) {\r\n const newKey = { frame: 0, value: this._minValue };\r\n this._keys.splice(0, 0, newKey);\r\n }\r\n\r\n // Check data\r\n if (this._target instanceof Array) {\r\n let index = 0;\r\n for (const target of this._target) {\r\n this._preparePath(target, index);\r\n this._getOriginalValues(index);\r\n index++;\r\n }\r\n this._targetIsArray = true;\r\n } else {\r\n this._preparePath(this._target);\r\n this._getOriginalValues();\r\n this._targetIsArray = false;\r\n this._directTarget = this._activeTargets[0];\r\n }\r\n\r\n // Cloning events locally\r\n const events = animation.getEvents();\r\n if (events && events.length > 0) {\r\n events.forEach((e) => {\r\n this._events.push(e._clone());\r\n });\r\n }\r\n\r\n this._enableBlending = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.enableBlending : this._animation.enableBlending;\r\n }\r\n\r\n private _preparePath(target: any, targetIndex = 0) {\r\n const targetPropertyPath = this._animation.targetPropertyPath;\r\n\r\n if (targetPropertyPath.length > 1) {\r\n let property = target[targetPropertyPath[0]];\r\n\r\n for (let index = 1; index < targetPropertyPath.length - 1; index++) {\r\n property = property[targetPropertyPath[index]];\r\n }\r\n\r\n this._targetPath = targetPropertyPath[targetPropertyPath.length - 1];\r\n this._activeTargets[targetIndex] = property;\r\n } else {\r\n this._targetPath = targetPropertyPath[0];\r\n this._activeTargets[targetIndex] = target;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the animation from the runtime animation\r\n */\r\n public get animation(): Animation {\r\n return this._animation;\r\n }\r\n\r\n /**\r\n * Resets the runtime animation to the beginning\r\n * @param restoreOriginal defines whether to restore the target property to the original value\r\n */\r\n public reset(restoreOriginal = false): void {\r\n if (restoreOriginal) {\r\n if (this._target instanceof Array) {\r\n let index = 0;\r\n for (const target of this._target) {\r\n if (this._originalValue[index] !== undefined) {\r\n this._setValue(target, this._activeTargets[index], this._originalValue[index], -1, index);\r\n }\r\n index++;\r\n }\r\n } else {\r\n if (this._originalValue[0] !== undefined) {\r\n this._setValue(this._target, this._directTarget, this._originalValue[0], -1, 0);\r\n }\r\n }\r\n }\r\n\r\n this._offsetsCache = {};\r\n this._highLimitsCache = {};\r\n this._currentFrame = 0;\r\n this._blendingFactor = 0;\r\n\r\n // Events\r\n for (let index = 0; index < this._events.length; index++) {\r\n this._events[index].isDone = false;\r\n }\r\n }\r\n\r\n /**\r\n * Specifies if the runtime animation is stopped\r\n * @returns Boolean specifying if the runtime animation is stopped\r\n */\r\n public isStopped(): boolean {\r\n return this._stopped;\r\n }\r\n\r\n /**\r\n * Disposes of the runtime animation\r\n */\r\n public dispose(): void {\r\n const index = this._animation.runtimeAnimations.indexOf(this);\r\n\r\n if (index > -1) {\r\n this._animation.runtimeAnimations.splice(index, 1);\r\n }\r\n }\r\n\r\n /**\r\n * Apply the interpolated value to the target\r\n * @param currentValue defines the value computed by the animation\r\n * @param weight defines the weight to apply to this value (Defaults to 1.0)\r\n */\r\n public setValue(currentValue: any, weight: number) {\r\n if (this._targetIsArray) {\r\n for (let index = 0; index < this._target.length; index++) {\r\n const target = this._target[index];\r\n this._setValue(target, this._activeTargets[index], currentValue, weight, index);\r\n }\r\n return;\r\n }\r\n this._setValue(this._target, this._directTarget, currentValue, weight, 0);\r\n }\r\n\r\n private _getOriginalValues(targetIndex = 0) {\r\n let originalValue: any;\r\n const target = this._activeTargets[targetIndex];\r\n\r\n if (target.getLocalMatrix && this._targetPath === \"_matrix\") {\r\n // For bones\r\n originalValue = target.getLocalMatrix();\r\n } else {\r\n originalValue = target[this._targetPath];\r\n }\r\n\r\n if (originalValue && originalValue.clone) {\r\n this._originalValue[targetIndex] = originalValue.clone();\r\n } else {\r\n this._originalValue[targetIndex] = originalValue;\r\n }\r\n }\r\n\r\n private _setValue(target: any, destination: any, currentValue: any, weight: number, targetIndex: number): void {\r\n // Set value\r\n this._currentActiveTarget = destination;\r\n\r\n this._weight = weight;\r\n\r\n if (this._enableBlending && this._blendingFactor <= 1.0) {\r\n if (!this._originalBlendValue) {\r\n const originalValue = destination[this._targetPath];\r\n\r\n if (originalValue.clone) {\r\n this._originalBlendValue = originalValue.clone();\r\n } else {\r\n this._originalBlendValue = originalValue;\r\n }\r\n }\r\n\r\n if (this._originalBlendValue.m) {\r\n // Matrix\r\n if (Animation.AllowMatrixDecomposeForInterpolation) {\r\n if (this._currentValue) {\r\n Matrix.DecomposeLerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);\r\n } else {\r\n this._currentValue = Matrix.DecomposeLerp(this._originalBlendValue, currentValue, this._blendingFactor);\r\n }\r\n } else {\r\n if (this._currentValue) {\r\n Matrix.LerpToRef(this._originalBlendValue, currentValue, this._blendingFactor, this._currentValue);\r\n } else {\r\n this._currentValue = Matrix.Lerp(this._originalBlendValue, currentValue, this._blendingFactor);\r\n }\r\n }\r\n } else {\r\n this._currentValue = Animation._UniversalLerp(this._originalBlendValue, currentValue, this._blendingFactor);\r\n }\r\n\r\n const blendingSpeed = target && target.animationPropertiesOverride ? target.animationPropertiesOverride.blendingSpeed : this._animation.blendingSpeed;\r\n this._blendingFactor += blendingSpeed;\r\n } else {\r\n if (!this._currentValue) {\r\n if (currentValue?.clone) {\r\n this._currentValue = currentValue.clone();\r\n } else {\r\n this._currentValue = currentValue;\r\n }\r\n } else if (this._currentValue.copyFrom) {\r\n this._currentValue.copyFrom(currentValue);\r\n } else {\r\n this._currentValue = currentValue;\r\n }\r\n }\r\n\r\n if (weight !== -1.0) {\r\n this._scene._registerTargetForLateAnimationBinding(this, this._originalValue[targetIndex]);\r\n } else {\r\n if (this._animationState.loopMode === Animation.ANIMATIONLOOPMODE_RELATIVE) {\r\n if (this._currentValue.addToRef) {\r\n this._currentValue.addToRef(this._originalValue[targetIndex], destination[this._targetPath]);\r\n } else {\r\n destination[this._targetPath] = this._originalValue[targetIndex] + this._currentValue;\r\n }\r\n } else {\r\n destination[this._targetPath] = this._currentValue;\r\n }\r\n }\r\n\r\n if (target.markAsDirty) {\r\n target.markAsDirty(this._animation.targetProperty);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the loop pmode of the runtime animation\r\n * @returns Loop Mode\r\n */\r\n private _getCorrectLoopMode(): number | undefined {\r\n if (this._target && this._target.animationPropertiesOverride) {\r\n return this._target.animationPropertiesOverride.loopMode;\r\n }\r\n\r\n return this._animation.loopMode;\r\n }\r\n\r\n /**\r\n * Move the current animation to a given frame\r\n * @param frame defines the frame to move to\r\n */\r\n public goToFrame(frame: number): void {\r\n const keys = this._animation.getKeys();\r\n\r\n if (frame < keys[0].frame) {\r\n frame = keys[0].frame;\r\n } else if (frame > keys[keys.length - 1].frame) {\r\n frame = keys[keys.length - 1].frame;\r\n }\r\n\r\n // Need to reset animation events\r\n const events = this._events;\r\n if (events.length) {\r\n for (let index = 0; index < events.length; index++) {\r\n if (!events[index].onlyOnce) {\r\n // reset events in the future\r\n events[index].isDone = events[index].frame < frame;\r\n }\r\n }\r\n }\r\n\r\n this._currentFrame = frame;\r\n const currentValue = this._animation._interpolate(frame, this._animationState);\r\n\r\n this.setValue(currentValue, -1);\r\n }\r\n\r\n /**\r\n * @internal Internal use only\r\n */\r\n public _prepareForSpeedRatioChange(newSpeedRatio: number): void {\r\n const newAbsoluteFrame = (this._previousElapsedTime * (this._animation.framePerSecond * newSpeedRatio)) / 1000.0;\r\n\r\n this._absoluteFrameOffset = this._previousAbsoluteFrame - newAbsoluteFrame;\r\n }\r\n\r\n /**\r\n * Execute the current animation\r\n * @param elapsedTimeSinceAnimationStart defines the elapsed time (in milliseconds) since the animation was started\r\n * @param from defines the lower frame of the animation range\r\n * @param to defines the upper frame of the animation range\r\n * @param loop defines if the current animation must loop\r\n * @param speedRatio defines the current speed ratio\r\n * @param weight defines the weight of the animation (default is -1 so no weight)\r\n * @returns a boolean indicating if the animation is running\r\n */\r\n public animate(elapsedTimeSinceAnimationStart: number, from: number, to: number, loop: boolean, speedRatio: number, weight = -1.0): boolean {\r\n const animation = this._animation;\r\n const targetPropertyPath = animation.targetPropertyPath;\r\n if (!targetPropertyPath || targetPropertyPath.length < 1) {\r\n this._stopped = true;\r\n return false;\r\n }\r\n\r\n let returnValue = true;\r\n\r\n // Check limits\r\n if (from < this._minFrame || from > this._maxFrame) {\r\n from = this._minFrame;\r\n }\r\n if (to < this._minFrame || to > this._maxFrame) {\r\n to = this._maxFrame;\r\n }\r\n\r\n const frameRange = to - from;\r\n let offsetValue: any;\r\n\r\n // Compute the frame according to the elapsed time and the fps of the animation (\"from\" and \"to\" are not factored in!)\r\n let absoluteFrame = (elapsedTimeSinceAnimationStart * (animation.framePerSecond * speedRatio)) / 1000.0 + this._absoluteFrameOffset;\r\n let highLimitValue = 0;\r\n\r\n // Apply the yoyo function if required\r\n if (loop && this._animationState.loopMode === Animation.ANIMATIONLOOPMODE_YOYO) {\r\n const position = (absoluteFrame - from) / frameRange;\r\n\r\n // Apply the yoyo curve\r\n const yoyoPosition = Math.abs(Math.sin(position * Math.PI));\r\n\r\n // Map the yoyo position back to the range\r\n absoluteFrame = yoyoPosition * frameRange + from;\r\n }\r\n\r\n this._previousElapsedTime = elapsedTimeSinceAnimationStart;\r\n this._previousAbsoluteFrame = absoluteFrame;\r\n\r\n if (!loop && to >= from && absoluteFrame >= frameRange) {\r\n // If we are out of range and not looping get back to caller\r\n returnValue = false;\r\n highLimitValue = animation._getKeyValue(this._maxValue);\r\n } else if (!loop && from >= to && absoluteFrame <= frameRange) {\r\n returnValue = false;\r\n highLimitValue = animation._getKeyValue(this._minValue);\r\n } else if (this._animationState.loopMode !== Animation.ANIMATIONLOOPMODE_CYCLE) {\r\n const keyOffset = to.toString() + from.toString();\r\n if (!this._offsetsCache[keyOffset]) {\r\n this._animationState.repeatCount = 0;\r\n this._animationState.loopMode = Animation.ANIMATIONLOOPMODE_CYCLE; // force a specific codepath in animation._interpolate()!\r\n const fromValue = animation._interpolate(from, this._animationState);\r\n const toValue = animation._interpolate(to, this._animationState);\r\n\r\n this._animationState.loopMode = this._getCorrectLoopMode();\r\n switch (animation.dataType) {\r\n // Float\r\n case Animation.ANIMATIONTYPE_FLOAT:\r\n this._offsetsCache[keyOffset] = toValue - fromValue;\r\n break;\r\n // Quaternion\r\n case Animation.ANIMATIONTYPE_QUATERNION:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Vector3\r\n case Animation.ANIMATIONTYPE_VECTOR3:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Vector2\r\n case Animation.ANIMATIONTYPE_VECTOR2:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Size\r\n case Animation.ANIMATIONTYPE_SIZE:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n // Color3\r\n case Animation.ANIMATIONTYPE_COLOR3:\r\n this._offsetsCache[keyOffset] = toValue.subtract(fromValue);\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n this._highLimitsCache[keyOffset] = toValue;\r\n }\r\n\r\n highLimitValue = this._highLimitsCache[keyOffset];\r\n offsetValue = this._offsetsCache[keyOffset];\r\n }\r\n\r\n if (offsetValue === undefined) {\r\n switch (animation.dataType) {\r\n // Float\r\n case Animation.ANIMATIONTYPE_FLOAT:\r\n offsetValue = 0;\r\n break;\r\n // Quaternion\r\n case Animation.ANIMATIONTYPE_QUATERNION:\r\n offsetValue = _staticOffsetValueQuaternion;\r\n break;\r\n // Vector3\r\n case Animation.ANIMATIONTYPE_VECTOR3:\r\n offsetValue = _staticOffsetValueVector3;\r\n break;\r\n // Vector2\r\n case Animation.ANIMATIONTYPE_VECTOR2:\r\n offsetValue = _staticOffsetValueVector2;\r\n break;\r\n // Size\r\n case Animation.ANIMATIONTYPE_SIZE:\r\n offsetValue = _staticOffsetValueSize;\r\n break;\r\n // Color3\r\n case Animation.ANIMATIONTYPE_COLOR3:\r\n offsetValue = _staticOffsetValueColor3;\r\n break;\r\n case Animation.ANIMATIONTYPE_COLOR4:\r\n offsetValue = _staticOffsetValueColor4;\r\n break;\r\n }\r\n }\r\n\r\n // Compute value\r\n let currentFrame: number;\r\n\r\n if (this._host && this._host.syncRoot) {\r\n // If we must sync with an animatable, calculate the current frame based on the frame of the root animatable\r\n const syncRoot = this._host.syncRoot;\r\n const hostNormalizedFrame = (syncRoot.masterFrame - syncRoot.fromFrame) / (syncRoot.toFrame - syncRoot.fromFrame);\r\n currentFrame = from + frameRange * hostNormalizedFrame;\r\n } else {\r\n if ((absoluteFrame > 0 && from > to) || (absoluteFrame < 0 && from < to)) {\r\n currentFrame = returnValue && frameRange !== 0 ? to + (absoluteFrame % frameRange) : from;\r\n } else {\r\n currentFrame = returnValue && frameRange !== 0 ? from + (absoluteFrame % frameRange) : to;\r\n }\r\n }\r\n\r\n const events = this._events;\r\n\r\n // Reset event/state if looping\r\n if ((speedRatio > 0 && this.currentFrame > currentFrame) || (speedRatio < 0 && this.currentFrame < currentFrame)) {\r\n this._onLoop();\r\n\r\n // Need to reset animation events\r\n for (let index = 0; index < events.length; index++) {\r\n if (!events[index].onlyOnce) {\r\n // reset event, the animation is looping\r\n events[index].isDone = false;\r\n }\r\n }\r\n\r\n this._animationState.key = speedRatio > 0 ? 0 : animation.getKeys().length - 1;\r\n }\r\n this._currentFrame = currentFrame;\r\n this._animationState.repeatCount = frameRange === 0 ? 0 : (absoluteFrame / frameRange) >> 0;\r\n this._animationState.highLimitValue = highLimitValue;\r\n this._animationState.offsetValue = offsetValue;\r\n\r\n const currentValue = animation._interpolate(currentFrame, this._animationState);\r\n\r\n // Set value\r\n this.setValue(currentValue, weight);\r\n\r\n // Check events\r\n if (events.length) {\r\n for (let index = 0; index < events.length; index++) {\r\n // Make sure current frame has passed event frame and that event frame is within the current range\r\n // Also, handle both forward and reverse animations\r\n if (\r\n (frameRange > 0 && currentFrame >= events[index].frame && events[index].frame >= from) ||\r\n (frameRange < 0 && currentFrame <= events[index].frame && events[index].frame <= from)\r\n ) {\r\n const event = events[index];\r\n if (!event.isDone) {\r\n // If event should be done only once, remove it.\r\n if (event.onlyOnce) {\r\n events.splice(index, 1);\r\n index--;\r\n }\r\n event.isDone = true;\r\n event.action(currentFrame);\r\n } // Don't do anything if the event has already been done.\r\n }\r\n }\r\n }\r\n\r\n if (!returnValue) {\r\n this._stopped = true;\r\n }\r\n\r\n return returnValue;\r\n }\r\n}\r\n"]}
@@ -97,6 +97,47 @@ export interface ITextMetrics {
97
97
  */
98
98
  readonly actualBoundingBoxRight: number;
99
99
  }
100
+ /**
101
+ * Class used to abstract a matrix
102
+ */
103
+ export interface DOMMatrix {
104
+ /**
105
+ * A Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D.
106
+ */
107
+ is2D: boolean;
108
+ /**
109
+ * A Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).
110
+ */
111
+ isIdentity: boolean;
112
+ /**
113
+ * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.
114
+ */
115
+ a: number;
116
+ b: number;
117
+ c: number;
118
+ d: number;
119
+ e: number;
120
+ f: number;
121
+ /**
122
+ * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
123
+ */
124
+ m11: number;
125
+ m12: number;
126
+ m13: number;
127
+ m14: number;
128
+ m21: number;
129
+ m22: number;
130
+ m23: number;
131
+ m24: number;
132
+ m31: number;
133
+ m32: number;
134
+ m33: number;
135
+ m34: number;
136
+ m41: number;
137
+ m42: number;
138
+ m43: number;
139
+ m44: number;
140
+ }
100
141
  /**
101
142
  * Class used to abstract canvas rendering
102
143
  */
@@ -359,4 +400,8 @@ export interface ICanvasRenderingContext {
359
400
  * @param f Vertical translation (moving).
360
401
  */
361
402
  setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
403
+ /**
404
+ * Retrieves the current transformation matrix being applied to the context.
405
+ */
406
+ getTransform(): DOMMatrix;
362
407
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ICanvas.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/ICanvas.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Class used to abstract a canvas\r\n */\r\nexport interface ICanvas {\r\n /**\r\n * Canvas width.\r\n */\r\n width: number;\r\n\r\n /**\r\n * Canvas height.\r\n */\r\n height: number;\r\n\r\n /**\r\n * returns a drawing context on the canvas.\r\n * @param contextType context identifier.\r\n * @param contextAttributes context attributes.\r\n * @returns ICanvasRenderingContext object.\r\n */\r\n getContext(contextType: string, contextAttributes?: any): ICanvasRenderingContext;\r\n\r\n /**\r\n * returns a data URI containing a representation of the image in the format specified by the type parameter.\r\n * @param mime the image format.\r\n * @returns string containing the requested data URI.\r\n */\r\n toDataURL(mime: string): string;\r\n}\r\n\r\n/**\r\n * Class used to abstract am image to use with the canvas and its context\r\n */\r\nexport interface IImage {\r\n /**\r\n * onload callback.\r\n */\r\n onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Error callback.\r\n */\r\n onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Image source.\r\n */\r\n src: string;\r\n\r\n /**\r\n * Image width.\r\n */\r\n readonly width: number;\r\n\r\n /**\r\n * Image height.\r\n */\r\n readonly height: number;\r\n\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n\r\n /**\r\n * provides support for CORS, defining how the element handles crossorigin requests,\r\n * thereby enabling the configuration of the CORS requests for the element's fetched data.\r\n */\r\n crossOrigin: string | null;\r\n\r\n /**\r\n * provides support for referrer policy on xhr load request,\r\n * it is used to control the request header.\r\n */\r\n referrerPolicy: string;\r\n}\r\n\r\n/**\r\n * Class used to abstract a canvas gradient\r\n */\r\nexport interface ICanvasGradient {\r\n /**\r\n * adds a new color stop, defined by an offset and a color, to a given canvas gradient.\r\n * @param offset A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.\r\n * @param color value representing the color of the stop.\r\n */\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract a text measurement\r\n */\r\nexport interface ITextMetrics {\r\n /**\r\n * Text width.\r\n */\r\n readonly width: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the left side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxLeft: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the right side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxRight: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract canvas rendering\r\n */\r\nexport interface ICanvasRenderingContext {\r\n /**\r\n * Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).\r\n */\r\n lineJoin: string;\r\n\r\n /**\r\n * Miter limit ratio. Default 10.\r\n */\r\n miterLimit: number;\r\n\r\n /**\r\n * Font setting. Default value 10px sans-serif.\r\n */\r\n font: string;\r\n\r\n /**\r\n * Color or style to use for the lines around shapes. Default #000 (black).\r\n */\r\n strokeStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Color or style to use inside shapes. Default #000 (black).\r\n */\r\n fillStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).\r\n */\r\n globalAlpha: number;\r\n\r\n /**\r\n * Color of the shadow. Default: fully-transparent black.\r\n */\r\n shadowColor: string;\r\n\r\n /**\r\n * Specifies the blurring effect. Default: 0.\r\n */\r\n shadowBlur: number;\r\n\r\n /**\r\n * Horizontal distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetX: number;\r\n\r\n /**\r\n * Vertical distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetY: number;\r\n\r\n /**\r\n * Width of lines. Default 1.0.\r\n */\r\n lineWidth: number;\r\n\r\n /**\r\n * canvas is a read-only reference to ICanvas.\r\n */\r\n readonly canvas: ICanvas;\r\n\r\n /**\r\n * Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n clearRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Saves the current drawing style state using a stack so you can revert any change you make to it using restore().\r\n */\r\n save(): void;\r\n\r\n /**\r\n * Restores the drawing style state to the last element on the 'state stack' saved by save().\r\n */\r\n restore(): void;\r\n\r\n /**\r\n * Draws a filled rectangle at (x, y) position whose size is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n fillRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Adds a scaling transformation to the canvas units by x horizontally and by y vertically.\r\n * @param x Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling.\r\n * @param y Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling.\r\n */\r\n scale(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a rotation to the transformation matrix. The angle argument represents a clockwise rotation angle and is expressed in radians.\r\n * @param angle The rotation angle, clockwise in radians. You can use degree * Math.PI / 180 to calculate a radian from a degree.\r\n */\r\n rotate(angle: number): void;\r\n\r\n /**\r\n * Adds a translation transformation by moving the canvas and its origin x horizontally and y vertically on the grid.\r\n * @param x Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.\r\n * @param y Distance to move in the vertical direction. Positive values are down, and negative are up.\r\n */\r\n translate(x: number, y: number): void;\r\n\r\n /**\r\n * Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n strokeRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n rect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.\r\n */\r\n clip(): void;\r\n\r\n /**\r\n * Paints data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.\r\n * @param imageData An ImageData object containing the array of pixel values.\r\n * @param dx Horizontal position (x coordinate) at which to place the image data in the destination canvas.\r\n * @param dy Vertical position (y coordinate) at which to place the image data in the destination canvas.\r\n */\r\n putImageData(imageData: ImageData, dx: number, dy: number): void;\r\n\r\n /**\r\n * Adds a circular arc to the current path.\r\n * @param x The horizontal coordinate of the arc's center.\r\n * @param y The vertical coordinate of the arc's center.\r\n * @param radius The arc's radius. Must be positive.\r\n * @param startAngle The angle at which the arc starts in radians, measured from the positive x-axis.\r\n * @param endAngle The angle at which the arc ends in radians, measured from the positive x-axis.\r\n * @param anticlockwise An optional Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise).\r\n */\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n\r\n /**\r\n * Starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.\r\n */\r\n beginPath(): void;\r\n\r\n /**\r\n * Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start.\r\n * If the shape has already been closed or has only one point, this function does nothing.\r\n */\r\n closePath(): void;\r\n\r\n /**\r\n * Moves the starting point of a new sub-path to the (x, y) coordinates.\r\n * @param x The x-axis (horizontal) coordinate of the point.\r\n * @param y The y-axis (vertical) coordinate of the point.\r\n */\r\n moveTo(x: number, y: number): void;\r\n\r\n /**\r\n * Connects the last point in the current sub-path to the specified (x, y) coordinates with a straight line.\r\n * @param x The x-axis coordinate of the line's end point.\r\n * @param y The y-axis coordinate of the line's end point.\r\n */\r\n lineTo(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a quadratic Bézier curve to the current path.\r\n * @param cpx The x-axis coordinate of the control point.\r\n * @param cpy The y-axis coordinate of the control point.\r\n * @param x The x-axis coordinate of the end point.\r\n * @param y The y-axis coordinate of the end point.\r\n */\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n\r\n /**\r\n * Returns a TextMetrics object.\r\n * @param text The text String to measure.\r\n * @returns ITextMetrics A ITextMetrics object.\r\n */\r\n measureText(text: string): ITextMetrics;\r\n\r\n /**\r\n * Strokes the current sub-paths with the current stroke style.\r\n */\r\n stroke(): void;\r\n\r\n /**\r\n * Fills the current sub-paths with the current fill style.\r\n */\r\n fill(): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param sx The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sy The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sWidth The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.\r\n * @param sHeight The height of the sub-rectangle of the source image to draw into the destination context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n\r\n drawImage(image: any, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n drawImage(image: any, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n */\r\n drawImage(image: any, dx: number, dy: number): void;\r\n\r\n /**\r\n * Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.\r\n * @param sx The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sy The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sw The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * @returns ImageData An ImageData object containing the image data for the rectangle of the canvas specified.\r\n */\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n\r\n /**\r\n * Sets the current line dash pattern.\r\n * @param segments An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).\r\n */\r\n setLineDash(segments: Array<number>): void;\r\n\r\n /**\r\n * Draws (fills) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Draws (strokes) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start point.\r\n * @param y0 The y-axis coordinate of the start point.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the specified line.\r\n */\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start circle.\r\n * @param y0 The y-axis coordinate of the start circle.\r\n * @param r0 The radius of the start circle. Must be non-negative and finite.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @param r1 The radius of the end circle. Must be non-negative and finite.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.\r\n */\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;\r\n\r\n /**\r\n * Resets the current transform to matrix composed with a, b, c, d, e, f.\r\n * @param a Horizontal scaling. A value of 1 results in no scaling.\r\n * @param b Vertical skewing.\r\n * @param c Horizontal skewing.\r\n * @param d Vertical scaling. A value of 1 results in no scaling.\r\n * @param e Horizontal translation (moving).\r\n * @param f Vertical translation (moving).\r\n */\r\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\r\n}\r\n"]}
1
+ {"version":3,"file":"ICanvas.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/ICanvas.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Class used to abstract a canvas\r\n */\r\nexport interface ICanvas {\r\n /**\r\n * Canvas width.\r\n */\r\n width: number;\r\n\r\n /**\r\n * Canvas height.\r\n */\r\n height: number;\r\n\r\n /**\r\n * returns a drawing context on the canvas.\r\n * @param contextType context identifier.\r\n * @param contextAttributes context attributes.\r\n * @returns ICanvasRenderingContext object.\r\n */\r\n getContext(contextType: string, contextAttributes?: any): ICanvasRenderingContext;\r\n\r\n /**\r\n * returns a data URI containing a representation of the image in the format specified by the type parameter.\r\n * @param mime the image format.\r\n * @returns string containing the requested data URI.\r\n */\r\n toDataURL(mime: string): string;\r\n}\r\n\r\n/**\r\n * Class used to abstract am image to use with the canvas and its context\r\n */\r\nexport interface IImage {\r\n /**\r\n * onload callback.\r\n */\r\n onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Error callback.\r\n */\r\n onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Image source.\r\n */\r\n src: string;\r\n\r\n /**\r\n * Image width.\r\n */\r\n readonly width: number;\r\n\r\n /**\r\n * Image height.\r\n */\r\n readonly height: number;\r\n\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n\r\n /**\r\n * provides support for CORS, defining how the element handles crossorigin requests,\r\n * thereby enabling the configuration of the CORS requests for the element's fetched data.\r\n */\r\n crossOrigin: string | null;\r\n\r\n /**\r\n * provides support for referrer policy on xhr load request,\r\n * it is used to control the request header.\r\n */\r\n referrerPolicy: string;\r\n}\r\n\r\n/**\r\n * Class used to abstract a canvas gradient\r\n */\r\nexport interface ICanvasGradient {\r\n /**\r\n * adds a new color stop, defined by an offset and a color, to a given canvas gradient.\r\n * @param offset A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.\r\n * @param color value representing the color of the stop.\r\n */\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract a text measurement\r\n */\r\nexport interface ITextMetrics {\r\n /**\r\n * Text width.\r\n */\r\n readonly width: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the left side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxLeft: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the right side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxRight: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract a matrix\r\n */\r\nexport interface DOMMatrix {\r\n /**\r\n * A Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D.\r\n */\r\n is2D: boolean;\r\n /**\r\n * A Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).\r\n */\r\n isIdentity: boolean;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n a: number;\r\n b: number;\r\n c: number;\r\n d: number;\r\n e: number;\r\n f: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m11: number;\r\n m12: number;\r\n m13: number;\r\n m14: number;\r\n m21: number;\r\n m22: number;\r\n m23: number;\r\n m24: number;\r\n m31: number;\r\n m32: number;\r\n m33: number;\r\n m34: number;\r\n m41: number;\r\n m42: number;\r\n m43: number;\r\n m44: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract canvas rendering\r\n */\r\nexport interface ICanvasRenderingContext {\r\n /**\r\n * Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).\r\n */\r\n lineJoin: string;\r\n\r\n /**\r\n * Miter limit ratio. Default 10.\r\n */\r\n miterLimit: number;\r\n\r\n /**\r\n * Font setting. Default value 10px sans-serif.\r\n */\r\n font: string;\r\n\r\n /**\r\n * Color or style to use for the lines around shapes. Default #000 (black).\r\n */\r\n strokeStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Color or style to use inside shapes. Default #000 (black).\r\n */\r\n fillStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).\r\n */\r\n globalAlpha: number;\r\n\r\n /**\r\n * Color of the shadow. Default: fully-transparent black.\r\n */\r\n shadowColor: string;\r\n\r\n /**\r\n * Specifies the blurring effect. Default: 0.\r\n */\r\n shadowBlur: number;\r\n\r\n /**\r\n * Horizontal distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetX: number;\r\n\r\n /**\r\n * Vertical distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetY: number;\r\n\r\n /**\r\n * Width of lines. Default 1.0.\r\n */\r\n lineWidth: number;\r\n\r\n /**\r\n * canvas is a read-only reference to ICanvas.\r\n */\r\n readonly canvas: ICanvas;\r\n\r\n /**\r\n * Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n clearRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Saves the current drawing style state using a stack so you can revert any change you make to it using restore().\r\n */\r\n save(): void;\r\n\r\n /**\r\n * Restores the drawing style state to the last element on the 'state stack' saved by save().\r\n */\r\n restore(): void;\r\n\r\n /**\r\n * Draws a filled rectangle at (x, y) position whose size is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n fillRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Adds a scaling transformation to the canvas units by x horizontally and by y vertically.\r\n * @param x Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling.\r\n * @param y Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling.\r\n */\r\n scale(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a rotation to the transformation matrix. The angle argument represents a clockwise rotation angle and is expressed in radians.\r\n * @param angle The rotation angle, clockwise in radians. You can use degree * Math.PI / 180 to calculate a radian from a degree.\r\n */\r\n rotate(angle: number): void;\r\n\r\n /**\r\n * Adds a translation transformation by moving the canvas and its origin x horizontally and y vertically on the grid.\r\n * @param x Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.\r\n * @param y Distance to move in the vertical direction. Positive values are down, and negative are up.\r\n */\r\n translate(x: number, y: number): void;\r\n\r\n /**\r\n * Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n strokeRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n rect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.\r\n */\r\n clip(): void;\r\n\r\n /**\r\n * Paints data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.\r\n * @param imageData An ImageData object containing the array of pixel values.\r\n * @param dx Horizontal position (x coordinate) at which to place the image data in the destination canvas.\r\n * @param dy Vertical position (y coordinate) at which to place the image data in the destination canvas.\r\n */\r\n putImageData(imageData: ImageData, dx: number, dy: number): void;\r\n\r\n /**\r\n * Adds a circular arc to the current path.\r\n * @param x The horizontal coordinate of the arc's center.\r\n * @param y The vertical coordinate of the arc's center.\r\n * @param radius The arc's radius. Must be positive.\r\n * @param startAngle The angle at which the arc starts in radians, measured from the positive x-axis.\r\n * @param endAngle The angle at which the arc ends in radians, measured from the positive x-axis.\r\n * @param anticlockwise An optional Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise).\r\n */\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n\r\n /**\r\n * Starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.\r\n */\r\n beginPath(): void;\r\n\r\n /**\r\n * Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start.\r\n * If the shape has already been closed or has only one point, this function does nothing.\r\n */\r\n closePath(): void;\r\n\r\n /**\r\n * Moves the starting point of a new sub-path to the (x, y) coordinates.\r\n * @param x The x-axis (horizontal) coordinate of the point.\r\n * @param y The y-axis (vertical) coordinate of the point.\r\n */\r\n moveTo(x: number, y: number): void;\r\n\r\n /**\r\n * Connects the last point in the current sub-path to the specified (x, y) coordinates with a straight line.\r\n * @param x The x-axis coordinate of the line's end point.\r\n * @param y The y-axis coordinate of the line's end point.\r\n */\r\n lineTo(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a quadratic Bézier curve to the current path.\r\n * @param cpx The x-axis coordinate of the control point.\r\n * @param cpy The y-axis coordinate of the control point.\r\n * @param x The x-axis coordinate of the end point.\r\n * @param y The y-axis coordinate of the end point.\r\n */\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n\r\n /**\r\n * Returns a TextMetrics object.\r\n * @param text The text String to measure.\r\n * @returns ITextMetrics A ITextMetrics object.\r\n */\r\n measureText(text: string): ITextMetrics;\r\n\r\n /**\r\n * Strokes the current sub-paths with the current stroke style.\r\n */\r\n stroke(): void;\r\n\r\n /**\r\n * Fills the current sub-paths with the current fill style.\r\n */\r\n fill(): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param sx The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sy The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sWidth The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.\r\n * @param sHeight The height of the sub-rectangle of the source image to draw into the destination context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n\r\n drawImage(image: any, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n drawImage(image: any, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n */\r\n drawImage(image: any, dx: number, dy: number): void;\r\n\r\n /**\r\n * Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.\r\n * @param sx The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sy The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sw The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * @returns ImageData An ImageData object containing the image data for the rectangle of the canvas specified.\r\n */\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n\r\n /**\r\n * Sets the current line dash pattern.\r\n * @param segments An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).\r\n */\r\n setLineDash(segments: Array<number>): void;\r\n\r\n /**\r\n * Draws (fills) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Draws (strokes) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start point.\r\n * @param y0 The y-axis coordinate of the start point.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the specified line.\r\n */\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start circle.\r\n * @param y0 The y-axis coordinate of the start circle.\r\n * @param r0 The radius of the start circle. Must be non-negative and finite.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @param r1 The radius of the end circle. Must be non-negative and finite.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.\r\n */\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;\r\n\r\n /**\r\n * Resets the current transform to matrix composed with a, b, c, d, e, f.\r\n * @param a Horizontal scaling. A value of 1 results in no scaling.\r\n * @param b Vertical skewing.\r\n * @param c Horizontal skewing.\r\n * @param d Vertical scaling. A value of 1 results in no scaling.\r\n * @param e Horizontal translation (moving).\r\n * @param f Vertical translation (moving).\r\n */\r\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\r\n\r\n /**\r\n * Retrieves the current transformation matrix being applied to the context.\r\n */\r\n getTransform(): DOMMatrix;\r\n}\r\n"]}
@@ -34,13 +34,13 @@ export class ThinEngine {
34
34
  */
35
35
  // Not mixed with Version for tooling purpose.
36
36
  static get NpmPackage() {
37
- return "babylonjs@6.32.0";
37
+ return "babylonjs@6.32.1";
38
38
  }
39
39
  /**
40
40
  * Returns the current version of the framework
41
41
  */
42
42
  static get Version() {
43
- return "6.32.0";
43
+ return "6.32.1";
44
44
  }
45
45
  /**
46
46
  * Returns a string describing the current engine