Refactor shapes
This commit is contained in:
parent
eb39846b75
commit
006ab3c4e6
24 changed files with 203 additions and 256 deletions
|
|
@ -2,7 +2,6 @@ import { ILight } from './i-light';
|
|||
import { vec2, vec3 } from 'gl-matrix';
|
||||
import { IDrawableDescriptor } from '../i-drawable-descriptor';
|
||||
import { settings } from '../../settings';
|
||||
import { ImmutableBoundingBox } from '../../../physics/containers/immutable-bounding-box';
|
||||
import { GameObject } from '../../../objects/game-object';
|
||||
|
||||
export class PointLight implements ILight {
|
||||
|
|
@ -20,16 +19,10 @@ export class PointLight implements ILight {
|
|||
public lightness: number
|
||||
) {}
|
||||
|
||||
boundingBox: ImmutableBoundingBox;
|
||||
|
||||
public distance(target: vec2): number {
|
||||
return vec2.distance(this.center, target) - this.radius;
|
||||
}
|
||||
|
||||
public minimumDistance(target: vec2): number {
|
||||
return vec2.distance(this.center, target) - this.radius;
|
||||
}
|
||||
|
||||
public serializeToUniforms(uniforms: any): void {
|
||||
const listName = PointLight.descriptor.uniformName;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue