editor › Globals › AssemblyAnimationHelper
Class: AssemblyAnimationHelper
This class provides functions to create animations, that move/rotate an assembly. It also takes care of all other assemblies that might live in a single ConstrainedAssemblyChain with this assembly and moves/rotates them along with the first one.
Hierarchy
- AssemblyAnimationHelper
Index
Methods
Methods
Static makeRotationAnimation
▸ makeRotationAnimation(referenceAssembly: Assembly, rotation: Quaternion, centerOfRotation: ReadonlyVector3, forceCCW: boolean): QuaternionAnimation
Defined in src/util/AssemblyAnimationHelper.ts:28
Parameters:
| Name | Type | Default |
|---|---|---|
referenceAssembly |
Assembly | - |
rotation |
Quaternion | - |
centerOfRotation |
ReadonlyVector3 | referenceAssembly.mapWorldToAssembly( |
| referenceAssembly.getWorldAABB().getCenterReference(), | ||
| ) | ||
forceCCW |
boolean | false |
Returns: QuaternionAnimation
Static makeTranslationAnimation
▸ makeTranslationAnimation(assembly: Assembly, translation: Vector3): Vec3Animation
Defined in src/util/AssemblyAnimationHelper.ts:15
Parameters:
| Name | Type |
|---|---|
assembly |
Assembly |
translation |
Vector3 |
Returns: Vec3Animation