API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSpriteMaterial
Material specialization for Sprite drawables. The base texture stays on the sprite and is sampled through the engine's `sampleBase(slot, uv)` helper, which preserves batching and resolves the backend's premultiplied-alpha convention. The material supplies the custom fragment program, uniforms, additional texture bindings, and blend mode.
import { SpriteMaterial } from '@codexo/exojs'Material specialization for Sprite drawables.
The base texture stays on the sprite and is sampled through the engine's `sampleBase(slot, uv)` helper, which preserves batching and resolves the backend's premultiplied-alpha convention. The material supplies the custom fragment program, uniforms, additional texture bindings, and blend mode.
destroy(): voidonDispose(callback: () => void): voidsetTexture(name: string, texture: RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca… | TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…): thissetUniform(name: MaterialRawUniformNameA uniform name the raw path accepts; `never` once a schema is declared.<F, B>, value: UniformValueValue accepted by a material uniform on a shader source that declares no uniform schema. Scalars and small tuples auto-marshal to the appropriate `Float32Array…): thisfrom(source: ShaderImmutable shader source pair shared by Material instances. `Shader` owns only the GLSL/WGSL text and its stable identity; it carries no uniform/texture state (…<F, B>, options?: Omit<MaterialOptionsConstruction options shared by every Material. Only `shader` is required. What `uniforms` means follows from the shader source: on a source that declares a uni…<F, B>, "shader">): SpriteMaterial<F, B>from(glslVertex: string, glslFragment: string, options?: { blendMode?: BlendModesCompositing blend modes applied when drawing a Drawable over the current render target. Modes 0-4 are implemented as fixed-function GPU blend equations (no tex…; sampler?: SamplerOptionsGPU sampling state: how a texture is filtered and how UV coordinates outside `[0, 1]` are resolved. Sampling state is independent of a texture's pixel content,… | null; uniforms?: Record<string, UniformValueValue accepted by a material uniform on a shader source that declares no uniform schema. Scalars and small tuples auto-marshal to the appropriate `Float32Array…>; wgsl?: string }): SpriteMaterialtarget: "sprite"bindKey: numberpipelineKey: numbertextures: Record<string, RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca… | TextureA static GPU texture sourced from an image, canvas, or video element. Holds the pixel source, its sampling state (ScaleModes, WrapModes) and its upload state (…>