The main instance that manages this component
current options of the component
The parent component that manages this component
Name of the component.
A string tag that categorizes the component. e.g. trans, render
Default options for this component
Map from option name to handler methods. The handler methods are called in order when on an option is updated with a Model.set call. This allows component to respond to option changes live. e.g. In a Live-Edit User Interface for preset development.
Adds new sub component in this Container
Once component is inserted, an addComponent
event is fired with the following arguments:
options for the new sub-component
the position at which the sub-component should be inserted. Defaults to appending
additional params to be passed down the the addComponent
event
Destroy all subcomponents and itself.
Detaches a component from this container and returns it.
Once component is detached, a detachComponent
event is fired with following arguments.
The position from which component should be detached
additional params to be passed down the the detachComponent
event
Performs drawing operations. Override to implement drawing for this component. Typically you'd make some WebGL operations to render to the framebuffer manager of this components parent.
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Returns a sub-component under hierarchy of this Container with the given id
id of the component to find
returns a component options given name
Returns the id of this component
Returns the last error. That raised an error:*
event
Returns a /
path to the component from the root.
Returns the TextSetManager for this component.
A container inherits TextureSetManager from it's own parent unless explicitly overridden by Subclass
Initializes Container. Please override to implement component specific initialization
Container init basically instantiates all subcomponents from the components
option.
It also initializes the TextureSetManager to the parent's.
Returns whether this component is enabled or not
Add a listener to another EventEmitter.
This provides an event subscription list facility. Allowing subclasses to listen to other emitters and remove all or some listeners with a single call to Model.stopListening, later.
the event emitter to listen to
the name of the event to listen to
the callback for the event handler
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Add a one-time listener for a given event.
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Safely set an attribute(s).
If the attribute set succeeds, a change:[attribute name]
event is fired.
change:[attribute name]
event handler receives this
object, the new value
and options
as arguments.
Additionally a change
event is also fired when all changes succeed. The change
event receives this
object and the options
as arguments.
the name of the attribute or map of values
the new value of the attribute
this object is sent down to the event handlers, useful to things down to your
handler. if options.silent
is true then events are not fired.
Sets the parent of this component
the new parent of this component
sets the frambuffer manager for this container
the frambuffermanager
Removes to one or more listeners that were set earlier with calls to Model.listenTo.
Use the arguments to filter subscriptions. eg: model.stopListening(em)
will remove all
listeners on emitter em
. model.stopListening(em, 'change')
will remove all listeners for
change
event on emitter em
.
the event emitter on which the listener was set
the event to be removed
the callback to be removed
Returns the JSON representation of the component options.
Returns the name of the component
Returns a string tag that categorizes the component. e.g. trans, render
A Base class for all Components that have a sub component.
Manages, cloning and component tree operations.