editor › Globals › QuaternionAnimation
Class: QuaternionAnimation
An Animation that animates a THREE.Quaternion
Hierarchy
↳ QuaternionAnimation
Index
Properties
Methods
- _interpolate
- _setStartValue
- _setTargetValue
- animate
- cancel
- clone
- delay
- from
- getPromise
- getter
- in
- onStart
- reset
- to
- usingInterpolation
Properties
setter
• setter: function
Overrides KyubAnimation.setter
Defined in src/renderContext/animations/QuaternionAnimation.ts:16
Use Quaternion intern, accept IPoint3
Type declaration:
▸ (fn: function): this
Parameters:
▪ fn: function
▸ (value: Quaternion, percentage?: number): void
Parameters:
| Name | Type |
|---|---|
value |
Quaternion |
percentage? |
number |
Protected startValue
• startValue: Quaternion
Overrides KyubAnimation.startValue
Defined in src/renderContext/animations/QuaternionAnimation.ts:17
Protected targetValue
• targetValue: Quaternion
Overrides KyubAnimation.targetValue
Defined in src/renderContext/animations/QuaternionAnimation.ts:18
Methods
Protected _interpolate
▸ _interpolate(percentage: number): Quaternion
Overrides KyubAnimation._interpolate
Defined in src/renderContext/animations/QuaternionAnimation.ts:39
Spherical Linear Interpolation - https://en.wikipedia.org/wiki/Slerp
Parameters:
| Name | Type |
|---|---|
percentage |
number |
Returns: Quaternion
Protected _setStartValue
▸ _setStartValue(value: IQuaternion): void
Overrides KyubAnimation._setStartValue
Defined in src/renderContext/animations/QuaternionAnimation.ts:24
Check and save the value as this.startValue Allows for any object that has x, y, z, w properties
Parameters:
| Name | Type |
|---|---|
value |
IQuaternion |
Returns: void
Protected _setTargetValue
▸ _setTargetValue(value: IQuaternion): void
Overrides KyubAnimation._setTargetValue
Defined in src/renderContext/animations/QuaternionAnimation.ts:32
Check and save the value as this.targetValue Allows for any object that has x, y, z, w properties
Parameters:
| Name | Type |
|---|---|
value |
IQuaternion |
Returns: void
animate
▸ animate(timeDelta: number): boolean
Inherited from KyubAnimation.animate
Defined in src/renderContext/animations/KyubAnimation.ts:96
Animates the value on the target
Parameters:
| Name | Type | Description |
|---|---|---|
timeDelta |
number | Time that has passed since last animate call (in ms) |
Returns: boolean
cancel
▸ cancel(): void
Inherited from KyubAnimation.cancel
Defined in src/renderContext/animations/KyubAnimation.ts:158
Finish this animation immediately so that it will not invoke its setter function anymore.
Returns: void
clone
▸ clone(): this
Inherited from KyubAnimation.clone
Defined in src/renderContext/animations/KyubAnimation.ts:169
Returns: this
delay
▸ delay(delay: number): this
Inherited from KyubAnimation.delay
Defined in src/renderContext/animations/KyubAnimation.ts:55
Sets the initial delay of the animation in ms (chainable)
Parameters:
| Name | Type |
|---|---|
delay |
number |
Returns: this
from
▸ from(value: IQuaternion): this
Inherited from KyubAnimation.from
Defined in src/renderContext/animations/KyubAnimation.ts:31
Sets the start value (chainable)
Parameters:
| Name | Type |
|---|---|
value |
IQuaternion |
Returns: this
getPromise
▸ getPromise(): Promise‹void›
Inherited from KyubAnimation.getPromise
Defined in src/renderContext/animations/KyubAnimation.ts:165
Returns: Promise‹void›
A promise that is resolved once the animation finishes
getter
▸ getter(getterFunction: function): this
Inherited from KyubAnimation.getter
Defined in src/renderContext/animations/KyubAnimation.ts:63
Sets the function used to retrieve the current value (chainable)
Parameters:
▪ getterFunction: function
▸ (): IQuaternion
Returns: this
in
▸ in(duration: number): this
Inherited from KyubAnimation.in
Defined in src/renderContext/animations/KyubAnimation.ts:47
Sets the duration of the animation in ms (chainable)
Parameters:
| Name | Type |
|---|---|
duration |
number |
Returns: this
onStart
▸ onStart(onStartCallback: function): this
Inherited from KyubAnimation.onStart
Defined in src/renderContext/animations/KyubAnimation.ts:87
Sets a callback that is called, right before the animation starts running (chainable)
Parameters:
▪ onStartCallback: function
▸ (): void
Returns: this
reset
▸ reset(): this
Inherited from KyubAnimation.reset
Defined in src/renderContext/animations/KyubAnimation.ts:147
Resets the state of this animation to the state before it started running (chainable). You can then rerun this animation from the start.
Returns: this
to
▸ to(value: IQuaternion): this
Inherited from KyubAnimation.to
Defined in src/renderContext/animations/KyubAnimation.ts:39
Sets the target value (chainable)
Parameters:
| Name | Type |
|---|---|
value |
IQuaternion |
Returns: this
usingInterpolation
▸ usingInterpolation(interpolationInstance: Interpolation): this
Inherited from KyubAnimation.usingInterpolation
Defined in src/renderContext/animations/KyubAnimation.ts:79
Sets the interpolation method (chainable)
Parameters:
| Name | Type |
|---|---|
interpolationInstance |
Interpolation |
Returns: this