ReferenceScripting APIMotionJointSpec
MotionJointSpec
interfaceHow two motes' bodies are joined (stage.join).
| Name | MotionJointSpec |
|---|---|
| Kind | interface |
| Script reaches it as | import { MotionJointSpec } from "motion" · JointComponent.joint |
| Since | 0.3 |
Syntax
interface MotionJointSpec { … }Properties
| Name | Type | Description |
|---|---|---|
kindproperty | "fixed" | "hinge" | "slider" | "spring" | "rope" | Fixed (as one), hinge (turning about axis), slider (along axis), spring (pulled toward length), rope (no further than length) |
anchorAproperty | Place | Where it holds the first body, in that body's own frame |
anchorBproperty | Place | Where it holds the other body, in that body's own frame |
axisproperty | Place | A hinge's or slider's axis (3D; a 2D hinge turns about the screen's) |
lengthproperty | number | A spring's rest length, a rope's longest |
stiffnessproperty | number | A spring's stiffness (50) |
dampingproperty | number | A spring's damping, how soon it stops bouncing (2) |
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.