Capítulo 773 de 859
Represents the data source of a texture.
The main purpose of this class is to decouple the data definition from the texture definition so the same data can be used with multiple texture instances.
true and provides more control on how texture…true, the engine allocates the memory for the texture (if necessary) and triggers the actual texture upload t…0 and counts how many times Source#needsUpdate is set to true.Constructor
| Signature |
|---|
new Source( data : any ) |
Properties
| Property | Description |
|---|---|
.data : any | The data definition of a texture. |
.dataReady : boolean | This property is only relevant when Source#needsUpdate is set to true and provides more control on how texture data should be processed. When dataReady is set to `false… |
.id : number (readonly) | The ID of the source. |
.isSource : boolean (readonly) | This flag can be used for type testing. |
.needsUpdate : boolean | When the property is set to true, the engine allocates the memory for the texture (if necessary) and triggers the actual texture upload to the GPU next time the source is used. |
.uuid : string (readonly) | The UUID of the source. |
.version : number (readonly) | This starts at 0 and counts how many times Source#needsUpdate is set to true. |
Methods
| Method | Description |
|---|---|
| `.getSize( target : Vector2 | Vector3 ) : Vector2 |
| `.toJSON( meta : Object | string ) : Object` |