Update to use new sdf-2d API

This commit is contained in:
schmelczerandras 2020-10-13 23:02:43 +02:00
parent 41ea5d7db9
commit f0a9c1df68
13 changed files with 38 additions and 41 deletions

View file

@ -1,9 +1,10 @@
import { vec2 } from 'gl-matrix';
import { Droplet } from 'sdf-2d';
import { DropletFactory } from 'sdf-2d';
import { Random } from '../../helper/random';
export const Droplet = DropletFactory(1);
export class DropletWrapper {
public readonly drawable: Droplet;
public readonly drawable: InstanceType<typeof Droplet>;
private speed = Random.getRandom() * 0.2 + 0.2;
private position = vec2.fromValues(