import ImageSequenceTexture from '@mobilizing/library/js/Mobilizing/renderer/3D/three/texture/ImageSequenceTexture.js'
ImageSequenceTexture
Extends:
Constructor Summary
Public Constructor | ||
public | constructor(params: Object) |
Member Summary
Public Members | ||
public | ||
public | direction: * | |
public | ||
public | frameCount: * | |
public | frameRate: * | |
public | ||
public | lapsToDo: * | |
public | outFrame: * | |
public | ||
public | sequenceMode: * | |
public | textures: * | |
public | timer: * |
Method Summary
Public Methods | ||
public | Get the current Image Sequence frame Texture | |
public | Loop the image sequence for a given number of iterations (once play() is called). | |
public | pause() pause the Image Sequence. | |
public | play() play the Image Sequence. | |
public | setCurrentFrame(frame: *) Set the current frame to force the play head, can be used on pause to manually control the play head | |
public | setEnterFrame(frame: Integer) Set the starting frame of the current loaded sequence. | |
public | Set the sequence playing mode. | |
public | setOutFrame(frame: Integer) Set the ending frame of the current loaded sequence. | |
public | setup() | |
public | stop() stop the Image Sequence. | |
public | update the Image sequence. |
Inherited Summary
From class Component | ||
public | ||
public | context: * | |
public | events: * | |
public | id: * | |
public | name: * | |
private | _nexts: *[] | |
private | ||
public | byPass() | |
public | Adds a component to this chained component array | |
public | Returns the array of attached children components | |
public | off() Deactivate the component | |
public | on() Activate the component A call to this method calls the setup method if it has not been run yet | |
public | Run code after the update of all components is run This empty method is usually overriden to perform post-update actions for the component It is called periodically by an internal Mobilizing mechanism | |
public | preLoad() preLoad the component This empty method is usually overriden to perform preLoad actions for the component. | |
public | Run code before the update of all components is run This empty method is usually overriden to perform pre-update actions for the component It is called once per component by an internal Mobilizing mechanism | |
public | prepare() prepare the component This empty method is usually overriden to perform preparation actions for the component, from external process as a server. | |
public | setup() Set's up the component This empty method is usually overriden to perform setup actions for the component This is where all the initialization (such as adding event listeners)should be done It is called automatically by an internal Mobilizing mechanism and should thus not be called directly | |
public | update() Update the component This empty method is usually overriden to perform update actions for the component It is called periodically by an internal Mobilizing mechanism |
Public Constructors
public constructor(params: Object) source
Override:
Component#constructorParams:
Name | Type | Attribute | Description |
params | Object | Parameters object, given by the constructor. | |
params.fps | Number | the frame per second of this sequence | |
params.sequenceMode | String | the mode of playing for this sequence. One of "forward", "backward", "pingpong", "random". | |
params.direction | Number | the direction of the play head. 1 for forward, -1 for backward | |
params.lapsToDo | Number | the number of loop to do before to stop the animation | |
params.textures | Array <Texture> | the texture array that make the image sequence |
Public Members
public direction: * source
public frameCount: * source
public frameRate: * source
public lapsToDo: * source
public outFrame: * source
public sequenceMode: * source
public textures: * source
public timer: * source
Public Methods
public getCurrentTexture(): Texture source
Get the current Image Sequence frame Texture
Return:
Texture | the texture |
public loop(count: Number) source
Loop the image sequence for a given number of iterations (once play() is called).
Params:
Name | Type | Attribute | Description |
count | Number | : -1 means infinity. |
public pause() source
pause the Image Sequence.
public play() source
play the Image Sequence.
public setCurrentFrame(frame: *) source
Set the current frame to force the play head, can be used on pause to manually control the play head
Params:
Name | Type | Attribute | Description |
frame | * |
public setEnterFrame(frame: Integer) source
Set the starting frame of the current loaded sequence.
Params:
Name | Type | Attribute | Description |
frame | Integer | starting frame. |
public setMode(mode: String) source
Set the sequence playing mode.
Params:
Name | Type | Attribute | Description |
mode | String | playing mode : "forward", "backward", "pingpong", "random". |
public setOutFrame(frame: Integer) source
Set the ending frame of the current loaded sequence.
Params:
Name | Type | Attribute | Description |
frame | Integer | ending frame. |
public setup() source
Set's up the component This empty method is usually overriden to perform setup actions for the component This is where all the initialization (such as adding event listeners)should be done It is called automatically by an internal Mobilizing mechanism and should thus not be called directly
Override:
Component#setuppublic stop() source
stop the Image Sequence. The image frame is resetted.
public updateSequence() source
update the Image sequence. You have to call this once per frame for the Image sequence Texture to update and run its own logic.