pointlock
Meta Data
| filepath_exists | True |
| path | pointlock |
| filepath | pointlock.js |
| clean_files | () |
-
ClassDeclarationclass
PointLock
extends None-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
Locked to the pointing direction of self, assuming a ray case from the center through the tip of this (self) point. Only moving forward or backward but not sliding.
The constraint is applied only when this method is called.
-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
cast from the origin, no sliding.
Note, this is already set from the existing origin. such that from the first call the sight-line is assumed. When moving the point, the origin can move freely, where this self point may only move along the cast ray from the origin.
luckily moving the origin doesn't affect the target (self) point.
-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
cast from the origin, allowing sliding along the ray within the min and max bounds.
Bounds are signed multiples of origin.radius; negative values extend behind the origin.
- (default 0) min is the minimum multiple.
- (default Infinity) max is the maximum multiple.
Examples:
// lock to the outside of a point. point.lock.ray(other, 1) // lock one half inside. point.lock.ray(other, .5, 1) // axis lock point.lock.ray(other, -1, 1) // lock between 1/3 of the radius, to a max of 3X the radius. point.lock.ray(other, .3, 3)
ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])
Linear lock.
A linear locked point can move only along the given axis - the direction.
For dragging and interaction, the point is locked by the linear direction relative to other.
The point may only move towards, or away from the other, disregarding the
pointdirection. Whenotherposition changes, the linear lock will reflect this.The point may only move in the direction of itself (forward or reverse)
When rotating the point, the linear lock will reflect this.
Lock between two. Essentially the same as
other(onlya), but with a max limit.