Make descriptor access faster
This commit is contained in:
parent
7a7273c2be
commit
4f726ddac2
6 changed files with 54 additions and 65 deletions
|
|
@ -3,14 +3,12 @@ import { Drawable } from '../drawable';
|
|||
import { DrawableDescriptor } from '../drawable-descriptor';
|
||||
|
||||
export class CircleLight extends Drawable {
|
||||
public static get descriptor(): DrawableDescriptor {
|
||||
return {
|
||||
uniformName: 'circleLights',
|
||||
uniformCountMacroName: 'CIRCLE_LIGHT_COUNT',
|
||||
shaderCombinationSteps: [0, 1, 2, 4],
|
||||
empty: new CircleLight(vec2.fromValues(0, 0), vec3.fromValues(0, 0, 0), 0),
|
||||
};
|
||||
}
|
||||
public static readonly descriptor: DrawableDescriptor = {
|
||||
uniformName: 'circleLights',
|
||||
uniformCountMacroName: 'CIRCLE_LIGHT_COUNT',
|
||||
shaderCombinationSteps: [0, 1, 2, 4],
|
||||
empty: new CircleLight(vec2.fromValues(0, 0), vec3.fromValues(0, 0, 0), 0),
|
||||
};
|
||||
|
||||
constructor(public center: vec2, public color: vec3, public intensity: number) {
|
||||
super();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue