Motion
Get Motion

ReferenceScripting APIMotionJointSpec

MotionJointSpec

interface

How two motes' bodies are joined (stage.join).

NameMotionJointSpec
Kindinterface
Script reaches it asimport { MotionJointSpec } from "motion" · JointComponent.joint
Since0.3

Syntax

interface MotionJointSpec { … }

Properties

NameTypeDescription
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)
anchorApropertyPlaceWhere it holds the first body, in that body's own frame
anchorBpropertyPlaceWhere it holds the other body, in that body's own frame
axispropertyPlaceA hinge's or slider's axis (3D; a 2D hinge turns about the screen's)
lengthpropertynumberA spring's rest length, a rope's longest
stiffnesspropertynumberA spring's stiffness (50)
dampingpropertynumberA spring's damping, how soon it stops bouncing (2)