Module: anchors

Anchors are Empty objects assigned in Blender. They are used to project 3D points or HTML elements to the 2D screen.

Summary

Methods

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: