Type Definitions
AccessTokenCallback(token, expires)
Callback function used to report access token to the viewer.
Parameters:
Name | Type | Description |
---|---|---|
token |
string |
Access token. |
expires |
int |
Number of seconds after which the token expires. |
- Source:
AccessTokenRequest(callback)
Callback function used by the viewer to request new access token.
Parameters:
Name | Type | Description |
---|---|---|
callback |
AccessTokenCallback |
Access token callback. |
- Source:
FragmentCallback(id)
Callback function used when enumerating scene fragments.
Parameters:
Name | Type | Description |
---|---|---|
id |
number |
Fragment ID. |
- Source:
Intersection :object
Object returned by ray casting methods for each scene object under the given canvas coordinates.
Properties:
Name | Type | Description |
---|---|---|
dbId |
number |
Internal ID of the scene object. |
distance |
number |
Distance of the intersection point from camera. All intersections returned by the ray casting method are sorted from the smallest distance to the largest. |
face |
THREE.Face3 |
Face3 object representing the triangular mesh face that has been intersected. |
faceIndex |
number |
Index of the intersected face, if available. |
fragId |
number |
ID of Forge Viewer fragment that was intersected. |
intersectPoint |
THREE.Vector3 |
Vector3 point of intersection. |
point |
THREE.Vector3 |
Same as intersectPoint. |
model |
Model |
Forge Viewer Model that was intersected. |
- Source:
NodeCallback(id)
Callback function used when enumerating scene objects.
Parameters:
Name | Type | Description |
---|---|---|
id |
number |
Object ID. |
- Source:
Viewable :object
Viewable, also referred to as "bubble node", is a singular viewable item from a document that has been generated by Model Derivative API. For example, submitting a Revit file into the service will generate a single document identified by its unique, base-64 encoded urn, and the document will include a hierarchy of various viewables such as thumbnails, 3D scenes for individual camera views, or 2D scenes for individual Revit sheets.
Properties:
Name | Type | Description |
---|---|---|
parent |
Viewable |
Parent of the viewable in the document hierarchy. |
children |
Array.<Viewable> |
Children of the viewable in the document hierarchy. |
id |
number |
Internal viewable ID. |
isLeaf |
boolean |
Indicates that the viewable has no children. |
data |
object |
Additional viewable properties such as guid (unique, string identifier), name, role, type, etc. |
- Source: