API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSampler
WebGL2 sampler object wrapper that controls texture filtering and wrapping. Creates a `WebGLSampler` on construction and updates its parameters whenever `scaleMode` or `wrapMode` changes. Bind the sampler to a texture unit with bind before issuing draw calls. Note: `premultiplyAlpha`, `generateMipMap`, and `flipY` are pixel-store parameters handled at texture upload time; this class only manages filter and wrap state.
import { Sampler } from '@codexo/exojs' WebGL2 sampler object wrapper that controls texture filtering and wrapping.
Creates a `WebGLSampler` on construction and updates its parameters whenever `scaleMode` or `wrapMode` changes. Bind the sampler to a texture unit with bind before issuing draw calls. Note: `premultiplyAlpha`, `generateMipMap`, and `flipY` are pixel-store parameters handled at texture upload time; this class only manages filter and wrap state.
new(gl: WebGL2RenderingContext, options: SamplerOptions): Sampler bind(textureUnit: number): this destroy(): void setScaleMode(scaleMode: ScaleModes): this setWrapMode(wrapMode: WrapModes): this sampler: WebGLSampler | null scaleMode: ScaleModes wrapMode: WrapModes