@margoengine/inspector 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/NOTICE +4 -4
- package/README.md +623 -623
- package/dist/animation.js +4 -4
- package/dist/edit.js +4 -4
- package/dist/frame.js +4 -4
- package/dist/gizmo.js +4 -4
- package/dist/gl.js +4 -4
- package/dist/index.js +4 -4
- package/dist/mesh-debug.js +42 -42
- package/dist/packages.js +7 -7
- package/dist/remote.js +4 -4
- package/dist/shaders.js +4 -4
- package/dist/textures.js +2 -2
- package/dist/tools.js +4 -4
- package/package.json +149 -149
package/dist/animation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const n=(engine,version="
|
|
3
|
+
const n=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { r as e, t } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { engineRuntime as __margoRuntime } from "@margoengine/core/extension";
|
|
6
6
|
import { SkeletonHelper as r } from "@margoengine/lines";
|
|
@@ -52,8 +52,8 @@ function c(e, t, n) {
|
|
|
52
52
|
for (let i = 0; i < e.length; i++) e[i] += (t.morphs[r][i] - e[i]) * n;
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
var l = 0, u = class i {coreRequirement=__margoCoreRequirement("
|
|
56
|
-
static attach(e, t, n = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
55
|
+
var l = 0, u = class i {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
56
|
+
static attach(e, t, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
57
57
|
let r = new i(e, n);
|
|
58
58
|
try {
|
|
59
59
|
e.use(r);
|
package/dist/edit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const s=(engine,version="
|
|
3
|
+
const s=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { t as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { r as t } from "./mesh-source-BSQA_1GQ.js";
|
|
6
6
|
import { n, t as r } from "./edit-state-Dm3G17js.js";
|
|
@@ -23,7 +23,7 @@ var S = {
|
|
|
23
23
|
ring: h,
|
|
24
24
|
torusKnot: v
|
|
25
25
|
}, C = 0, w = class l {
|
|
26
|
-
static attach(e, t, n = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
26
|
+
static attach(e, t, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
27
27
|
return new l(e, t, n);
|
|
28
28
|
}
|
|
29
29
|
constructor(t, n, r = {}) {
|
|
@@ -99,7 +99,7 @@ var S = {
|
|
|
99
99
|
d && (this.observer = new d(() => this.refresh()), this.observer.observe(this.tree, {
|
|
100
100
|
childList: !0,
|
|
101
101
|
subtree: !0
|
|
102
|
-
}), this.observer.observe(n.element.parentNode, { childList: !0 })), i.use({coreRequirement:/*@__PURE__*/__margoCoreRequirement("
|
|
102
|
+
}), this.observer.observe(n.element.parentNode, { childList: !0 })), i.use({coreRequirement:/*@__PURE__*/__margoCoreRequirement("1.0.0",import.meta.url),
|
|
103
103
|
name: this.pluginName,
|
|
104
104
|
setup() {},
|
|
105
105
|
onPreUpdate: () => this.syncLights(),
|
package/dist/frame.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const n=(engine,version="
|
|
3
|
+
const n=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { n as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { r as t } from "./mesh-source-BSQA_1GQ.js";
|
|
6
6
|
import { engineRuntime as __margoRuntime } from "@margoengine/core/extension";
|
|
@@ -258,13 +258,13 @@ var E = class {
|
|
|
258
258
|
this.live = !1, this.cpu = performance.now() - this.start;
|
|
259
259
|
for (let e of this.unpatch.reverse()) e();
|
|
260
260
|
}
|
|
261
|
-
}, D = class i {coreRequirement=__margoCoreRequirement("
|
|
261
|
+
}, D = class i {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
262
262
|
constructor({ parent: e } = {}) {
|
|
263
263
|
this.name = "frame-debugger", this.report = null, this.disposed = !1, this.paused = !1, this.unpatchDevice = [], this.tracked = /* @__PURE__ */ new Set(), this.pipelines = /* @__PURE__ */ new WeakMap(), this.groups = /* @__PURE__ */ new WeakMap(), this.views = /* @__PURE__ */ new WeakMap();
|
|
264
264
|
let t = e === void 0 ? typeof document > "u" ? null : document.body : e;
|
|
265
265
|
t && (this.panel = new l(t, () => this.captureFromPanel(), (e) => this.select(e)));
|
|
266
266
|
}
|
|
267
|
-
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
267
|
+
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
268
268
|
let r = new i(t);
|
|
269
269
|
try {
|
|
270
270
|
return n(e).use(r), r;
|
package/dist/gizmo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const t=(engine,version="
|
|
3
|
+
const t=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { t as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { engineRuntime as __margoRuntime, meshRuntime as n } from "@margoengine/core/extension";
|
|
6
6
|
import { TransformControls as r } from "@margoengine/controls/transform";
|
|
@@ -17,7 +17,7 @@ var i = [
|
|
|
17
17
|
"sy",
|
|
18
18
|
"sz"
|
|
19
19
|
], a = 0, o = class o {
|
|
20
|
-
static attach(e, t, n = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
20
|
+
static attach(e, t, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
21
21
|
return new o(e, t, n);
|
|
22
22
|
}
|
|
23
23
|
constructor(n, i, o = {}) {
|
|
@@ -45,7 +45,7 @@ var i = [
|
|
|
45
45
|
let n = Reflect.get(e, t, e);
|
|
46
46
|
return typeof n == "function" ? n.bind(e) : n;
|
|
47
47
|
} }), l = this.scene = this.runtime.sceneOf(i), u;
|
|
48
|
-
l.use({coreRequirement:/*@__PURE__*/__margoCoreRequirement("
|
|
48
|
+
l.use({coreRequirement:/*@__PURE__*/__margoCoreRequirement("1.0.0",import.meta.url),
|
|
49
49
|
name: this.pluginName,
|
|
50
50
|
setup: () => {
|
|
51
51
|
u = r.attach(n, {
|
package/dist/gl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const a=(engine,version="
|
|
3
|
+
const a=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { t as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { n as t, t as n } from "./debug-geometry-D61TEkP9.js";
|
|
6
6
|
import { n as r } from "./view-rect-CTC0iGjf.js";
|
|
@@ -146,8 +146,8 @@ function g(t) {
|
|
|
146
146
|
for (let e of r) t.deleteShader(e);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
var _ = 0, v = class u {coreRequirement=__margoCoreRequirement("
|
|
150
|
-
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
149
|
+
var _ = 0, v = class u {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
150
|
+
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
151
151
|
let n = new u(e, t);
|
|
152
152
|
try {
|
|
153
153
|
return e.use(n), n;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const d=(engine,version="
|
|
3
|
+
const d=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { n as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { n as t, t as n } from "./debug-geometry-D61TEkP9.js";
|
|
6
6
|
import { n as r } from "./view-rect-CTC0iGjf.js";
|
|
@@ -13,7 +13,7 @@ import { engineRuntime as __margoRuntime, meshRuntime as f } from "@margoengine/
|
|
|
13
13
|
import { BoxHelper as p, LightsHelper as m, Lines as h, VertexNormalsHelper as g } from "@margoengine/lines";
|
|
14
14
|
import { meshWorldMatrix as _ } from "@margoengine/math/mesh";
|
|
15
15
|
//#region src/index.ts
|
|
16
|
-
var v = "\n:host{position:fixed;right:12px;top:12px;width:280px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);z-index:10001;display:block;color:#202226;font:12px/1.4 system-ui;letter-spacing:0}\n@media(max-width:560px){:host{top:150px;max-height:calc(100dvh - 162px)}section{max-height:calc(100dvh - 162px)!important}}\n*{box-sizing:border-box}section{background:#fafbfc;border:1px solid #b9bec7;border-radius:4px;max-height:calc(100dvh - 24px);overflow:auto}\nh2{font-size:14px;margin:0;padding:10px 12px;border-bottom:1px solid #d5d9df}fieldset{border:0;border-bottom:1px solid #d5d9df;padding:10px 12px;margin:0}legend{padding:6px 0 0;font-weight:600}\nlabel{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}input{max-width:100%;min-width:0;font:inherit}input[type=number]{width:72px}input[type=text]{width:156px}input[type=range]{width:132px;accent-color:#087e67}input[type=checkbox]{accent-color:#087e67}\nbutton{font:inherit;border:0;background:none;color:inherit;cursor:pointer}button:focus-visible,[role=treeitem]:focus-visible{outline:2px solid #087e67;outline-offset:-2px}\n[role=tree]{max-height:220px;overflow:auto;padding:6px 0}.row{display:flex;align-items:center;min-height:28px;padding-right:8px}.row button{flex:none;width:24px;height:24px;padding:0}.name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n[aria-selected=true]>.row{background:#d6eee7;color:#084f40}.muted{opacity:.55}[role=group]{padding-left:12px}.axes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.axes label{display:block}.axes input{width:100%}input:disabled{opacity:.5}\nfieldset.bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}fieldset.bar button{border:1px solid #b9bec7;border-radius:3px;padding:3px 9px;background:#fff}button:disabled{opacity:.45;cursor:default}input[type=color]{width:48px;height:24px;padding:0}input[data-search]{flex:1 1 100%;width:auto}.status{flex:1 1 100%;min-height:1.4em;color:#555}details{border-bottom:1px solid #d5d9df;padding:6px 12px}summary{cursor:pointer;font-weight:600}pre{margin:6px 0 0;max-height:240px;overflow:auto;white-space:pre-wrap;font:11px/1.35 ui-monospace,monospace;user-select:text}\n", y = class s {coreRequirement=__margoCoreRequirement("
|
|
16
|
+
var v = "\n:host{position:fixed;right:12px;top:12px;width:280px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);z-index:10001;display:block;color:#202226;font:12px/1.4 system-ui;letter-spacing:0}\n@media(max-width:560px){:host{top:150px;max-height:calc(100dvh - 162px)}section{max-height:calc(100dvh - 162px)!important}}\n*{box-sizing:border-box}section{background:#fafbfc;border:1px solid #b9bec7;border-radius:4px;max-height:calc(100dvh - 24px);overflow:auto}\nh2{font-size:14px;margin:0;padding:10px 12px;border-bottom:1px solid #d5d9df}fieldset{border:0;border-bottom:1px solid #d5d9df;padding:10px 12px;margin:0}legend{padding:6px 0 0;font-weight:600}\nlabel{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}input{max-width:100%;min-width:0;font:inherit}input[type=number]{width:72px}input[type=text]{width:156px}input[type=range]{width:132px;accent-color:#087e67}input[type=checkbox]{accent-color:#087e67}\nbutton{font:inherit;border:0;background:none;color:inherit;cursor:pointer}button:focus-visible,[role=treeitem]:focus-visible{outline:2px solid #087e67;outline-offset:-2px}\n[role=tree]{max-height:220px;overflow:auto;padding:6px 0}.row{display:flex;align-items:center;min-height:28px;padding-right:8px}.row button{flex:none;width:24px;height:24px;padding:0}.name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n[aria-selected=true]>.row{background:#d6eee7;color:#084f40}.muted{opacity:.55}[role=group]{padding-left:12px}.axes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.axes label{display:block}.axes input{width:100%}input:disabled{opacity:.5}\nfieldset.bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}fieldset.bar button{border:1px solid #b9bec7;border-radius:3px;padding:3px 9px;background:#fff}button:disabled{opacity:.45;cursor:default}input[type=color]{width:48px;height:24px;padding:0}input[data-search]{flex:1 1 100%;width:auto}.status{flex:1 1 100%;min-height:1.4em;color:#555}details{border-bottom:1px solid #d5d9df;padding:6px 12px}summary{cursor:pointer;font-weight:600}pre{margin:6px 0 0;max-height:240px;overflow:auto;white-space:pre-wrap;font:11px/1.35 ui-monospace,monospace;user-select:text}\n", y = class s {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
17
17
|
constructor({ parent: e = document.body, effects: t, pick: n = !0, historyLimit: r = 200, label: a } = {}) {
|
|
18
18
|
if (this.name = "inspector", this.debug = {
|
|
19
19
|
wireframe: !1,
|
|
@@ -175,7 +175,7 @@ var v = "\n:host{position:fixed;right:12px;top:12px;width:280px;max-width:calc(1
|
|
|
175
175
|
}
|
|
176
176
|
e.append(this.element), this.refresh(), this.timer = setInterval(() => this.refresh(), 250);
|
|
177
177
|
}
|
|
178
|
-
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
178
|
+
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
179
179
|
let n = new s(t);
|
|
180
180
|
try {
|
|
181
181
|
return d(e).use(n), n;
|
package/dist/mesh-debug.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const l=(engine,version="
|
|
3
|
+
const l=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { i as e, r as t, t as n } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { n as r, t as i } from "./mesh-source-BSQA_1GQ.js";
|
|
6
6
|
import { n as a, r as o, t as s } from "./view-rect-CTC0iGjf.js";
|
|
@@ -118,7 +118,7 @@ var y = (e) => typeof e == "string" && e.endsWith("float"), b = (e) => /^#([\da-
|
|
|
118
118
|
"uv1",
|
|
119
119
|
"vertex-colors",
|
|
120
120
|
"material-ids"
|
|
121
|
-
], S =
|
|
121
|
+
], S = {
|
|
122
122
|
mode: "wireframe",
|
|
123
123
|
multiply: null,
|
|
124
124
|
meshes: null,
|
|
@@ -133,23 +133,23 @@ var y = (e) => typeof e == "string" && e.endsWith("float"), b = (e) => /^#([\da-
|
|
|
133
133
|
specularColor: "#303030",
|
|
134
134
|
specularPower: 32,
|
|
135
135
|
materialColors: []
|
|
136
|
-
},
|
|
137
|
-
function
|
|
136
|
+
}, C = (e) => e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4, w = (e) => typeof e == "number" && e >= 0 && e <= 1;
|
|
137
|
+
function T(t, n) {
|
|
138
138
|
if (typeof t == "string") {
|
|
139
139
|
let e = b(t);
|
|
140
140
|
if (e >= 0) return [
|
|
141
141
|
16,
|
|
142
142
|
8,
|
|
143
143
|
0
|
|
144
|
-
].map((t) =>
|
|
145
|
-
} else if (Array.isArray(t) && t.length === 3 && t.every(
|
|
144
|
+
].map((t) => C((e >> t & 255) / 255));
|
|
145
|
+
} else if (Array.isArray(t) && t.length === 3 && t.every(w)) return [
|
|
146
146
|
t[0],
|
|
147
147
|
t[1],
|
|
148
148
|
t[2]
|
|
149
149
|
];
|
|
150
|
-
throw e(`MeshDebugView ${n} must be '#rgb', '#rrggbb' or three linear numbers in 0..1`,
|
|
150
|
+
throw e(`MeshDebugView ${n} must be '#rgb', '#rrggbb' or three linear numbers in 0..1`, "mesh-debug-view");
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function E(e) {
|
|
153
153
|
let t = e * .6180339887498949 % 1, n = e % 2 ? .75 : .95;
|
|
154
154
|
return [
|
|
155
155
|
5,
|
|
@@ -157,16 +157,16 @@ function D(e) {
|
|
|
157
157
|
1
|
|
158
158
|
].map((e) => {
|
|
159
159
|
let r = (e + t * 6) % 6;
|
|
160
|
-
return
|
|
160
|
+
return C(n * (1 - .7 * Math.max(0, Math.min(r, 4 - r, 1))));
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
var
|
|
163
|
+
var D = "\nstruct View {camera:mat4x4f,model:mat4x4f,eye:vec4f,viewport:vec4f,wire:vec4f,dot:vec4f,checkA:vec4f,checkB:vec4f,\n base:vec4f,specular:vec4f,params:vec4f,offsets:vec4f,flags:vec4f}\n@group(0) @binding(0) var<uniform> u:View;\n@group(0) @binding(1) var<storage,read> vertices:array<f32>;\n@group(0) @binding(2) var<storage,read> indices:array<u32>;\nstruct Out {@builtin(position) clip:vec4f,@location(0) bary:vec3f,@location(1) position:vec3f,@location(2) normal:vec3f,\n @location(3) uv:vec4f,@location(4) color:vec3f,@location(5) @interpolate(flat) ab:vec4f,\n @location(6) @interpolate(flat) c:vec3f}\nfn read2(at:u32)->vec2f{return vec2f(vertices[at],vertices[at+1u]);}\nfn read3(at:u32)->vec3f{return vec3f(vertices[at],vertices[at+1u],vertices[at+2u]);}\n@vertex fn vertex(@builtin(vertex_index) id:u32,@location(5) m0:vec4f,@location(6) m1:vec4f,@location(7) m2:vec4f,\n @location(8) m3:vec4f)->Out{\n let model=u.model*mat4x4f(m0,m1,m2,m3);\n let stride=u32(u.offsets.x);let corner=id%3u;let first=id-corner;\n var screen=array<vec2f,3>();\n for(var k=0u;k<3u;k++){\n let q=u.camera*(model*vec4f(read3(indices[first+k]*stride),1.0));\n screen[k]=select(vec2f(-1e6),(q.xy/q.w*vec2f(0.5,-0.5)+0.5)*u.viewport.zw+u.viewport.xy,q.w>0.0);\n }\n let at=indices[id]*stride;\n let world=model*vec4f(read3(at),1.0);\n let a=model[0].xyz;let b=model[1].xyz;let c=model[2].xyz;\n var o:Out;\n o.clip=u.camera*world;\n o.bary=vec3f(f32(corner==0u),f32(corner==1u),f32(corner==2u));\n o.position=world.xyz;\n o.normal=mat3x3f(cross(b,c),cross(c,a),cross(a,b))*read3(at+u32(u.offsets.y));\n o.uv=vec4f(0.0);\n if(u.offsets.z>0.0){\n let t=at+u32(u.offsets.z);\n o.uv=vec4f(read2(t),0.0,0.0);\n if(u.offsets.w>0.0){o.uv=vec4f(o.uv.xy,read2(t+2u));}\n }\n o.color=vec3f(1.0);\n if(u.offsets.w>0.0){o.color=read3(at+u32(u.offsets.w));}\n o.ab=vec4f(screen[0],screen[1]);\n o.c=vec3f(screen[2],select(0.0,1.0,dot(a,cross(b,c))<0.0));\n return o;\n}\nfn encode(c:vec3f)->vec3f{\n if(u.flags.y>0.5){return c;}\n let v=clamp(c,vec3f(0.0),vec3f(1.0));\n return select(1.055*pow(v,vec3f(1.0/2.4))-0.055,v*12.92,v<=vec3f(0.0031308));\n}\n@fragment fn fragment(i:Out,@builtin(front_facing) facing:bool)->@location(0) vec4f{\n let mode=u32(u.params.w);let pass_=u32(u.flags.x);\n let gx=dpdx(i.bary);let gy=dpdy(i.bary);\n let uv=select(i.uv.xy,i.uv.zw,mode==5u)*u.params.z+2e-5;\n let w=max(fwidth(uv),vec2f(1e-5));\n let front=facing!=(i.c.z>0.5);\n if((u.flags.z==1.0&&!front)||(u.flags.z==2.0&&front)){discard;}\n var surface=u.base.rgb;\n if(mode==4u||mode==5u){\n let s=2.0*(abs(fract((uv-0.5*w)*0.5)-0.5)-abs(fract((uv+0.5*w)*0.5)-0.5))/w;\n surface=mix(u.checkA.rgb,u.checkB.rgb,clamp(0.5-0.5*s.x*s.y,0.0,1.0));\n }\n if(mode==6u){surface=i.color;}\n let view=u.eye.xyz-i.position*u.eye.w;\n let ndv=min(abs(dot(i.normal,view))/max(length(i.normal)*length(view),1e-20),1.0);\n if(mode!=6u&&(pass_==0u||mode==0u)){surface=surface*ndv+u.specular.rgb*pow(ndv,u.specular.w);}\n var wire=0.0;var point=0.0;\n if((mode==1u||mode==3u)&&u.params.x>0.0){\n let d=i.bary/max(sqrt(gx*gx+gy*gy),vec3f(1e-8));\n wire=clamp(u.params.x*0.5+0.5-min(d.x,min(d.y,d.z)),0.0,1.0);\n }\n if((mode==2u||mode==3u)&&u.params.y>0.0){\n let p=i.clip.xy;\n let d=min(distance(p,i.ab.xy),min(distance(p,i.ab.zw),distance(p,i.c.xy)));\n point=clamp(u.params.y+0.5-d,0.0,1.0);\n }\n if(pass_==2u){\n let alpha=point+wire*(1.0-point);\n if(alpha<=0.0){discard;}\n let color=(u.wire.rgb*wire*(1.0-point)+u.dot.rgb*point)/alpha;\n return vec4f(encode(color)*alpha,alpha);\n }\n return vec4f(encode(mix(mix(surface,u.wire.rgb,wire),u.dot.rgb,point)),1.0);\n}", O = /* @__PURE__ */ new Float32Array(24);
|
|
164
|
+
O[0] = O[5] = O[10] = O[15] = 1;
|
|
165
|
+
var k = 76, A = 4, j = class d {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
166
166
|
constructor(e = {}) {
|
|
167
|
-
this.name = "inspector:mesh-debug:" +
|
|
167
|
+
this.name = "inspector:mesh-debug:" + M++, this.multiplied = null, this.ids = /* @__PURE__ */ new WeakMap(), this.nextId = 0, this.frame = -1, this.disposed = !1, this.pipelines = /* @__PURE__ */ new Map(), this.records = /* @__PURE__ */ new Map(), this.uploads = /* @__PURE__ */ new Map(), this.values = new Float32Array(k), this.attachments = _(), this.set(e);
|
|
168
168
|
}
|
|
169
|
-
static attach(e, t) {__margoAssertCore(e,__margoCoreRequirement("
|
|
169
|
+
static attach(e, t) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
170
170
|
let n = new d(t);
|
|
171
171
|
return l(e).use(n), n;
|
|
172
172
|
}
|
|
@@ -174,36 +174,36 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
174
174
|
return this.settings;
|
|
175
175
|
}
|
|
176
176
|
set(r) {
|
|
177
|
-
if (this.disposed) throw n("disposed", "MeshDebugView was disposed; attach a new MeshDebugView",
|
|
178
|
-
if (!r || typeof r != "object") throw e("MeshDebugView options must be an object; pass { mode: ... }",
|
|
179
|
-
for (let t of Object.keys(r)) if (!Object.hasOwn(
|
|
177
|
+
if (this.disposed) throw n("disposed", "MeshDebugView was disposed; attach a new MeshDebugView", "mesh-debug-view");
|
|
178
|
+
if (!r || typeof r != "object") throw e("MeshDebugView options must be an object; pass { mode: ... }", "mesh-debug-view");
|
|
179
|
+
for (let t of Object.keys(r)) if (!Object.hasOwn(S, t)) throw e(`MeshDebugView has no option '${t}'; use ${Object.keys(S).join(", ")}`, "mesh-debug-view");
|
|
180
180
|
let i = Object.fromEntries(Object.entries(r).filter(([, e]) => e !== void 0)), a = {
|
|
181
|
-
...
|
|
181
|
+
...S,
|
|
182
182
|
...this.settings,
|
|
183
183
|
...i
|
|
184
184
|
}, o = r.multiply === void 0 ? this.multiplied : r.multiply;
|
|
185
|
-
if (!x.includes(a.mode)) throw e(`MeshDebugView mode must be one of ${x.join(", ")}`,
|
|
186
|
-
if (o !== null && typeof o != "boolean") throw e("MeshDebugView multiply must be true, false or null",
|
|
187
|
-
if (typeof a.enabled != "boolean") throw e("MeshDebugView enabled must be true or false",
|
|
185
|
+
if (!x.includes(a.mode)) throw e(`MeshDebugView mode must be one of ${x.join(", ")}`, "mesh-debug-view");
|
|
186
|
+
if (o !== null && typeof o != "boolean") throw e("MeshDebugView multiply must be true, false or null", "mesh-debug-view");
|
|
187
|
+
if (typeof a.enabled != "boolean") throw e("MeshDebugView enabled must be true or false", "mesh-debug-view");
|
|
188
188
|
let s = (e, n, r) => {
|
|
189
189
|
let i = a[e];
|
|
190
|
-
if (!(typeof i == "number" && i >= n && i <= r)) throw t(`MeshDebugView ${e} must be a number from ${n} to ${r}`,
|
|
190
|
+
if (!(typeof i == "number" && i >= n && i <= r)) throw t(`MeshDebugView ${e} must be a number from ${n} to ${r}`, "mesh-debug-view");
|
|
191
191
|
};
|
|
192
|
-
if (s("wireWidth", 0, 64), s("vertexRadius", 0, 64), s("uvScale", 1e-6, 4096), s("specularPower", 1, 1e4), !Array.isArray(a.uvColors) || a.uvColors.length !== 2) throw e("MeshDebugView uvColors must be two colours",
|
|
193
|
-
if (!Array.isArray(a.materialColors) || a.materialColors.length > 4096) throw e("MeshDebugView materialColors must be an array of at most 4096 colours",
|
|
192
|
+
if (s("wireWidth", 0, 64), s("vertexRadius", 0, 64), s("uvScale", 1e-6, 4096), s("specularPower", 1, 1e4), !Array.isArray(a.uvColors) || a.uvColors.length !== 2) throw e("MeshDebugView uvColors must be two colours", "mesh-debug-view");
|
|
193
|
+
if (!Array.isArray(a.materialColors) || a.materialColors.length > 4096) throw e("MeshDebugView materialColors must be an array of at most 4096 colours", "mesh-debug-view");
|
|
194
194
|
let c = a.meshes;
|
|
195
195
|
if (i.meshes !== void 0 && i.meshes !== null) {
|
|
196
|
-
if (c = typeof i.meshes == "object" && Symbol.iterator in i.meshes ? [...i.meshes] : null, !c || !c.every((e) => e && typeof e == "object" && typeof e.id == "number")) throw e("MeshDebugView meshes must be a list of meshes or null",
|
|
196
|
+
if (c = typeof i.meshes == "object" && Symbol.iterator in i.meshes ? [...i.meshes] : null, !c || !c.every((e) => e && typeof e == "object" && typeof e.id == "number")) throw e("MeshDebugView meshes must be a list of meshes or null", "mesh-debug-view");
|
|
197
197
|
Object.freeze(c);
|
|
198
198
|
}
|
|
199
199
|
let l = {
|
|
200
|
-
wire:
|
|
201
|
-
dot:
|
|
202
|
-
a:
|
|
203
|
-
b:
|
|
204
|
-
diffuse:
|
|
205
|
-
specular:
|
|
206
|
-
materials: a.materialColors.map((e, t) =>
|
|
200
|
+
wire: T(a.wireColor, "wireColor"),
|
|
201
|
+
dot: T(a.vertexColor, "vertexColor"),
|
|
202
|
+
a: T(a.uvColors[0], "uvColors[0]"),
|
|
203
|
+
b: T(a.uvColors[1], "uvColors[1]"),
|
|
204
|
+
diffuse: T(a.diffuseColor, "diffuseColor"),
|
|
205
|
+
specular: T(a.specularColor, "specularColor"),
|
|
206
|
+
materials: a.materialColors.map((e, t) => T(e, `materialColors[${t}]`))
|
|
207
207
|
};
|
|
208
208
|
return this.colors = l, this.multiplied = o, this.settings = Object.freeze({
|
|
209
209
|
...a,
|
|
@@ -215,9 +215,9 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
215
215
|
this.ids = /* @__PURE__ */ new WeakMap(), this.nextId = 0;
|
|
216
216
|
}
|
|
217
217
|
setup(e) {
|
|
218
|
-
if (this.disposed) throw n("disposed", "MeshDebugView was disposed; attach a new MeshDebugView",
|
|
218
|
+
if (this.disposed) throw n("disposed", "MeshDebugView was disposed; attach a new MeshDebugView", "mesh-debug-view");
|
|
219
219
|
let t = e.gpu?.limits;
|
|
220
|
-
if (!t || t.maxStorageBuffersInVertexStage === 0) throw n("unsupported", "MeshDebugView reads vertices from storage buffers; create the engine on WebGPU or the WebGL2 compatibility layer",
|
|
220
|
+
if (!t || t.maxStorageBuffersInVertexStage === 0) throw n("unsupported", "MeshDebugView reads vertices from storage buffers; create the engine on WebGPU or the WebGL2 compatibility layer", "mesh-debug-view");
|
|
221
221
|
this.engine = e;
|
|
222
222
|
}
|
|
223
223
|
registerPasses(e) {
|
|
@@ -242,7 +242,7 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
242
242
|
let a = this.uploads.get(n);
|
|
243
243
|
if (!a || a.tag !== r) {
|
|
244
244
|
let o = i();
|
|
245
|
-
if (o.byteLength > Math.min(e.limits.maxStorageBufferBindingSize, e.limits.maxBufferSize)) throw t(`MeshDebugView needs a ${o.byteLength}-byte storage buffer, over this device's limit; split the mesh or leave it out of meshes`,
|
|
245
|
+
if (o.byteLength > Math.min(e.limits.maxStorageBufferBindingSize, e.limits.maxBufferSize)) throw t(`MeshDebugView needs a ${o.byteLength}-byte storage buffer, over this device's limit; split the mesh or leave it out of meshes`, "mesh-debug-view");
|
|
246
246
|
a && m(e, a.buffer);
|
|
247
247
|
let s = e.createBuffer({
|
|
248
248
|
size: o.byteLength,
|
|
@@ -262,7 +262,7 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
262
262
|
size: 96,
|
|
263
263
|
usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST
|
|
264
264
|
});
|
|
265
|
-
return n.queue.writeBuffer(e, 0,
|
|
265
|
+
return n.queue.writeBuffer(e, 0, O), e;
|
|
266
266
|
})();
|
|
267
267
|
for (let d of this.settings.meshes ?? o.meshes.values()) {
|
|
268
268
|
let f = d;
|
|
@@ -337,7 +337,7 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
337
337
|
t
|
|
338
338
|
].join(":"), a = this.pipelines.get(i);
|
|
339
339
|
if (a) return a;
|
|
340
|
-
let o = e.device, s = n.depthCompare?.startsWith("greater") ?? !1, c = this.module ??= o.createShaderModule({ code:
|
|
340
|
+
let o = e.device, s = n.depthCompare?.startsWith("greater") ?? !1, c = this.module ??= o.createShaderModule({ code: D }), l = t === 1 ? {
|
|
341
341
|
color: {
|
|
342
342
|
operation: "add",
|
|
343
343
|
srcFactor: "dst",
|
|
@@ -383,7 +383,7 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
383
383
|
format: n.format,
|
|
384
384
|
depthCompare: s ? "greater-equal" : "less-equal",
|
|
385
385
|
depthWriteEnabled: t === 0,
|
|
386
|
-
depthBias: s ?
|
|
386
|
+
depthBias: s ? A : -4,
|
|
387
387
|
depthBiasSlopeScale: s ? 1 : -1
|
|
388
388
|
},
|
|
389
389
|
multisample: e.descriptor.multisample
|
|
@@ -470,7 +470,7 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
470
470
|
let a = u.diffuse;
|
|
471
471
|
if (t.mode === "material-ids") {
|
|
472
472
|
let e = this.ids.get(r.material);
|
|
473
|
-
e === void 0 && this.ids.set(r.material, e = this.nextId++), a = u.materials[e] ??
|
|
473
|
+
e === void 0 && this.ids.set(r.material, e = this.nextId++), a = u.materials[e] ?? E(e);
|
|
474
474
|
}
|
|
475
475
|
return l.set(a, 56), l[68] = r.stride, l[69] = r.stride === 20 ? 4 : 3, l[70] = r.uvAt, l[71] = r.colorAt, l[74] = r.side, i.groups.get(h(n, i.uniform, l, e.view ?? e));
|
|
476
476
|
}), g = v(e, this.attachments.color, this.attachments.depth);
|
|
@@ -496,6 +496,6 @@ var A = 76, j = 4, M = class d {coreRequirement=__margoCoreRequirement("0.1.0",i
|
|
|
496
496
|
[Symbol.dispose ?? Symbol()]() {
|
|
497
497
|
this.dispose();
|
|
498
498
|
}
|
|
499
|
-
},
|
|
499
|
+
}, M = 0;
|
|
500
500
|
//#endregion
|
|
501
|
-
export {
|
|
501
|
+
export { j as MeshDebugView };
|
package/dist/packages.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const a=(engine,version="
|
|
3
|
+
const a=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { n as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { r as t } from "./mesh-source-BSQA_1GQ.js";
|
|
6
6
|
import { EditHistory as n } from "./history.js";
|
|
@@ -52,17 +52,17 @@ var o = [-Infinity, Infinity], s = [0, Infinity], c = [0, 1], l = [0, Math.PI /
|
|
|
52
52
|
1
|
|
53
53
|
],
|
|
54
54
|
lightSize: [
|
|
55
|
-
.
|
|
55
|
+
.004653033580075168,
|
|
56
56
|
0,
|
|
57
57
|
Infinity
|
|
58
58
|
],
|
|
59
59
|
bias: [
|
|
60
|
-
|
|
60
|
+
0,
|
|
61
61
|
0,
|
|
62
62
|
Infinity
|
|
63
63
|
],
|
|
64
64
|
normalBias: [
|
|
65
|
-
|
|
65
|
+
0,
|
|
66
66
|
0,
|
|
67
67
|
Infinity
|
|
68
68
|
],
|
|
@@ -245,8 +245,8 @@ function C(t, n, r, i) {
|
|
|
245
245
|
redo: () => a.set(l)
|
|
246
246
|
}), !0;
|
|
247
247
|
}
|
|
248
|
-
var w = "\n:host{position:fixed;left:12px;top:12px;width:300px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;z-index:10001;display:block;color:#202226;background:#fafbfc;border:1px solid #b9bec7;border-radius:4px;font:12px/1.4 system-ui;letter-spacing:0}\n*{box-sizing:border-box}h2{font-size:14px;margin:0;padding:10px 12px;border-bottom:1px solid #d5d9df}details{border-bottom:1px solid #d5d9df;padding:6px 12px}summary{cursor:pointer;font-weight:600}\nlabel{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}input{font:inherit;min-width:0}input[type=number]{width:72px}.axes{display:flex;gap:4px}.axes input{width:56px}\ninput[type=checkbox]{accent-color:#087e67}input[type=color]{width:48px;height:24px;padding:0}input:disabled{opacity:.5}.note{color:#5d636b;margin:4px 0}\n", T = class t {coreRequirement=__margoCoreRequirement("
|
|
249
|
-
static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
248
|
+
var w = "\n:host{position:fixed;left:12px;top:12px;width:300px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;z-index:10001;display:block;color:#202226;background:#fafbfc;border:1px solid #b9bec7;border-radius:4px;font:12px/1.4 system-ui;letter-spacing:0}\n*{box-sizing:border-box}h2{font-size:14px;margin:0;padding:10px 12px;border-bottom:1px solid #d5d9df}details{border-bottom:1px solid #d5d9df;padding:6px 12px}summary{cursor:pointer;font-weight:600}\nlabel{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}input{font:inherit;min-width:0}input[type=number]{width:72px}.axes{display:flex;gap:4px}.axes input{width:56px}\ninput[type=checkbox]{accent-color:#087e67}input[type=color]{width:48px;height:24px;padding:0}input:disabled{opacity:.5}.note{color:#5d636b;margin:4px 0}\n", T = class t {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
249
|
+
static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
250
250
|
let r = new t(n);
|
|
251
251
|
return a(e).use(r), r;
|
|
252
252
|
}
|
package/dist/remote.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const s=(engine,version="
|
|
3
|
+
const s=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { n as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { EditHistory as t } from "./history.js";
|
|
6
6
|
import { n, t as r } from "./color-D6qetPCJ.js";
|
|
@@ -110,8 +110,8 @@ var h = (e) => ({
|
|
|
110
110
|
value: typeof t == "object" ? Array.from(t) : t
|
|
111
111
|
};
|
|
112
112
|
})
|
|
113
|
-
}), g = class n {coreRequirement=__margoCoreRequirement("
|
|
114
|
-
static attach(e, t) {__margoAssertCore(e,__margoCoreRequirement("
|
|
113
|
+
}), g = class n {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
114
|
+
static attach(e, t) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
115
115
|
let r = new n(t);
|
|
116
116
|
return s(e).use(r), r;
|
|
117
117
|
}
|
package/dist/shaders.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const n=(engine,version="
|
|
3
|
+
const n=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { n as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { EditHistory as t } from "./history.js";
|
|
6
6
|
import { engineRuntime as __margoRuntime } from "@margoengine/core/extension";
|
|
@@ -180,8 +180,8 @@ function g(e, t, n, r) {
|
|
|
180
180
|
redo: () => t.material = r
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
var _ = "\n:host{position:fixed;right:12px;bottom:12px;width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;z-index:10001;display:block;color:#202226;background:#fafbfc;border:1px solid #b9bec7;border-radius:4px;font:12px/1.4 system-ui;letter-spacing:0}\n*{box-sizing:border-box}h2{font-size:14px;margin:0;padding:10px 12px;border-bottom:1px solid #d5d9df}.row{display:flex;gap:8px;align-items:center;padding:6px 12px}\nselect{flex:1;min-width:0;font:inherit}textarea{display:block;width:calc(100% - 24px);margin:0 12px;min-height:220px;font:12px/1.45 ui-monospace,Menlo,Consolas,monospace;tab-size:2;white-space:pre;resize:vertical}\nbutton{font:inherit}.status{color:#5d636b}.status[data-state=error]{color:#b42318}ol{margin:4px 12px 10px;padding-left:20px;color:#b42318;font:12px/1.4 ui-monospace,Menlo,Consolas,monospace}\n", v = class i {coreRequirement=__margoCoreRequirement("
|
|
184
|
-
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
183
|
+
var _ = "\n:host{position:fixed;right:12px;bottom:12px;width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;z-index:10001;display:block;color:#202226;background:#fafbfc;border:1px solid #b9bec7;border-radius:4px;font:12px/1.4 system-ui;letter-spacing:0}\n*{box-sizing:border-box}h2{font-size:14px;margin:0;padding:10px 12px;border-bottom:1px solid #d5d9df}.row{display:flex;gap:8px;align-items:center;padding:6px 12px}\nselect{flex:1;min-width:0;font:inherit}textarea{display:block;width:calc(100% - 24px);margin:0 12px;min-height:220px;font:12px/1.45 ui-monospace,Menlo,Consolas,monospace;tab-size:2;white-space:pre;resize:vertical}\nbutton{font:inherit}.status{color:#5d636b}.status[data-state=error]{color:#b42318}ol{margin:4px 12px 10px;padding-left:20px;color:#b42318;font:12px/1.4 ui-monospace,Menlo,Consolas,monospace}\n", v = class i {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
184
|
+
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
185
185
|
let r = new i(t);
|
|
186
186
|
return n(e).use(r), r;
|
|
187
187
|
}
|
package/dist/textures.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
3
|
|
|
4
4
|
import { t as e } from "./errors-D8rc8kzg.js";
|
|
@@ -279,7 +279,7 @@ value=clamp((value*vec4f(mapping.xxx,1)-vec4f(mapping.yyy,0))/vec4f(mapping.zzz,
|
|
|
279
279
|
this.dispose();
|
|
280
280
|
}
|
|
281
281
|
}, a = class t {
|
|
282
|
-
static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
282
|
+
static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
283
283
|
return new t(e, n);
|
|
284
284
|
}
|
|
285
285
|
constructor(e, t = {}) {
|
package/dist/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// @margo/core-built
|
|
1
|
+
// @margo/core-built 1.0.0
|
|
2
2
|
import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
|
|
3
|
-
const t=(engine,version="
|
|
3
|
+
const t=(engine,version="1.0.0",source=import.meta.url)=>__margoRuntime(engine,version,source);
|
|
4
4
|
import { t as e } from "./errors-D8rc8kzg.js";
|
|
5
5
|
import { engineRuntime as __margoRuntime } from "@margoengine/core/extension";
|
|
6
6
|
//#region src/tools.ts
|
|
@@ -25,8 +25,8 @@ function r(e, t) {
|
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
var i = 0, a = class a {coreRequirement=__margoCoreRequirement("
|
|
29
|
-
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("
|
|
28
|
+
var i = 0, a = class a {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
|
|
29
|
+
static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
|
|
30
30
|
let n = new a(e, t);
|
|
31
31
|
try {
|
|
32
32
|
return e.use(n), n;
|