A texture generated in code.
An abstraction rather than a set of free functions returning ByteData, so
that "which texture" is a value the demo can hold and the upload path is
written once. upload is the only place that touches the GPU, which keeps
encode testable on its own.
base: extend it, do not implement it. See Shape for the reasoning —
it is the same one, and it is why a texture added to this contract later
costs nobody a recompile.
- Implementers
Constructors
- ProceduralTexture()
-
const
Properties
Methods
-
encode(
) → ByteData - RGBA8 pixels, row-major from the top-left.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
upload(
GraphicsDevice device) → TextureHandle -
Uploads the pixels through
device.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited