From 3bc2838360627f78a91a7cad81f3bc97711410c2 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 29 May 2022 14:50:55 -0500 Subject: refactor: move everything into src/ subdirectory --- modules/Terrain.js | 82 ------------------------------------------------------ 1 file changed, 82 deletions(-) delete mode 100644 modules/Terrain.js (limited to 'modules/Terrain.js') diff --git a/modules/Terrain.js b/modules/Terrain.js deleted file mode 100644 index ca0ab77..0000000 --- a/modules/Terrain.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -import Voronoi from './3rdparty/rhill-voronoi-core.js'; - -import { useAverage } from './Util.js'; -import { QuadTree } from './Geometry.js'; - - -/* from here on up, we always assume that points live in the range [(0,0), (1,1)) */ - -function lloydRelax(point_set, density) { - /* setup quadtree and averages */ - let tree = new QuadTree(1,1); - let averages = {}; - for (let i=0; i ({x: Math.random(), y: Math.random()}); - - let seed_points = []; - for (let i=0; i