Improve color handling approach
This commit is contained in:
parent
e53ca905af
commit
f29293c475
22 changed files with 259 additions and 181 deletions
|
|
@ -4,8 +4,10 @@ import { Texture } from './texture';
|
|||
|
||||
/** @internal */
|
||||
export class PaletteTexture extends Texture {
|
||||
public static readonly textureUnitId = 2;
|
||||
|
||||
constructor(gl: UniversalRenderingContext, private readonly paletteSize: number) {
|
||||
super(gl, 1);
|
||||
super(gl, PaletteTexture.textureUnitId);
|
||||
}
|
||||
|
||||
public setPalette(colors: Array<vec3 | vec4>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue