new require("lyria/scene")()
Scene constructor
- Source:
- Source:
Requires
- module:jquery
- module:mixedice
- module:nexttick
- module:lyria/component
- module:lyria/gameobject
- module:lyria/log
- module:lyria/localization
Methods
-
add(child)
-
Adds a gameobject to the scene
Parameters:
Name Type Description child
Object - Source:
-
behavior(behaviorName, eventName, eventFunction)
-
Binds an DOM event to the specified data-behavior selector
Parameters:
Name Type Description behaviorName
String eventName
String eventFunction
function - Source:
-
bindEvent(selector, eventName, eventFunction)
-
Sets an event to the event object (DOM events)
Parameters:
Name Type Description selector
String eventName
String eventFunction
function - Source:
-
bindEvents(eventObject)
-
Binds a lot of events instead of a single one
Parameters:
Name Type Description eventObject
Object - Source:
- See:
-
- bindEvent
-
refresh(val)
-
Refreshes the scene (Re-renders the template)
Parameters:
Name Type Description val
Object - Source:
-
t(lang)
-
Gets localized value
Parameters:
Name Type Description lang
Object - Source:
-
unbindEvents(Object)
-
Unbinds a lot of events
Parameters:
Name Type Argument Description Object
<optional>
eventObject
- Source: