Skip to content

Documentation / device / TextureSampler

Interface: TextureSampler<T> ​

Defined in: libs/device/src/gpuobject.ts:1302

Abstract interface for texture sampler

Extends ​

Type Parameters ​

T ​

T = unknown

Properties ​

[EventMapType]? ​

readonly optional [EventMapType]?: object

Defined in: libs/base/dist/index.d.ts:585

Type-only event map marker.

dispose ​

dispose: []

Inherited from ​

GPUObject.[EventMapType]


device ​

readonly device: AbstractDevice

Defined in: libs/device/src/gpuobject.ts:1271

The object was created by which device

Inherited from ​

GPUObject.device


object ​

readonly object: T

Defined in: libs/device/src/gpuobject.ts:1273

The internal GPU object

Inherited from ​

GPUObject.object


uid ​

readonly uid: number

Defined in: libs/device/src/gpuobject.ts:1275

unique id

Inherited from ​

GPUObject.uid


cid ​

readonly cid: number

Defined in: libs/device/src/gpuobject.ts:1276

Inherited from ​

GPUObject.cid


disposed ​

readonly disposed: boolean

Defined in: libs/device/src/gpuobject.ts:1277

Inherited from ​

GPUObject.disposed


name ​

name: string

Defined in: libs/device/src/gpuobject.ts:1278

Inherited from ​

GPUObject.name


restoreHandler ​

restoreHandler: (tex) => void

Defined in: libs/device/src/gpuobject.ts:1279

Parameters ​

tex ​

GPUObject

Returns ​

void

Inherited from ​

GPUObject.restoreHandler


addressModeU ​

readonly addressModeU: TextureAddressMode

Defined in: libs/device/src/gpuobject.ts:1303


addressModeV ​

readonly addressModeV: TextureAddressMode

Defined in: libs/device/src/gpuobject.ts:1304


addressModeW ​

readonly addressModeW: TextureAddressMode

Defined in: libs/device/src/gpuobject.ts:1305


magFilter ​

readonly magFilter: TextureFilterMode

Defined in: libs/device/src/gpuobject.ts:1306


minFilter ​

readonly minFilter: TextureFilterMode

Defined in: libs/device/src/gpuobject.ts:1307


mipFilter ​

readonly mipFilter: TextureFilterMode

Defined in: libs/device/src/gpuobject.ts:1308


lodMin ​

readonly lodMin: number

Defined in: libs/device/src/gpuobject.ts:1309


lodMax ​

readonly lodMax: number

Defined in: libs/device/src/gpuobject.ts:1310


compare ​

readonly compare: CompareFunc

Defined in: libs/device/src/gpuobject.ts:1311


maxAnisotropy ​

readonly maxAnisotropy: number

Defined in: libs/device/src/gpuobject.ts:1312

Methods ​

on() ​

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:592

Sets up a function that will be called whenever the specified event is delivered to the target

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

The event type to listen for

listener ​

EventListener<{ dispose: []; }, K>

The callback function

context? ​

unknown

Context object of the listener function

Returns ​

void

Inherited from ​

GPUObject.on


once() ​

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:599

Sets up a function that will be called only once when the specified event is delivered to the target

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

The event type to listen for

listener ​

EventListener<{ dispose: []; }, K>

The callback function

context? ​

unknown

Context object of the listener function

Returns ​

void

Inherited from ​

GPUObject.once


off() ​

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:605

Removes an event listener function previously registered.

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

The event type for which to remove an event listener

listener? ​

EventListener<{ dispose: []; }>

The callback function to be removed

context? ​

unknown

Returns ​

void

Inherited from ​

GPUObject.off


dispatchEvent() ​

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:611

Synchronously invoke the affected event listeners with an event object

Type Parameters ​

K ​

K extends "dispose"

Parameters ​

type ​

K

args ​

...object[K]

Returns ​

void

false if the event was canceled, otherwise true

Inherited from ​

GPUObject.dispatchEvent


isVertexLayout() ​

isVertexLayout(): this is VertexLayout<unknown>

Defined in: libs/device/src/gpuobject.ts:1280

Returns ​

this is VertexLayout<unknown>

Inherited from ​

GPUObject.isVertexLayout


isFramebuffer() ​

isFramebuffer(): this is FrameBuffer<unknown>

Defined in: libs/device/src/gpuobject.ts:1281

Returns ​

this is FrameBuffer<unknown>

Inherited from ​

GPUObject.isFramebuffer


isSampler() ​

isSampler(): this is TextureSampler<unknown>

Defined in: libs/device/src/gpuobject.ts:1282

Returns ​

this is TextureSampler<unknown>

Inherited from ​

GPUObject.isSampler


isTexture() ​

isTexture(): this is BaseTexture<unknown>

Defined in: libs/device/src/gpuobject.ts:1283

Returns ​

this is BaseTexture<unknown>

Inherited from ​

GPUObject.isTexture


isTexture2D() ​

isTexture2D(): this is Texture2D<unknown>

Defined in: libs/device/src/gpuobject.ts:1284

Returns ​

this is Texture2D<unknown>

Inherited from ​

GPUObject.isTexture2D


isTexture2DArray() ​

isTexture2DArray(): this is Texture2DArray<unknown>

Defined in: libs/device/src/gpuobject.ts:1285

Returns ​

this is Texture2DArray<unknown>

Inherited from ​

GPUObject.isTexture2DArray


isTexture3D() ​

isTexture3D(): this is Texture3D<unknown>

Defined in: libs/device/src/gpuobject.ts:1286

Returns ​

this is Texture3D<unknown>

Inherited from ​

GPUObject.isTexture3D


isTextureCube() ​

isTextureCube(): this is TextureCube<unknown>

Defined in: libs/device/src/gpuobject.ts:1287

Returns ​

this is TextureCube<unknown>

Inherited from ​

GPUObject.isTextureCube


isTextureVideo() ​

isTextureVideo(): this is TextureVideo<unknown>

Defined in: libs/device/src/gpuobject.ts:1288

Returns ​

this is TextureVideo<unknown>

Inherited from ​

GPUObject.isTextureVideo


isProgram() ​

isProgram(): this is GPUProgram<unknown>

Defined in: libs/device/src/gpuobject.ts:1289

Returns ​

this is GPUProgram<unknown>

Inherited from ​

GPUObject.isProgram


isBuffer() ​

isBuffer(): this is GPUDataBuffer<unknown>

Defined in: libs/device/src/gpuobject.ts:1290

Returns ​

this is GPUDataBuffer<unknown>

Inherited from ​

GPUObject.isBuffer


isBindGroup() ​

isBindGroup(): this is BindGroup

Defined in: libs/device/src/gpuobject.ts:1291

Returns ​

this is BindGroup

Inherited from ​

GPUObject.isBindGroup


dispose() ​

dispose(): void

Defined in: libs/device/src/gpuobject.ts:1292

Returns ​

void

Inherited from ​

GPUObject.dispose


reload() ​

reload(): void

Defined in: libs/device/src/gpuobject.ts:1293

Returns ​

void

Inherited from ​

GPUObject.reload


destroy() ​

destroy(): void

Defined in: libs/device/src/gpuobject.ts:1294

Returns ​

void

Inherited from ​

GPUObject.destroy


restore() ​

restore(): void

Defined in: libs/device/src/gpuobject.ts:1295

Returns ​

void

Inherited from ​

GPUObject.restore

Released under the MIT License.