fix: mask

This commit is contained in:
cha0s 2021-03-28 21:18:10 -05:00
parent edc4d195b7
commit 637163d201

View File

@ -6,6 +6,7 @@ import {
} from '@avocado/graphics';
import {
noise,
TAU,
Vector,
Vertice,
} from '@avocado/math';
@ -216,13 +217,13 @@ export default class TilesView extends Container {
) {
const [x, y] = points[k];
const ANGLE_SCALE = 1000;
const WALK_SCALE = 1000;
const WALK_SCALE = 10;
const MAGNITUDE = 6 * noise(Vector.scale([x, y], 100));
const [vx, vy] = Vector.add(
points[k],
Vector.scale(
Vector.scale(
Vector.fromRadians(Math.PI * noise(Vector.scale([x, y], ANGLE_SCALE))),
Vector.fromRadians(TAU * noise(Vector.scale([x, y], ANGLE_SCALE))),
noise(Vector.scale([x, y], WALK_SCALE)),
),
MAGNITUDE,