Selva Compute API Reference - v1.1.2
    Preparing search index...

    Represents the data Source of a texture.

    Type Parameters

    • TData
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Create a new instance of Source

      Type Parameters

      • TData

      Parameters

      • data: TData

        The data definition of a texture. Default null

      Returns Source<TData>

    Properties

    data: TData

    The actual data of a texture.

    The type of this property depends on the texture that uses this instance.

    dataReady: boolean

    This property is only relevant when .needsUpdate is set to true and provides more control on how texture data should be processed. When dataReady is set to false, the engine performs the memory allocation (if necessary) but does not transfer the data into the GPU memory.

    true
    
    id: number
    isSource: true

    Flag to check if a given object is of type Source.

    This is a constant value

    true

    uuid: string

    UUID of this object instance.

    This gets automatically assigned and shouldn't be edited.

    version: number

    This starts at 0 and counts how many times .needsUpdate is set to true.

    Expects a Integer

    0

    Accessors

    • set needsUpdate(value: boolean): void

      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.

      Parameters

      • value: boolean

      Returns void

    Methods

    • Parameters

      Returns Vector3

    • Convert the data Source to three.js JSON Object/Scene format.

      Parameters

      • Optionalmeta: string | {}

        Optional object containing metadata.

      Returns SourceJSON