Static variables

@:value(null)staticactive:Scene = null

@:value(null)staticglobal:Object = null

Static methods

staticcreate(format:TSceneFormat, done:Object ‑> Void):Void

staticgetRawObjectByName(format:TSceneFormat, name:String):TObj

Returns an object in scene data format ('TObj') based on its name. Returns 'null' if the object does not exist.

Parameters:

format

The raw scene data

name

The name of the object

Returns:

TObj

@:value({ done : null })staticsetActive(sceneName:String, ?done:Object ‑> Void):Void

Constructor

new()

Variables

Methods

@:value({ parent : null })addCameraObject(data:CameraData, ?parent:Object):CameraObject

@:value({ parent : null })addLightObject(data:LightData, ?parent:Object):LightObject

@:value({ parent : null })addMeshObject(data:MeshData, materials:Vector<MaterialData>, ?parent:Object):MeshObject

@:value({ parent : null })addObject(?parent:Object):Object

@:value({ parent : null })addProbeObject(data:ProbeData, ?parent:Object):ProbeObject

addScene(sceneName:String, parent:Object, done:Object ‑> Void):Void

@:value({ parent : null })addSpeakerObject(data:TSpeakerData, ?parent:Object):SpeakerObject

createObject(o:TObj, format:TSceneFormat, parent:Object, parentObject:TObj, done:Object ‑> Void):Void

embedData(file:String, done:() ‑> Void):Void

@:value({ recursive : false })getChildren(recursive:Bool = false):Array<Object>

Returns the children of the scene.

If 'recursive' is set to false, only direct children will be included in the returned array. If recursive is true, children of children and so on will be included too.

Parameters:

recursive

= false Include children of children

Returns:

notifyOnInit(f:() ‑> Void):Void

notifyOnRemove(f:() ‑> Void):Void

parseObject(sceneName:String, objectName:String, parent:Object, done:Object ‑> Void):Void

removeInit(f:() ‑> Void):Void

returnMeshObject(object_file:String, data_ref:String, sceneName:String, armature:Armature, materials:Vector<MaterialData>, parent:Object, parentObject:TObj, o:TObj, done:Object ‑> Void):Void

@:value({ srcRaw : null, spawnChildren : true })spawnObject(name:String, parent:Null<Object>, done:Null<Object ‑> Void>, spawnChildren:Bool = true, ?srcRaw:TSceneFormat):Void

Spawn a new object instance in the scene.

Parameters:

name

The name of the object as defined in Blender.

parent

The parent object this new object should be attached to (optional, use null to add to the scene without a parent).

done

Function to run after the spawn is completed (optional). Useful to change properties of the object after spawning.

spawnChildren

Also spawn the children of the newly spawned object (optional, default is true).

srcRaw

If not null, spawn the object from the given scene data instead of using the scene this function is called on. Useful to spawn objects from other scenes.