Make physics more fun
This commit is contained in:
parent
155e360c8e
commit
89fafeafd3
1 changed files with 509 additions and 332 deletions
15
shared/src/objects/types/planet-base.ts
Normal file
15
shared/src/objects/types/planet-base.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { vec2 } from 'gl-matrix';
|
||||
import { Id } from '../../transport/identity';
|
||||
import { serializable } from '../../transport/serialization/serializable';
|
||||
import { GameObject } from '../game-object';
|
||||
|
||||
@serializable
|
||||
export class PlanetBase extends GameObject {
|
||||
constructor(id: Id, public readonly vertices: Array<vec2>) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public toArray(): Array<any> {
|
||||
return [this.id, this.vertices];
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue