Anchors are Empty objects assigned in Blender.
They are used to project 3D points or HTML elements to the 2D screen.
For more info about anchor configuration check out the user manual.
- Source:
Summary
Methods
- attach_move_cb(obj, anchor_move_cb)
- detach_move_cb(obj)
- get_element_id(obj) → {string|boolean}
- is_anchor(obj) → {boolean}
- update()
Type Definitions
Detailed Description
Methods
attach_move_cb(obj, anchor_move_cb)
Attach the movement callback to the anchor object.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Anchor object. |
anchor_move_cb |
AnchorMoveCallback | Anchor movement callback |
- Source:
detach_move_cb(obj)
Detach the movement callback from the anchor object.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Anchor object. |
- Source:
get_element_id(obj) → {string|boolean}
Get anchor element ID.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Anchor object. |
Returns:
Element ID or FALSE if the given object is not a
valid anchor.
- Type
- string | boolean
- Source:
is_anchor(obj) → {boolean}
Check if the given object is an anchor.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Anchor object. |
Returns:
Check result.
- Type
- boolean
- Source:
update()
Force update positions of anchors.
- Source:
Type Definitions
AnchorMoveCallback(x, y, appearance, obj, anchornullable)
The callback for the movement of the anchor.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
x |
number | X (left) canvas coordinate. | |
y |
number | Y (top) canvas coordinate. | |
appearance |
string | Anchor appearance, one of "visible", "out", "covered" | |
obj |
Object3D | Anchor object. | |
anchor |
HTMLElement |
<nullable> |
Anchor HTML element |
- Source: