update add, data, geo to use gapp.register()

This commit is contained in:
Stewart Allen 2022-02-20 14:31:27 -05:00
commit 32e9ceca55
23 changed files with 504 additions and 489 deletions

View file

@ -2,11 +2,10 @@
"use strict";
(function() {
// dep: geo.base
gapp.register("geo.gyroid", [], (root, exports) => {
if (self.base.gyroid) return;
const base = self.base;
const { base } = root;
const PI2 = Math.PI * 2;
let cache = {};
@ -215,6 +214,8 @@ function distTo(a, b, dir) {
return Math.sqrt(dx * dx + dy * dy);
}
base.gyroid = { slice };
gapp.overlay(base, {
gyroid: { slice }
})
})();
});