ConnectorMixin is a mixin containing rules that DragMixin uses as a mixin.The part or assembly with the DragMixin can be moved in the graphics window by selecting the Drag icon, then left clicking and holding the part or assembly to be dragged to the desired location.
If snapEnable is set to true then the assembly can be dragged and snapped onto a target object, in this case a sphere.
By enabling the gridEnable rule you will be able to drag the assembly and it will snap to the closest grid point. The grid spacing can be set with the gridX, gridY, and gridZ rules to the number desired.
Parameter Rules
dragEnable: | If set to true then the part or assembly with the DragMixin can be moved in the graphics window. |
Example: | true |
gridEnable: | By enabling the gridEnable rule you will be able to drag the assembly or part and it will snap to the closest grid point. |
The dragEnable or the snapEnable rule must also be enabled for this to work. |
Example: | true |
gridFrame: | Grid frame, Can leave parameter blank because the default is R.world.transform. |
Example: | R.world.transform |
gridX: | This is the spacing distance in the x direction desired. |
Example: | return {"size": 1}; |
gridY: | This is the spacing distance in the y direction desired. |
Example: | return {"size": 1}; |
gridZ: | This is the spacing distance in the z direction desired. |
Example: | return {"size": 1}; |
Mixins
ConnectorMixin
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
dragEnable |
boolean |
true |
DragMixin |
Cached |
gridEnable |
boolean |
false |
DragMixin |
Cached |
gridFrame |
frame |
R.world.transform |
DragMixin |
Cached |
gridX |
any |
{size: 0, min: 0, max: 0} |
DragMixin |
Cached |
gridY |
any |
{size: 0, min: 0, max: 0} |
DragMixin |
Cached |
gridZ |
any |
{size: 0, min: 0, max: 0} |
DragMixin |
Cached |
Mixins
<None>
DragMixin
See DragMixin Discussion for examples.