Make descriptor access faster

This commit is contained in:
schmelczerandras 2020-09-19 17:31:03 +02:00
parent 7a7273c2be
commit 4f726ddac2
6 changed files with 54 additions and 65 deletions

View file

@ -2,9 +2,8 @@ import { mat2d, vec2 } from 'gl-matrix';
import { DrawableDescriptor } from './drawable-descriptor';
export abstract class Drawable {
static get descriptor(): DrawableDescriptor {
throw new Error('This getter should be overriden');
}
// This should be overriden by inherited classes
public static readonly descriptor: DrawableDescriptor;
public abstract distance(target: vec2): number;