SpriteMaterial constructor
SpriteMaterial({
- TextureSource? colorTexture,
Creates a SpriteMaterial, optionally textured.
When colorTexture is null a 1x1 white placeholder is used, so the
sprite reduces to a flat tint times the per-instance color.
Implementation
SpriteMaterial({this.colorTexture}) {
setFragmentShader(baseShaderLibrary['SpriteFragment']!);
}