Interface DynamicTexture2D
"[dynamicTexture2DBrand]": true;
height: number;
invertY?: boolean;
sampler: GPUSampler;
texture: GPUTexture;
uAng?: number;
uOffset?: number;
uScale?: number;
view: GPUTextureView;
vOffset?: number;
vScale?: number;
width: number;
}
Hierarchy (View Summary)
- Texture2D
- DynamicTexture2D
Properties
Readonly[dynamic Texture2 D Brand]
Opaque nominal brand.
height
Optionalinvert Y
True if the texel data is stored with origin at the top (y-down) and must be flipped in V when sampled with standard (y-up) UVs. Applied at UV-transform time in the material, so compressed-format textures (where in-place row flipping is impractical) remain correct.
sampler
texture
Optionalu Ang
Rotation in radians around the (0,0) UV corner.
Optionalu Offset
Optionalu Scale
Per-texture UV transform fields. All optional; defaults make identity.
Match BJS Texture.uScale/vScale/uOffset/vOffset/uAng semantics. These
fields are build-time: they are sampled when a material pipeline
is first compiled. Mutating them after the pipeline is built requires
a material rebuild (flag-based rebuild path). If a cached texture
wrapper needs a different transform than another use site, create a
fresh wrapper via cloneTexture2D().
A Texture2D created by createDynamicTexture: allocated blank with
COPY_DST | RENDER_ATTACHMENTusage so it can be written repeatedly from an external-image source. It is aTexture2D(drops straight into any material texture slot), plus an opaque nominal brand that constrains updateDynamicTexture to accept only textures produced here — a plainTexture2DfromloadTexture2D/createTexture2DFromPixelsis rejected at compile time.