Add better object updates
This commit is contained in:
parent
fd80a299b6
commit
e83c58e1a5
29 changed files with 289 additions and 123 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { vec2 } from 'gl-matrix';
|
||||
import { Drawable, Renderer } from 'sdf-2d';
|
||||
import { CommandExecutors, Id, Random, PlanetBase } from 'shared';
|
||||
import { CommandExecutors, Id, Random, PlanetBase, UpdateMessage } from 'shared';
|
||||
import { RenderCommand } from '../commands/types/render';
|
||||
import { Polygon } from '../shapes/polygon';
|
||||
import { ViewObject } from './view-object';
|
||||
|
|
@ -18,6 +18,10 @@ export class PlanetView extends PlanetBase implements ViewObject {
|
|||
(this.shape as any).randomOffset = Random.getRandom();
|
||||
}
|
||||
|
||||
public update(message: Array<UpdateMessage>): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
public step(deltaTimeInMilliseconds: number): void {
|
||||
(this.shape as any).randomOffset += deltaTimeInMilliseconds / 4000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue