The current frame time in milliseconds
This is used to populate the lastRenderableChangeTime property of
Texture instances when their renderable state changes.
Set by stage via updateFrameTime method.
Map of textures by cache key
Renderer that this texture manager is associated with
Map of texture constructors by their type name
Clear all listeners for the given event names by setting their array length to 0, WITHOUT deleting the keys. This keeps the eventListeners object in V8's fast-properties mode and avoids re-allocating the arrays on the next on() call. Use this for objects with a known fixed set of event names (e.g. CoreAnimation, CoreAnimationController).
Only writes arr.length = 0 when the array is non-empty -- skips the write (and the write barrier on old-gen objects) when already empty, which is the common case after unregisterAnimation() has removed all listeners.
Create a texture
The type of texture to create
The properties to use for the texture
Optionaldata: anyEnqueue a texture for uploading to the GPU.
The texture to upload
Check whether this emitter has any listeners registered.
Optionalevent: stringOptional event name. When provided, checks only that event. When omitted, checks all events.
true if at least one listener is registered.
Initialize a texture to the cache
Texture to cache
Cache key for the texture
Override loadTexture to use the batched approach.
The texture to load
Optionalpriority: booleanOptionallistener: EventListenerProcess a limited number of uploads.
The maximum processing time in milliseconds
The maximum number of textures to process in this call
Resolve a parent texture from the cache or fallback to the provided texture.
The provided texture to resolve.
The cached or provided texture.
Upload a texture to the GPU
Texture to upload
Promise that resolves when the texture is fully loaded
EventEmitter base class
Remarks
The
eventListenersmap is allocated lazily on the firston()call. Many objects (e.g. CoreNodes that never have listeners attached) avoid the cost of allocating an empty{}at construction time.