DAE Loader
Type: mp.daeLoader
Inputs
| Property | Type |
|---|---|
| url | string — default ""The url to the dae file. |
| visible | boolean — default trueIf true, the model is visible. |
| localPosition | { x: number, y: number, z: number } — default { x: 0, y: 0, z: 0 }The local offset of the model. |
| localRotation | { x: number, y: number, z: number } — default { x: 0, y: 0, z: 0 }The local rotation of model in euler angles. |
| localScale | { x: number, y: number, z: number } — default { x: 1, y: 1, z: 1 }The local scale of the model. |
| colliderEnabled | boolean — default trueWhen set, the collider output is set to the loaded model. |
Outputs
| Property | Type |
|---|---|
| loadingState | string — default "Idle""Idle" - initialized, no url is set • "Loading" - url set, loading the model • "Loaded" - model has been loaded • "Error" - there was an error during loading |
| objectRoot | Object3D — default nullnull - no model loaded • {Object3D} - the root of the loaded model |
| collider | Object3D — default {objectRoot}null - no collider events if colliderEnabled is set to false • {objectRoot} - Raycasting will be performed against the loaded model |
var [ sceneObject ] = await sdk.Scene.createObjects(1);
var node = sceneObject.addNode();
var initial = {
url: "http://test.com/model.dae",
visible: true,
localScale: {
x: 0.5, y: 0.5, z: 0.5
},
};
node.addComponent('mp.daeLoader', initial);
node.start();