Make physics more fun
This commit is contained in:
parent
155e360c8e
commit
89fafeafd3
1 changed files with 509 additions and 332 deletions
|
|
@ -2,7 +2,7 @@ import { vec2, vec3 } from 'gl-matrix';
|
|||
import { LampBase, settings, id, serializesTo } from 'shared';
|
||||
|
||||
import { ImmutableBoundingBox } from '../physics/bounding-boxes/immutable-bounding-box';
|
||||
import { StaticPhysical } from '../physics/containers/static-physical';
|
||||
import { StaticPhysical } from '../physics/physicals/static-physical';
|
||||
|
||||
@serializesTo(LampBase)
|
||||
export class LampPhysical extends LampBase implements StaticPhysical {
|
||||
|
|
@ -32,6 +32,10 @@ export class LampPhysical extends LampBase implements StaticPhysical {
|
|||
return this;
|
||||
}
|
||||
|
||||
public getForce(_: vec2): vec2 {
|
||||
return vec2.create();
|
||||
}
|
||||
|
||||
public distance(target: vec2): number {
|
||||
return vec2.distance(this.center, target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue