Constructor

Variables

@:value(null)camera:CameraObject = null

@:value(false)perFrame:Bool = false

@:value(false)ready:Bool = false

@:value(true)redraw:Bool = true

@:value(null)renderTarget:Image = null

Methods

render(g:Graphics, activeCamera:CameraObject):Void

Inherited Variables

Defined by Object

@:value(null)animation:Animation = null

@:value([])children:Array<Object> = []

@:value(null)constraints:Array<Constraint> = null

@:value(false)culled:Bool = false

@:value(false)culledMesh:Bool = false

@:value(false)culledShadow:Bool = false

@:value(null)lods:Array<Object> = null

@:value("")name:String = ""

@:value(null)parent:Object = null

@:value(null)properties:Map<String, Dynamic> = null

@:value(null)raw:TObj = null

@:value([])traits:Array<Trait> = []

@:value(true)visible:Bool = true

@:value(true)visibleMesh:Bool = true

@:value(true)visibleShadow:Bool = true

Inherited Methods

Defined by Object

@:value({ parentInverse : false })inlineaddChild(o:Object, parentInverse:Bool = false):Void

Deprecated: "addChild() is deprecated, please use setParent() instead"

Add a game Object as a child of this game Object.

Parameters:

o

The game Object instance to be added as a child.

parentInverse

Optional (default false) change the scale of the child object to be relative to the parents 3D space or use the original scale.

@:access(iron.Trait)addTrait(t:Trait):Void

getChild(name:String):Object

Get a child game Object of this game Object. Using the childs name property as a lookup.

Parameters:

name

A string matching the name property of the game Object to fetch.

Returns:

Object or null

getChildOfType<T>(type:Class<T>):T

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

Returns the children of the object.

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:

getTrait<T>(c:Class<T>):T

Get the Trait instance that is attached to this game Object.

Parameters:

c

The class of type Trait to attempt to retrieve.

Returns:

Trait or null

@:value({ keepTransform : false })inlineremoveChild(o:Object, keepTransform:Bool = false):Void

Deprecated: "removeChild() is deprecated, please use setParent(null) instead"

Remove a child game Object from it's parentage. Does not remove the object from the scene.

Parameters:

o

The game Object instance to be removed.

keepTransform

Optional (defaut false) keep the transform given by the parent or revert to the objects default.

@:access(iron.Trait)removeTrait(t:Trait):Void

Remove the Trait from the Object.

Parameters:

t

The Trait to be removed from the game Object.

@:value({ keepTransform : false, parentInverse : false })setParent(parentObject:Object, parentInverse:Bool = false, keepTransform:Bool = false):Void

Set the given parentObject as the parent of this object.

If parentObject is null, the object is parented to the scene's sceneParent, which is the topmost object of the scene tree. If you want to remove it from the scene, use Object.remove() instead.

If parentObject is the object on which this function is called, nothing happens.

Parameters:

parentObject

The new parent object.

parentInverse

(Optional) Change the scale of the child object to be relative to the new parents 3D space or use the original scale.

keepTransform

(Optional) When unparenting from the old parent, keep the transform given by the old parent or revert to the object's default.

@:value({ oactions : null })setupAnimation(?oactions:Array<TSceneFormat>):Void