app
Adom Chipsmith
Public Made by Adomby adom
STEP-native chip validator — 5-source cross-validation, OCCT-generated copyright-free 3D models with embedded signal annotations, datasheet-to-STEP pipeline.
← Commit history
Upload full source (MIT) — open source under adom org
8 files changed
+971
vendor/adom-step/vendor/3d-viewer-dist/chunk-Bn34UUqp.js+82vendor/adom-step/vendor/3d-viewer-dist/chunk-C7x1amiT.js+65vendor/adom-step/vendor/3d-viewer-dist/chunk-CZkmtv97.js+236vendor/adom-step/vendor/3d-viewer-dist/chunk-D04s9vLQ.js+35vendor/adom-step/vendor/3d-viewer-dist/chunk-DDOvnEfl.js+10vendor/adom-step/vendor/3d-viewer-dist/chunk-DSsqCEST.js+4vendor/adom-step/vendor/3d-viewer-dist/chunk-DsOYaBFP.js+508vendor/adom-step/vendor/3d-viewer-dist/chunk-g5capz7O.js+31vendor/adom-step/vendor/3d-viewer-dist/chunk-Bn34UUqp.jsadded+82@@ -0,0 +1,82 @@+import { bW as r } from "./chunk-IERganv1.js";+const e = "textureMergerPixelShader", n = `#ifdef USE_TEXTURE0+var inputTexture0Sampler: sampler;var inputTexture0: texture_2d<f32>;+#endif+#ifdef USE_TEXTURE1+var inputTexture1Sampler: sampler;var inputTexture1: texture_2d<f32>;+#endif+#ifdef USE_TEXTURE2+var inputTexture2Sampler: sampler;var inputTexture2: texture_2d<f32>;+#endif+#ifdef USE_TEXTURE3+var inputTexture3Sampler: sampler;var inputTexture3: texture_2d<f32>;+#endif+#ifdef RED_FROM_TEXTURE+uniform redTextureIndex: i32;uniform redSourceChannel: i32;+#else+uniform redConstantValue: f32;+#endif+#ifdef GREEN_FROM_TEXTURE+uniform greenTextureIndex: i32;uniform greenSourceChannel: i32;+#else+uniform greenConstantValue: f32;+#endif+#ifdef BLUE_FROM_TEXTURE+uniform blueTextureIndex: i32;uniform blueSourceChannel: i32;+#else+uniform blueConstantValue: f32;+#endif+#ifdef ALPHA_FROM_TEXTURE+uniform alphaTextureIndex: i32;uniform alphaSourceChannel: i32;+#else+uniform alphaConstantValue: f32;+#endif+varying vUV: vec2f;+#if defined(RED_FROM_TEXTURE) || defined(GREEN_FROM_TEXTURE) || defined(BLUE_FROM_TEXTURE) || defined(ALPHA_FROM_TEXTURE)+fn sampleTexture(textureIndex: i32,uv: vec2f)->vec4f {switch (textureIndex) {+#ifdef USE_TEXTURE0+case 0: {return textureSample(inputTexture0,inputTexture0Sampler,uv);}+#endif+#ifdef USE_TEXTURE1+case 1: {return textureSample(inputTexture1,inputTexture1Sampler,uv);}+#endif+#ifdef USE_TEXTURE2+case 2: {return textureSample(inputTexture2,inputTexture2Sampler,uv);}+#endif+#ifdef USE_TEXTURE3+case 3: {return textureSample(inputTexture3,inputTexture3Sampler,uv);}+#endif+default: {return vec4f(0.0,0.0,0.0,1.0); }}}+fn extractChannel(color: vec4f,channelIndex: i32)->f32 {switch (channelIndex) {case 0: {return color.r; }+case 1: {return color.g; }+case 2: {return color.b; }+default: {return color.a; }}}+#endif+@fragment+fn main(input: FragmentInputs)->FragmentOutputs {let uv: vec2f=input.vUV;+#ifdef RED_FROM_TEXTURE+let redSample: vec4f=sampleTexture(uniforms.redTextureIndex,uv);let r: f32=extractChannel(redSample,uniforms.redSourceChannel);+#else+let r: f32=uniforms.redConstantValue;+#endif+#ifdef GREEN_FROM_TEXTURE+let greenSample: vec4f=sampleTexture(uniforms.greenTextureIndex,uv);let g: f32=extractChannel(greenSample,uniforms.greenSourceChannel);+#else+let g: f32=uniforms.greenConstantValue;+#endif+#ifdef BLUE_FROM_TEXTURE+let blueSample: vec4f=sampleTexture(uniforms.blueTextureIndex,uv);let b: f32=extractChannel(blueSample,uniforms.blueSourceChannel);+#else+let b: f32=uniforms.blueConstantValue;+#endif+#ifdef ALPHA_FROM_TEXTURE+let alphaSample: vec4f=sampleTexture(uniforms.alphaTextureIndex,uv);let a: f32=extractChannel(alphaSample,uniforms.alphaSourceChannel);+#else+let a: f32=uniforms.alphaConstantValue;+#endif+fragmentOutputs.color=vec4f(r,g,b,a);}`;+r.ShadersStoreWGSL[e] || (r.ShadersStoreWGSL[e] = n);+const u = { name: e, shader: n };+export {+ u as textureMergerPixelShaderWGSL+};
vendor/adom-step/vendor/3d-viewer-dist/chunk-C7x1amiT.jsadded+65@@ -0,0 +1,65 @@+import { bU as r, bV as n, R as s } from "./chunk-IERganv1.js";+const g = 100;+class o extends r {+ constructor(t) {+ super(t), this.log = [], this._isDebug = !0, this.input = this.registerDataInput("input", n), this.output = this.registerDataOutput("output", n);+ }+ /**+ * @internal+ */+ _updateOutputs(t) {+ const i = this.input.getValue(t);+ this.output.setValue(i, t), this._logValue(i);+ }+ /**+ * Format and store a value in the log.+ * @param value+ */+ _logValue(t) {+ if (t == null)+ this.log.push(["null", "null"]);+ else {+ const i = o._FormatValue(t);+ this.log.push([i, String(t)]);+ }+ this.log.length > g && this.log.shift();+ }+ /**+ * Type-aware value formatting.+ * @param value the value to format+ * @returns a human-readable string+ */+ static _FormatValue(t) {+ if (typeof t == "number")+ return Number.isInteger(t) ? t.toString() : t.toFixed(4);+ if (typeof t == "boolean" || typeof t == "string")+ return String(t);+ if (t && typeof t == "object") {+ if ("w" in t && "x" in t && "y" in t && "z" in t)+ return `(${t.x.toFixed(3)}, ${t.y.toFixed(3)}, ${t.z.toFixed(3)}, ${t.w.toFixed(3)})`;+ if ("z" in t && "x" in t && "y" in t)+ return `(${t.x.toFixed(3)}, ${t.y.toFixed(3)}, ${t.z.toFixed(3)})`;+ if ("x" in t && "y" in t)+ return `(${t.x.toFixed(3)}, ${t.y.toFixed(3)})`;+ if ("r" in t && "g" in t && "b" in t) {+ const i = "a" in t ? `, ${t.a.toFixed(3)}` : "";+ return `(${t.r.toFixed(3)}, ${t.g.toFixed(3)}, ${t.b.toFixed(3)}${i})`;+ }+ if (typeof t.toString == "function" && t.toString !== Object.prototype.toString)+ return t.toString();+ }+ try {+ const i = JSON.stringify(t);+ return i.length > 64 ? i.substring(0, 61) + "..." : i;+ } catch {+ return String(t);+ }+ }+ getClassName() {+ return "FlowGraphDebugBlock";+ }+}+s("FlowGraphDebugBlock", o);+export {+ o as FlowGraphDebugBlock+};
vendor/adom-step/vendor/3d-viewer-dist/chunk-CZkmtv97.jsadded+236@@ -0,0 +1,236 @@+function T(m, W) {+ return W.forEach(function(p) {+ p && typeof p != "string" && !Array.isArray(p) && Object.keys(p).forEach(function(g) {+ if (g !== "default" && !(g in m)) {+ var a = Object.getOwnPropertyDescriptor(p, g);+ Object.defineProperty(m, g, a.get ? a : {+ enumerable: !0,+ get: function() {+ return p[g];+ }+ });+ }+ });+ }), Object.freeze(m);+}+var j = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};+function R(m) {+ return m && m.__esModule && Object.prototype.hasOwnProperty.call(m, "default") ? m.default : m;+}+var M = { exports: {} };+(function(m, W) {+ (function(p, g) {+ m.exports = g();+ })(j, function() {+ return function(p) {+ function g(h) {+ if (a[h]) return a[h].exports;+ var c = a[h] = { exports: {}, id: h, loaded: !1 };+ return p[h].call(c.exports, c, c.exports, g), c.loaded = !0, c.exports;+ }+ var a = {};+ return g.m = p, g.c = a, g.p = "", g(0);+ }([function(p, g, a) {+ var h, c, v = function(s, t) {+ function u() {+ this.constructor = s;+ }+ for (var d in t) y.call(t, d) && (s[d] = t[d]);+ return u.prototype = t.prototype, s.prototype = new u(), s.__super__ = t.prototype, s;+ }, y = {}.hasOwnProperty, i = [].indexOf || function(s) {+ for (var t = 0, u = this.length; t < u; t++) if (t in this && this[t] === s) return t;+ return -1;+ };+ h = a(1).EventEmitter, a(2), c = function(s) {+ function t(e) {+ var r, n, o;+ this.running = !1, this.options = {}, this.frames = [], this.groups = /* @__PURE__ */ new Map(), this.freeWorkers = [], this.activeWorkers = [], this.setOptions(e);+ for (n in u) o = u[n], (r = this.options)[n] == null && (r[n] = o);+ }+ var u, d;+ return v(t, s), u = { workerScript: "gif.worker.js", workers: 2, repeat: 0, background: "#fff", quality: 10, width: null, height: null, transparent: null, debug: !1 }, d = { delay: 500, copy: !1 }, t.prototype.setOption = function(e, r) {+ if (this.options[e] = r, this._canvas != null && (e === "width" || e === "height")) return this._canvas[e] = r;+ }, t.prototype.setOptions = function(e) {+ var r, n, o;+ n = [];+ for (r in e) y.call(e, r) && (o = e[r], n.push(this.setOption(r, o)));+ return n;+ }, t.prototype.addFrame = function(e, r) {+ var n, o, l;+ r == null && (r = {}), n = {}, n.transparent = this.options.transparent;+ for (l in d) n[l] = r[l] || d[l];+ if (this.options.width == null && this.setOption("width", e.width), this.options.height == null && this.setOption("height", e.height), typeof ImageData < "u" && ImageData !== null && e instanceof ImageData) n.data = e.data;+ else if (typeof CanvasRenderingContext2D < "u" && CanvasRenderingContext2D !== null && e instanceof CanvasRenderingContext2D || typeof WebGLRenderingContext < "u" && WebGLRenderingContext !== null && e instanceof WebGLRenderingContext) r.copy ? n.data = this.getContextData(e) : n.context = e;+ else {+ if (e.childNodes == null) throw new Error("Invalid image");+ r.copy ? n.data = this.getImageData(e) : n.image = e;+ }+ return o = this.frames.length, o > 0 && n.data && (this.groups.has(n.data) ? this.groups.get(n.data).push(o) : this.groups.set(n.data, [o])), this.frames.push(n);+ }, t.prototype.render = function() {+ var e, r, n;+ if (this.running) throw new Error("Already running");+ if (this.options.width == null || this.options.height == null) throw new Error("Width and height must be set prior to rendering");+ if (this.running = !0, this.nextFrame = 0, this.finishedFrames = 0, this.imageParts = function() {+ var o, l, f;+ for (f = [], o = 0, l = this.frames.length; 0 <= l ? o < l : o > l; 0 <= l ? ++o : --o) f.push(null);+ return f;+ }.call(this), r = this.spawnWorkers(), this.options.globalPalette === !0) this.renderNextFrame();+ else for (e = 0, n = r; 0 <= n ? e < n : e > n; 0 <= n ? ++e : --e) this.renderNextFrame();+ return this.emit("start"), this.emit("progress", 0);+ }, t.prototype.abort = function() {+ for (var e; e = this.activeWorkers.shift(), e != null; )+ this.log("killing active worker"), e.terminate();+ return this.running = !1, this.emit("abort");+ }, t.prototype.spawnWorkers = function() {+ var e, r, n;+ return e = Math.min(this.options.workers, this.frames.length), function() {+ n = [];+ for (var o = r = this.freeWorkers.length; r <= e ? o < e : o > e; r <= e ? o++ : o--) n.push(o);+ return n;+ }.apply(this).forEach(/* @__PURE__ */ function(o) {+ return function(l) {+ var f;+ return o.log("spawning worker " + l), f = new Worker(o.options.workerScript), f.onmessage = function(_) {+ return o.activeWorkers.splice(o.activeWorkers.indexOf(f), 1), o.freeWorkers.push(f), o.frameFinished(_.data, !1);+ }, o.freeWorkers.push(f);+ };+ }(this)), e;+ }, t.prototype.frameFinished = function(e, r) {+ var n, o, l, f;+ if (this.finishedFrames++, r ? (n = this.frames.indexOf(e), o = this.groups.get(e.data)[0], this.log("frame " + (n + 1) + " is duplicate of " + o + " - " + this.activeWorkers.length + " active"), this.imageParts[n] = { indexOfFirstInGroup: o }) : (this.log("frame " + (e.index + 1) + " finished - " + this.activeWorkers.length + " active"), this.emit("progress", this.finishedFrames / this.frames.length), this.imageParts[e.index] = e), this.options.globalPalette === !0 && !r && (this.options.globalPalette = e.globalPalette, this.log("global palette analyzed"), this.frames.length > 2)) for (l = 1, f = this.freeWorkers.length; 1 <= f ? l < f : l > f; 1 <= f ? ++l : --l) this.renderNextFrame();+ return i.call(this.imageParts, null) >= 0 ? this.renderNextFrame() : this.finishRendering();+ }, t.prototype.finishRendering = function() {+ var e, r, n, o, l, f, _, x, w, C, P, D, I, b, k, A, L, E, O, F;+ for (L = this.imageParts, l = f = 0, C = L.length; f < C; l = ++f) r = L[l], r.indexOfFirstInGroup && (this.imageParts[l] = this.imageParts[r.indexOfFirstInGroup]);+ for (w = 0, E = this.imageParts, _ = 0, P = E.length; _ < P; _++) r = E[_], w += (r.data.length - 1) * r.pageSize + r.cursor;+ for (w += r.pageSize - r.cursor, this.log("rendering finished - filesize " + Math.round(w / 1e3) + "kb"), e = new Uint8Array(w), k = 0, O = this.imageParts, x = 0, D = O.length; x < D; x++) for (r = O[x], F = r.data, n = b = 0, I = F.length; b < I; n = ++b) A = F[n], e.set(A, k), k += n === r.data.length - 1 ? r.cursor : r.pageSize;+ return o = new Blob([e], { type: "image/gif" }), this.emit("finished", o, e);+ }, t.prototype.renderNextFrame = function() {+ var e, r, n, o;+ if (this.freeWorkers.length === 0) throw new Error("No free workers");+ if (!(this.nextFrame >= this.frames.length)) return e = this.frames[this.nextFrame++], r = this.frames.indexOf(e), r > 0 && this.groups.has(e.data) && this.groups.get(e.data)[0] !== r ? void setTimeout(/* @__PURE__ */ function(l) {+ return function() {+ return l.frameFinished(e, !0);+ };+ }(this), 0) : (o = this.freeWorkers.shift(), n = this.getTask(e), this.log("starting frame " + (n.index + 1) + " of " + this.frames.length), this.activeWorkers.push(o), o.postMessage(n));+ }, t.prototype.getContextData = function(e) {+ return e.getImageData(0, 0, this.options.width, this.options.height).data;+ }, t.prototype.getImageData = function(e) {+ var r;+ return this._canvas == null && (this._canvas = document.createElement("canvas"), this._canvas.width = this.options.width, this._canvas.height = this.options.height), r = this._canvas.getContext("2d"), r.setFill = this.options.background, r.fillRect(0, 0, this.options.width, this.options.height), r.drawImage(e, 0, 0), this.getContextData(r);+ }, t.prototype.getTask = function(e) {+ var r, n;+ if (r = this.frames.indexOf(e), n = { index: r, last: r === this.frames.length - 1, delay: e.delay, transparent: e.transparent, width: this.options.width, height: this.options.height, quality: this.options.quality, dither: this.options.dither, globalPalette: this.options.globalPalette, repeat: this.options.repeat, canTransfer: !0 }, e.data != null) n.data = e.data;+ else if (e.context != null) n.data = this.getContextData(e.context);+ else {+ if (e.image == null) throw new Error("Invalid frame");+ n.data = this.getImageData(e.image);+ }+ return n;+ }, t.prototype.log = function(e) {+ if (this.options.debug) return console.log(e);+ }, t;+ }(h), p.exports = c;+ }, function(p, g) {+ function a() {+ this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0;+ }+ function h(i) {+ return typeof i == "function";+ }+ function c(i) {+ return typeof i == "number";+ }+ function v(i) {+ return typeof i == "object" && i !== null;+ }+ function y(i) {+ return i === void 0;+ }+ p.exports = a, a.EventEmitter = a, a.prototype._events = void 0, a.prototype._maxListeners = void 0, a.defaultMaxListeners = 10, a.prototype.setMaxListeners = function(i) {+ if (!c(i) || i < 0 || isNaN(i)) throw TypeError("n must be a positive number");+ return this._maxListeners = i, this;+ }, a.prototype.emit = function(i) {+ var s, t, u, d, e, r;+ if (this._events || (this._events = {}), i === "error" && (!this._events.error || v(this._events.error) && !this._events.error.length)) {+ if (s = arguments[1], s instanceof Error) throw s;+ var n = new Error('Uncaught, unspecified "error" event. (' + s + ")");+ throw n.context = s, n;+ }+ if (t = this._events[i], y(t)) return !1;+ if (h(t)) switch (arguments.length) {+ case 1:+ t.call(this);+ break;+ case 2:+ t.call(this, arguments[1]);+ break;+ case 3:+ t.call(this, arguments[1], arguments[2]);+ break;+ default:+ d = Array.prototype.slice.call(arguments, 1), t.apply(this, d);+ }+ else if (v(t)) for (d = Array.prototype.slice.call(arguments, 1), r = t.slice(), u = r.length, e = 0; e < u; e++) r[e].apply(this, d);+ return !0;+ }, a.prototype.addListener = function(i, s) {+ var t;+ if (!h(s)) throw TypeError("listener must be a function");+ return this._events || (this._events = {}), this._events.newListener && this.emit("newListener", i, h(s.listener) ? s.listener : s), this._events[i] ? v(this._events[i]) ? this._events[i].push(s) : this._events[i] = [this._events[i], s] : this._events[i] = s, v(this._events[i]) && !this._events[i].warned && (t = y(this._maxListeners) ? a.defaultMaxListeners : this._maxListeners, t && t > 0 && this._events[i].length > t && (this._events[i].warned = !0, console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[i].length), typeof console.trace == "function" && console.trace())), this;+ }, a.prototype.on = a.prototype.addListener, a.prototype.once = function(i, s) {+ function t() {+ this.removeListener(i, t), u || (u = !0, s.apply(this, arguments));+ }+ if (!h(s)) throw TypeError("listener must be a function");+ var u = !1;+ return t.listener = s, this.on(i, t), this;+ }, a.prototype.removeListener = function(i, s) {+ var t, u, d, e;+ if (!h(s)) throw TypeError("listener must be a function");+ if (!this._events || !this._events[i]) return this;+ if (t = this._events[i], d = t.length, u = -1, t === s || h(t.listener) && t.listener === s) delete this._events[i], this._events.removeListener && this.emit("removeListener", i, s);+ else if (v(t)) {+ for (e = d; e-- > 0; ) if (t[e] === s || t[e].listener && t[e].listener === s) {+ u = e;+ break;+ }+ if (u < 0) return this;+ t.length === 1 ? (t.length = 0, delete this._events[i]) : t.splice(u, 1), this._events.removeListener && this.emit("removeListener", i, s);+ }+ return this;+ }, a.prototype.removeAllListeners = function(i) {+ var s, t;+ if (!this._events) return this;+ if (!this._events.removeListener) return arguments.length === 0 ? this._events = {} : this._events[i] && delete this._events[i], this;+ if (arguments.length === 0) {+ for (s in this._events) s !== "removeListener" && this.removeAllListeners(s);+ return this.removeAllListeners("removeListener"), this._events = {}, this;+ }+ if (t = this._events[i], h(t)) this.removeListener(i, t);+ else if (t) for (; t.length; ) this.removeListener(i, t[t.length - 1]);+ return delete this._events[i], this;+ }, a.prototype.listeners = function(i) {+ return this._events && this._events[i] ? h(this._events[i]) ? [this._events[i]] : this._events[i].slice() : [];+ }, a.prototype.listenerCount = function(i) {+ if (this._events) {+ var s = this._events[i];+ if (h(s)) return 1;+ if (s) return s.length;+ }+ return 0;+ }, a.listenerCount = function(i, s) {+ return i.listenerCount(s);+ };+ }, function(p, g) {+ var a, h, c, v, y;+ y = navigator.userAgent.toLowerCase(), v = navigator.platform.toLowerCase(), a = y.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [null, "unknown", 0], c = a[1] === "ie" && document.documentMode, h = { name: a[1] === "version" ? a[3] : a[1], version: c || parseFloat(a[1] === "opera" && a[4] ? a[4] : a[2]), platform: { name: y.match(/ip(?:ad|od|hone)/) ? "ios" : (y.match(/(?:webos|android)/) || v.match(/mac|win|linux/) || ["other"])[0] } }, h[h.name] = !0, h[h.name + parseInt(h.version, 10)] = !0, h.platform[h.platform.name] = !0, p.exports = h;+ }]);+ });+})(M);+var N = M.exports, G = /* @__PURE__ */ R(N), z = /* @__PURE__ */ T({+ __proto__: null,+ default: G+}, [N]);+export {+ z as g+};
vendor/adom-step/vendor/3d-viewer-dist/chunk-D04s9vLQ.jsadded+35@@ -0,0 +1,35 @@+import { bW as t } from "./chunk-IERganv1.js";+const e = "skyVertexShader", i = `attribute position: vec3f;+#ifdef VERTEXCOLOR+attribute color: vec4f;+#endif+uniform world: mat4x4f;uniform view: mat4x4f;uniform viewProjection: mat4x4f;+#ifdef POINTSIZE+uniform pointSize: f32;+#endif+varying vPositionW: vec3f;+#ifdef VERTEXCOLOR+varying vColor: vec4f;+#endif+#include<logDepthDeclaration>+#include<clipPlaneVertexDeclaration>+#include<fogVertexDeclaration>+#define CUSTOM_VERTEX_DEFINITIONS+@vertex+fn main(input : VertexInputs)->FragmentInputs {+#define CUSTOM_VERTEX_MAIN_BEGIN+vertexOutputs.position=uniforms.viewProjection*uniforms.world* vec4f(vertexInputs.position,1.0);var worldPos: vec4f=uniforms.world* vec4f(vertexInputs.position,1.0);vertexOutputs.vPositionW= worldPos.xyz;+#include<clipPlaneVertex>+#include<logDepthVertex>+#include<fogVertex>+#ifdef VERTEXCOLOR+vertexOutputs.vColor=vertexInputs.color;+#endif+#define CUSTOM_VERTEX_MAIN_END+}+`;+t.ShadersStoreWGSL[e] || (t.ShadersStoreWGSL[e] = i);+const r = { name: e, shader: i };+export {+ r as skyVertexShaderWGSL+};
vendor/adom-step/vendor/3d-viewer-dist/chunk-DDOvnEfl.jsadded+10@@ -0,0 +1,10 @@+import { bW as t } from "./chunk-IERganv1.js";+const o = "msdfPixelShader", s = `#extension GL_OES_standard_derivatives : enable+precision highp float;uniform sampler2D fontAtlas;uniform vec4 uColor;uniform vec4 uStrokeColor;uniform float uStrokeInsetWidth;uniform float uStrokeOutsetWidth;uniform float thickness;varying vec2 atlasUV;float median(vec3 msdf) {return max(min(msdf.r,msdf.g),min(max(msdf.r,msdf.g),msdf.b));}+void main(void)+{vec3 s=texture2D(fontAtlas,atlasUV).rgb;float sigDist=median(s)-0.5+thickness;float alpha=clamp(sigDist/fwidth(sigDist)+0.5,0.0,1.0);float sigDistOutset=sigDist+uStrokeOutsetWidth*0.5;float sigDistInset=sigDist-uStrokeInsetWidth*0.5;float outset=clamp(sigDistOutset/fwidth(sigDistOutset)+0.5,0.0,1.0);float inset=1.0-clamp(sigDistInset/fwidth(sigDistInset)+0.5,0.0,1.0);float border=outset*inset;vec4 filledFragColor=vec4(uColor.rgb,alpha*uColor.a);vec4 strokedFragColor=vec4(uStrokeColor.rgb,border*uStrokeColor.a);gl_FragColor=mix(filledFragColor,strokedFragColor,border);}`;+t.ShadersStore[o] || (t.ShadersStore[o] = s);+const r = { shader: s };+export {+ r as msdfPixelShader+};
vendor/adom-step/vendor/3d-viewer-dist/chunk-DSsqCEST.jsadded+4@@ -0,0 +1,4 @@+import { bW as o } from "./chunk-IERganv1.js";+const r = "oitFinalSimpleBlendPixelShader", e = `precision highp float;uniform sampler2D uFrontColor;void main() {ivec2 fragCoord=ivec2(gl_FragCoord.xy);vec4 frontColor=texelFetch(uFrontColor,fragCoord,0);glFragColor=frontColor;}+`;+o.ShadersStore[r] || (o.ShadersStore[r] = e);
vendor/adom-step/vendor/3d-viewer-dist/chunk-DsOYaBFP.jsadded+508@@ -0,0 +1,508 @@+import { a9 as je, S as Re, aa as fe, ab as Pe, ac as Ne, A as a, ad as He, ae as I, r as i, af as p, ag as u, ah as J, ai as Z, aj as B, ak as Me, al as Ke, am as Te, an as Fe, ao as Le, ap as Ae, aq as Be, M as Ge, a8 as Ee } from "./chunk-CODtpsMq.js";+import { b_ as c, b$ as m, c0 as $, c1 as ne, c2 as Ie, c3 as F, V as G, bK as De, an as se, br as Oe, aA as Xe, aE as Ue, aD as ze, aG as ke, al as qe, L as $e, T as re, b7 as ie, c4 as oe, aL as Ve, c5 as Ye, aM as Ze, aN as We, c6 as Je, aO as Qe, aR as ea, aT as aa, aU as ta, aV as na, aW as sa, c7 as ra, aJ as ia } from "./chunk-IERganv1.js";+const oa = /* @__PURE__ */ je("CollectionsAdd20Regular", "20", ["M15.5 7A2.5 2.5 0 0 1 18 9.33v.93a5.5 5.5 0 0 0-1-.66v-.1c0-.78-.6-1.42-1.35-1.5H9.5c-.78 0-1.42.6-1.5 1.35v6.15c0 .78.6 1.42 1.36 1.5H9.6c.18.36.4.7.66 1H9.5A2.5 2.5 0 0 1 7 15.66V9.5A2.5 2.5 0 0 1 9.34 7h6.16Zm-2.84-3.3.05.15L13.3 6h-1.04l-.5-1.89a1.5 1.5 0 0 0-1.7-1.1l-.14.04L4.1 4.6a1.5 1.5 0 0 0-1.09 1.7l.03.14 1.55 5.8a1.5 1.5 0 0 0 1.4 1.1v1a2.5 2.5 0 0 1-2.3-1.68l-.06-.17-1.55-5.8a2.5 2.5 0 0 1 1.6-3l.16-.05 5.8-1.56a2.5 2.5 0 0 1 2.96 1.46l.05.15ZM19 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 1 0-1 0V14h-1.5a.5.5 0 0 0 0 1H14v1.5a.5.5 0 1 0 1 0V15h1.5a.5.5 0 1 0 0-1H15v-1.5Z"]), le = {+ name: "bvh",+ extensions: {+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".bvh": { isBinary: !1 }+ }+}, ce = {+ name: "obj",+ extensions: ".obj"+}, me = {+ name: "splat",+ extensions: {+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".splat": { isBinary: !0 },+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".ply": { isBinary: !0 },+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".spz": { isBinary: !0 },+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".json": { isBinary: !1 },+ // For SOG metadata files+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".sog": { isBinary: !0 }+ }+}, la = {+ name: "stl",+ extensions: {+ // eslint-disable-next-line @typescript-eslint/naming-convention+ ".stl": { isBinary: !0 }+ }+};+function ca() {+ c("EXT_lights_image_based"), m("EXT_lights_image_based", !0, async (e) => {+ const { EXT_lights_image_based: n } = await import("./chunk-IERganv1.js").then((t) => t.d1);+ return new n(e);+ }), c("EXT_mesh_gpu_instancing"), m("EXT_mesh_gpu_instancing", !0, async (e) => {+ const { EXT_mesh_gpu_instancing: n } = await import("./chunk-IERganv1.js").then((t) => t.d2);+ return new n(e);+ }), c("EXT_meshopt_compression"), m("EXT_meshopt_compression", !0, async (e) => {+ const { EXT_meshopt_compression: n } = await import("./chunk-IERganv1.js").then((t) => t.d3);+ return new n(e);+ }), c("EXT_texture_avif"), m("EXT_texture_avif", !0, async (e) => {+ const { EXT_texture_avif: n } = await import("./chunk-IERganv1.js").then((t) => t.d5);+ return new n(e);+ }), c("EXT_texture_webp"), m("EXT_texture_webp", !0, async (e) => {+ const { EXT_texture_webp: n } = await import("./chunk-IERganv1.js").then((t) => t.d4);+ return new n(e);+ }), c("ExtrasAsMetadata"), m("ExtrasAsMetadata", !1, async (e) => {+ const { ExtrasAsMetadata: n } = await import("./chunk-IERganv1.js").then((t) => t.dG);+ return new n(e);+ }), c("KHR_animation_pointer"), m("KHR_animation_pointer", !0, async (e) => {+ const { KHR_animation_pointer: n } = await import("./chunk-IERganv1.js").then((t) => t.dx);+ return new n(e);+ }), c("KHR_draco_mesh_compression"), m("KHR_draco_mesh_compression", !0, async (e) => {+ const { KHR_draco_mesh_compression: n } = await import("./chunk-IERganv1.js").then((t) => t.d7);+ return new n(e);+ }), c("KHR_interactivity"), m("KHR_interactivity", !0, async (e) => {+ const { KHR_interactivity: n } = await import("./chunk-IERganv1.js").then((t) => t.dC);+ return new n(e);+ }), c("KHR_lights_punctual"), m("KHR_lights_punctual", !0, async (e) => {+ const { KHR_lights: n } = await import("./chunk-IERganv1.js").then((t) => t.d8);+ return new n(e);+ }), c("EXT_lights_area"), m("EXT_lights_area", !0, async (e) => {+ const { EXT_lights_area: n } = await import("./chunk-IERganv1.js").then((t) => t.d9);+ return new n(e);+ }), c("EXT_lights_ies"), m("EXT_lights_ies", !0, async (e) => {+ const { EXT_lights_ies: n } = await import("./chunk-IERganv1.js").then((t) => t.d6);+ return new n(e);+ }), c("KHR_materials_anisotropy"), m("KHR_materials_anisotropy", !0, async (e) => {+ const { KHR_materials_anisotropy: n } = await import("./chunk-IERganv1.js").then((t) => t.df);+ return new n(e);+ }), c("KHR_materials_clearcoat"), m("KHR_materials_clearcoat", !0, async (e) => {+ const { KHR_materials_clearcoat: n } = await import("./chunk-IERganv1.js").then((t) => t.dc);+ return new n(e);+ }), c("KHR_materials_diffuse_roughness"), m("KHR_materials_diffuse_roughness", !0, async (e) => {+ const { KHR_materials_diffuse_roughness: n } = await import("./chunk-IERganv1.js").then((t) => t.ds);+ return new n(e);+ }), c("KHR_materials_diffuse_transmission"), m("KHR_materials_diffuse_transmission", !0, async (e) => {+ const { KHR_materials_diffuse_transmission: n } = await import("./chunk-IERganv1.js").then((t) => t.dn);+ return new n(e);+ }), c("KHR_materials_dispersion"), m("KHR_materials_dispersion", !0, async (e) => {+ const { KHR_materials_dispersion: n } = await import("./chunk-IERganv1.js").then((t) => t.dr);+ return new n(e);+ }), c("KHR_materials_emissive_strength"), m("KHR_materials_emissive_strength", !0, async (e) => {+ const { KHR_materials_emissive_strength: n } = await import("./chunk-IERganv1.js").then((t) => t.dg);+ return new n(e);+ }), c("KHR_materials_ior"), m("KHR_materials_ior", !0, async (e) => {+ const { KHR_materials_ior: n } = await import("./chunk-IERganv1.js").then((t) => t.dk);+ return new n(e);+ }), c("KHR_materials_iridescence"), m("KHR_materials_iridescence", !0, async (e) => {+ const { KHR_materials_iridescence: n } = await import("./chunk-IERganv1.js").then((t) => t.de);+ return new n(e);+ }), c("KHR_materials_pbrSpecularGlossiness"), m("KHR_materials_pbrSpecularGlossiness", !0, async (e) => {+ const { KHR_materials_pbrSpecularGlossiness: n } = await import("./chunk-IERganv1.js").then((t) => t.da);+ return new n(e);+ }), c("KHR_materials_sheen"), m("KHR_materials_sheen", !0, async (e) => {+ const { KHR_materials_sheen: n } = await import("./chunk-IERganv1.js").then((t) => t.dh);+ return new n(e);+ }), c("KHR_materials_specular"), m("KHR_materials_specular", !0, async (e) => {+ const { KHR_materials_specular: n } = await import("./chunk-IERganv1.js").then((t) => t.dj);+ return new n(e);+ }), c("KHR_materials_transmission"), m("KHR_materials_transmission", !0, async (e) => {+ const { KHR_materials_transmission: n } = await import("./chunk-IERganv1.js").then((t) => t.dm);+ return new n(e);+ }), c("KHR_materials_unlit"), m("KHR_materials_unlit", !0, async (e) => {+ const { KHR_materials_unlit: n } = await import("./chunk-IERganv1.js").then((t) => t.db);+ return new n(e);+ }), c("KHR_materials_variants"), m("KHR_materials_variants", !0, async (e) => {+ const { KHR_materials_variants: n } = await import("./chunk-IERganv1.js").then((t) => t.dl);+ return new n(e);+ }), c("KHR_materials_volume"), m("KHR_materials_volume", !0, async (e) => {+ const { KHR_materials_volume: n } = await import("./chunk-IERganv1.js").then((t) => t.dp);+ return new n(e);+ }), c("KHR_mesh_quantization"), m("KHR_mesh_quantization", !0, async (e) => {+ const { KHR_mesh_quantization: n } = await import("./chunk-IERganv1.js").then((t) => t.dt);+ return new n(e);+ }), c("KHR_texture_basisu"), m("KHR_texture_basisu", !0, async (e) => {+ const { KHR_texture_basisu: n } = await import("./chunk-IERganv1.js").then((t) => t.du);+ return new n(e);+ }), c("KHR_texture_transform"), m("KHR_texture_transform", !0, async (e) => {+ const { KHR_texture_transform: n } = await import("./chunk-IERganv1.js").then((t) => t.dv);+ return new n(e);+ }), c("KHR_xmp_json_ld"), m("KHR_xmp_json_ld", !0, async (e) => {+ const { KHR_xmp_json_ld: n } = await import("./chunk-IERganv1.js").then((t) => t.dw);+ return new n(e);+ }), c("MSFT_audio_emitter"), m("MSFT_audio_emitter", !0, async (e) => {+ const { MSFT_audio_emitter: n } = await import("./chunk-IERganv1.js").then((t) => t.dy);+ return new n(e);+ }), c("MSFT_lod"), m("MSFT_lod", !0, async (e) => {+ const { MSFT_lod: n } = await import("./chunk-IERganv1.js").then((t) => t.dz);+ return new n(e);+ }), c("MSFT_minecraftMesh"), m("MSFT_minecraftMesh", !0, async (e) => {+ const { MSFT_minecraftMesh: n } = await import("./chunk-IERganv1.js").then((t) => t.dA);+ return new n(e);+ }), c("MSFT_sRGBFactors"), m("MSFT_sRGBFactors", !0, async (e) => {+ const { MSFT_sRGBFactors: n } = await import("./chunk-IERganv1.js").then((t) => t.dB);+ return new n(e);+ }), c("KHR_node_visibility"), m("KHR_node_visibility", !0, async (e) => {+ const { KHR_node_visibility: n } = await import("./chunk-IERganv1.js").then((t) => t.dD);+ return new n(e);+ }), c("KHR_node_hoverability"), m("KHR_node_hoverability", !0, async (e) => {+ const { KHR_node_hoverability: n } = await import("./chunk-IERganv1.js").then((t) => t.dF);+ return new n(e);+ }), c("KHR_node_selectability"), m("KHR_node_selectability", !0, async (e) => {+ const { KHR_node_selectability: n } = await import("./chunk-IERganv1.js").then((t) => t.dE);+ return new n(e);+ }), c("KHR_materials_coat"), m("KHR_materials_coat", !0, async (e) => {+ const { KHR_materials_coat: n } = await import("./chunk-IERganv1.js").then((t) => t.dd);+ return new n(e);+ }), c("KHR_materials_fuzz"), m("KHR_materials_fuzz", !0, async (e) => {+ const { KHR_materials_fuzz: n } = await import("./chunk-IERganv1.js").then((t) => t.di);+ return new n(e);+ }), c("KHR_materials_volume_scatter"), m("KHR_materials_volume_scatter", !0, async (e) => {+ const { KHR_materials_volume_scatter: n } = await import("./chunk-IERganv1.js").then((t) => t.dq);+ return new n(e);+ });+}+function ma() {+ $({+ ...le,+ createPlugin: async (e) => {+ const { BVHFileLoader: n } = await import("./chunk-B-22ATAX.js");+ return new n(e[le.name]);+ }+ }), $({+ ...ne,+ createPlugin: async (e) => {+ const { GLTFFileLoader: n } = await import("./chunk-IERganv1.js").then((t) => t.d0);+ return new n(e[ne.name]);+ }+ }), ca(), $({+ ...ce,+ createPlugin: async (e) => {+ const { OBJFileLoader: n } = await import("./chunk-Cx4kqim-.js");+ return new n(e[ce.name]);+ }+ }), $({+ ...me,+ createPlugin: async (e) => {+ const { SPLATFileLoader: n } = await import("./chunk-DT3MgdVI.js");+ return new n(e[me.name]);+ }+ }), $({+ ...la,+ createPlugin: async () => {+ const { STLFileLoader: e } = await import("./chunk-DhZ6boYZ.js");+ return new e();+ }+ });+}+const ue = (e) => a.jsx(Ae, { icon: Be, open: e.open, onOpenChange: e.onOpenChange, children: e.children }), Q = Ge({+ section: {+ display: "flex",+ flexDirection: "column",+ rowGap: Ee.spacingVerticalM+ },+ row: { display: "flex", alignItems: "center", gap: "4px" },+ rightAligned: { marginLeft: "auto" }+}), D = ({ children: e }) => {+ const n = Q();+ return a.jsx("div", { className: n.section, children: e });+}, ua = ({ children: e }) => {+ const n = Q();+ return a.jsx("div", { className: n.row, children: e });+};+function da(e) {+ return "dispose" in e && typeof e.dispose == "function";+}+const b = ({ selectionService: e, label: n, onCreate: t, onSettingsCreate: j, children: l }) => {+ const [d, S] = i.useState(null), [P, h] = i.useState(!1), { showToast: H } = Te(), g = Q(), C = d && da(d) ? d : null, w = Fe("function", C, "dispose");+ i.useEffect(() => {+ const M = w.add(() => S(null));+ return () => M.remove();+ }, [w]);+ const _ = i.useCallback(async (M) => {+ try {+ const f = await M();+ S(f), H(`Created ${f.name}`);+ } catch (f) {+ H(`Creation failed: ${f instanceof Error ? f.message : String(f)}`);+ }+ }, [H]);+ return a.jsxs("div", { className: g.row, children: [a.jsx(Z, { onClick: () => void _(t), label: n }), l && a.jsxs(ue, { open: P, onOpenChange: h, children: [l, a.jsx(Z, { appearance: "primary", onClick: () => {+ h(!1), _(j ?? t);+ }, label: "Create" })] }), a.jsx("div", { className: g.rightAligned, children: a.jsx(Le, { entity: d, selectionService: e }) })] });+};+ma();+const L = function(e) {+ const n = e.activeCamera;+ n && n.radius !== void 0 && (n.radius = 5);+}, ha = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState({+ name: "Sphere",+ segments: 32,+ diameter: 1,+ diameterX: 1,+ diameterY: 1,+ diameterZ: 1,+ arc: 1,+ slice: 1,+ uniform: !0+ }), l = (s, R) => {+ j((o) => ({+ ...o,+ [s]: R+ }));+ }, [d, S] = i.useState({+ name: "Box",+ size: 1,+ width: 1,+ height: 1,+ depth: 1+ }), P = (s, R) => {+ S((o) => ({+ ...o,+ [s]: R+ }));+ }, [h, H] = i.useState({+ name: "Cylinder",+ height: 2,+ diameterTop: 1,+ diameterBottom: 1,+ diameter: 1,+ tessellation: 32,+ subdivisions: 1,+ arc: 1+ }), g = (s, R) => {+ H((o) => ({+ ...o,+ [s]: R+ }));+ }, [C, w] = i.useState({+ name: "Cone",+ height: 2,+ diameter: 1,+ diameterTop: 0,+ diameterBottom: 1,+ tessellation: 32,+ subdivisions: 1,+ arc: 1+ }), [_, M] = i.useState(!0), f = (s, R) => {+ w((o) => ({+ ...o,+ [s]: R+ }));+ }, [N, x] = i.useState({+ name: "Ground",+ width: 10,+ height: 10,+ subdivisions: 1,+ subdivisionsX: 1,+ subdivisionsY: 1+ }), v = (s, R) => {+ x((o) => ({+ ...o,+ [s]: R+ }));+ }, T = i.useRef(null), [K, y] = i.useState("ImportedMesh"), O = (s) => {+ const R = s.target.files;+ if (!R || R.length === 0)+ return;+ const o = Array.from(R);+ if (K.trim().length > 0 && o.length > 0) {+ const A = o[0], k = A.name.lastIndexOf("."), E = k >= 0 ? A.name.substring(k) : "", q = K.trim(), Y = q.toLowerCase().endsWith(E.toLowerCase()) ? q : `${q}${E}`;+ o[0] = new File([A], Y, { type: A.type, lastModified: A.lastModified });+ }+ const z = new De(e.getEngine(), e, null, null, null, null, null, null, (A, k, E) => {+ alert(E ? `Failed to import mesh: ${E}` : "Failed to import mesh.");+ }, !0);+ z.displayLoadingUI = !1, z.loadFiles({ target: { files: o } }), z.dispose(), s.target.value = "";+ }, U = Ie().flatMap((s) => s.extensions.map((R) => R.extension)).filter((s) => s.toLowerCase() !== ".json");+ return a.jsxs(D, { children: [a.jsxs(b, { selectionService: n, label: "Sphere", onCreate: () => {+ const s = F.CreateSphere("Sphere", {}, e);+ return L(e), s;+ }, onSettingsCreate: () => {+ const s = {+ segments: t.segments,+ arc: t.arc,+ slice: t.slice+ };+ t.uniform ? s.diameter = t.diameter : (s.diameterX = t.diameterX, s.diameterY = t.diameterY, s.diameterZ = t.diameterZ);+ const R = F.CreateSphere(t.name, s, e);+ return L(e), R;+ }, children: [a.jsx(p, { label: "Name", value: t.name, onChange: (s) => l("name", s) }), a.jsx(u, { label: "Segments", value: t.segments, min: 0, onChange: (s) => l("segments", s) }), a.jsx(u, { label: "Diameter", value: t.diameter, min: 0, step: 0.1, onChange: (s) => l("diameter", s), disabled: !t.uniform }), a.jsx(J, { label: "Uniform", value: t.uniform, onChange: (s) => l("uniform", s) }), a.jsx(u, { label: "Diameter X", value: t.diameterX, min: 0, step: 0.1, onChange: (s) => l("diameterX", s), disabled: t.uniform }), a.jsx(u, { label: "Diameter Y", value: t.diameterY, min: 0, step: 0.1, onChange: (s) => l("diameterY", s), disabled: t.uniform }), a.jsx(u, { label: "Diameter Z", value: t.diameterZ, min: 0, step: 0.1, onChange: (s) => l("diameterZ", s), disabled: t.uniform }), a.jsx(u, { label: "Arc", value: t.arc, min: 0, max: 1, step: 0.1, onChange: (s) => l("arc", s) }), a.jsx(u, { label: "Slice", value: t.slice, min: 0, max: 1, step: 0.1, onChange: (s) => l("slice", s) })] }), a.jsxs(b, { selectionService: n, label: "Box", onCreate: () => {+ const s = F.CreateBox("Box", {}, e);+ return L(e), s;+ }, onSettingsCreate: () => {+ const s = F.CreateBox(d.name, d, e);+ return L(e), s;+ }, children: [a.jsx(p, { label: "Name", value: d.name, onChange: (s) => P("name", s) }), a.jsx(u, { label: "Size", value: d.size, min: 0, step: 0.1, onChange: (s) => P("size", s) }), a.jsx(u, { label: "Width", value: d.width, min: 0, step: 0.1, onChange: (s) => P("width", s) }), a.jsx(u, { label: "Height", value: d.height, min: 0, step: 0.1, onChange: (s) => P("height", s) }), a.jsx(u, { label: "Depth", value: d.depth, min: 0, step: 0.1, onChange: (s) => P("depth", s) })] }), a.jsxs(b, { selectionService: n, label: "Cylinder", onCreate: () => {+ const s = F.CreateCylinder("Cylinder", {}, e);+ return L(e), s;+ }, onSettingsCreate: () => {+ const s = F.CreateCylinder(h.name, h, e);+ return L(e), s;+ }, children: [a.jsx(p, { label: "Name", value: h.name, onChange: (s) => g("name", s) }), a.jsx(u, { label: "Height", value: h.height, min: 0, step: 0.1, onChange: (s) => g("height", s) }), a.jsx(u, { label: "Diameter Top", value: h.diameterTop, min: 0, step: 0.1, onChange: (s) => g("diameterTop", s) }), a.jsx(u, { label: "Diameter Bottom", value: h.diameterBottom, min: 0, step: 0.1, onChange: (s) => g("diameterBottom", s) }), a.jsx(u, { label: "Diameter", value: h.diameter, min: 0, step: 0.1, onChange: (s) => g("diameter", s) }), a.jsx(u, { label: "Tessellation", value: h.tessellation, min: 3, onChange: (s) => g("tessellation", s) }), a.jsx(u, { label: "Subdivisions", value: h.subdivisions, min: 1, onChange: (s) => g("subdivisions", s) }), a.jsx(u, { label: "Arc", value: h.arc, min: 0, max: 1, step: 0.1, onChange: (s) => g("arc", s) })] }), a.jsxs(b, { selectionService: n, label: "Cone", onCreate: () => {+ const s = F.CreateCylinder("Cone", { diameterTop: 0 }, e);+ return L(e), s;+ }, onSettingsCreate: () => {+ const s = {+ ...C,+ diameterTop: _ ? 0 : C.diameterTop,+ diameterBottom: _ ? C.diameterBottom : 0+ }, R = F.CreateCylinder(C.name, s, e);+ return L(e), R;+ }, children: [a.jsx(p, { label: "Name", value: C.name, onChange: (s) => f("name", s) }), a.jsx(u, { label: "Height", value: C.height, min: 0, step: 0.1, onChange: (s) => f("height", s) }), a.jsx(u, { label: "Diameter", value: C.diameter, min: 0, step: 0.1, onChange: (s) => f("diameter", s) }), a.jsx(u, { label: "Tessellation", value: C.tessellation, min: 3, onChange: (s) => f("tessellation", s) }), a.jsx(u, { label: "Subdivisions", value: C.subdivisions, min: 1, onChange: (s) => f("subdivisions", s) }), a.jsx(u, { label: "Arc", value: C.arc, min: 0, max: 1, step: 0.1, onChange: (s) => f("arc", s) }), a.jsx(J, { label: "Up", value: _, onChange: (s) => M(s) })] }), a.jsxs(b, { selectionService: n, label: "Ground", onCreate: () => {+ const s = F.CreateGround("Ground", {}, e);+ return L(e), s;+ }, onSettingsCreate: () => {+ const s = F.CreateGround(N.name, N, e);+ return L(e), s;+ }, children: [a.jsx(p, { label: "Name", value: N.name, onChange: (s) => v("name", s) }), a.jsx(u, { label: "Width", value: N.width, min: 0, step: 0.1, onChange: (s) => v("width", s) }), a.jsx(u, { label: "Height", value: N.height, min: 0, step: 0.1, onChange: (s) => v("height", s) }), a.jsx(u, { label: "Subdivisions", value: N.subdivisions, min: 1, onChange: (s) => v("subdivisions", s) }), a.jsx(u, { label: "Subdivisions X", value: N.subdivisionsX, min: 1, onChange: (s) => v("subdivisionsX", s) }), a.jsx(u, { label: "Subdivisions Y", value: N.subdivisionsY, min: 1, onChange: (s) => v("subdivisionsY", s) })] }), a.jsxs(ua, { children: [a.jsx(Z, { onClick: () => {+ T.current?.click();+ }, label: "Import Mesh" }), a.jsxs(ue, { children: [a.jsx(p, { label: "Name", value: K, onChange: (s) => y(s) }), a.jsx("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8 }, children: a.jsx(Z, { appearance: "primary", onClick: () => {+ T.current?.click();+ }, label: "Import" }) })] }), a.jsx("input", { ref: T, type: "file", accept: U.join(","), multiple: !0, style: { display: "none" }, onChange: O })] })] });+}, pa = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("Node Material"), [l, d] = i.useState(""), [S, P] = i.useState("PBR Material"), [h, H] = i.useState("Standard Material"), g = () => new Oe(S, e), C = () => new Xe(h, e), w = async () => {+ if (l) {+ const _ = await se.ParseFromSnippetAsync(l, e);+ return _.name = t, _;+ } else {+ const _ = new se(t, e);+ return _.setToDefault(), _.build(), _;+ }+ };+ return a.jsxs(D, { children: [a.jsxs(b, { selectionService: n, label: "Node Material", onCreate: w, children: [a.jsx(p, { label: "Name", value: t, onChange: (_) => j(_) }), a.jsx(p, { label: "Snippet ID", value: l, onChange: (_) => d(_) })] }), a.jsx(b, { selectionService: n, label: "PBR Material", onCreate: () => g(), children: a.jsx(p, { label: "Name", value: S, onChange: (_) => P(_) }) }), a.jsx(b, { selectionService: n, label: "Standard Material", onCreate: () => C(), children: a.jsx(p, { label: "Name", value: h, onChange: (_) => H(_) }) })] });+}, ga = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("Point Light"), [l, d] = i.useState(new G(0, 5, 0)), [S, P] = i.useState("Directional Light"), [h, H] = i.useState(new G(1, -1, 0)), [g, C] = i.useState("Spotlight"), [w, _] = i.useState(new G(0, 5, 0)), [M, f] = i.useState(new G(0, -1, 0)), [N, x] = i.useState(1), [v, T] = i.useState(1), [K, y] = i.useState("Clustered Light"), O = () => {+ const o = new Ue(t, l, e);+ return o.intensity = 1, o;+ }, U = () => {+ const o = new ze(S, h, e);+ return o.intensity = 1, o;+ }, s = () => {+ const o = new ke(g, w, M, N, v, e);+ return o.intensity = 1, o;+ }, R = async () => (await import("./chunk-IERganv1.js").then((o) => o.dH), new qe(K, [], e));+ return a.jsxs(D, { children: [a.jsxs(b, { selectionService: n, label: "Point Light", onCreate: () => O(), children: [a.jsx(p, { label: "Name", value: t, onChange: (o) => j(o) }), a.jsx(B, { label: "Position", value: l, onChange: (o) => d(o) })] }), a.jsxs(b, { selectionService: n, label: "Directional Light", onCreate: () => U(), children: [a.jsx(p, { label: "Name", value: S, onChange: (o) => P(o) }), a.jsx(B, { label: "Direction", value: h, onChange: (o) => H(o) })] }), a.jsxs(b, { selectionService: n, label: "Spotlight", onCreate: () => s(), children: [a.jsx(p, { label: "Name", value: g, onChange: (o) => C(o) }), a.jsx(B, { label: "Position", value: w, onChange: (o) => _(o) }), a.jsx(B, { label: "Direction", value: M, onChange: (o) => f(o) }), a.jsx(u, { label: "Angle", value: N, onChange: (o) => x(o), min: 0, max: Math.PI, step: 0.1 }), a.jsx(u, { label: "Exponent", value: v, onChange: (o) => T(o), min: 0, max: 10, step: 0.1 })] }), a.jsx(b, { selectionService: n, label: "Clustered Light", onCreate: async () => await R(), children: a.jsx(p, { label: "Name", value: K, onChange: (o) => y(o) }) })] });+}, Ca = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("ArcRotate Camera"), [l, d] = i.useState(new G(0, 0, 0)), [S, P] = i.useState(10), [h, H] = i.useState(0), [g, C] = i.useState(45), [w, _] = i.useState(!1), [M, f] = i.useState("Universal Camera"), [N, x] = i.useState(new G(0, 1, -10)), [v, T] = i.useState("Free Camera"), [K, y] = i.useState(new G(0, 1, -10)), [O, U] = i.useState("Follow Camera"), [s, R] = i.useState(new G(0, 5, -10)), [o, z] = i.useState(10), [A, k] = i.useState(4), [E, q] = i.useState(0), [Y, he] = i.useState("Fly Camera"), [ee, pe] = i.useState(new G(0, 1, -10)), [ae, ge] = i.useState("Geospatial Camera"), [te, Ce] = i.useState(6371e3), X = (r) => {+ e.activeCamera || (e.activeCamera = r);+ }, _e = () => {+ const r = w ? h : h * Math.PI / 180, we = w ? g : g * Math.PI / 180, W = new Ve(t, r, we, S, l, e);+ return W.attachControl(e.getEngine().getRenderingCanvas(), !0), X(W), W;+ }, xe = () => {+ const r = new Ye(M, N, e);+ return r.attachControl(e.getEngine().getRenderingCanvas(), !0), X(r), r;+ }, Se = () => {+ const r = new Ze(v, K, e);+ return r.attachControl(e.getEngine().getRenderingCanvas(), !0), X(r), r;+ }, be = () => {+ const r = new We(O, s, e);+ return r.radius = o, r.heightOffset = A, r.rotationOffset = E, r.attachControl(!0), X(r), r;+ }, ve = () => {+ const r = new Je(Y, ee, e);+ return r.attachControl(!0), X(r), r;+ }, ye = () => {+ const r = new Qe(ae, e, { planetRadius: te });+ return r.attachControl(!0), X(r), r;+ };+ return a.jsxs(D, { children: [a.jsxs(b, { selectionService: n, label: "ArcRotate Camera", onCreate: () => _e(), children: [a.jsx(p, { label: "Name", value: t, onChange: (r) => j(r) }), a.jsx(B, { label: "Target", value: l, onChange: (r) => d(r) }), a.jsx(u, { label: "Radius", value: S, onChange: (r) => P(r), min: 0.1, max: 1e3, step: 0.5 }), a.jsx(u, { label: `Alpha ${w ? "(rad)" : "(deg)"}`, value: h, onChange: (r) => H(r), min: w ? -Math.PI * 2 : -360, max: w ? Math.PI * 2 : 360, step: w ? 0.1 : 5 }), a.jsx(u, { label: `Beta ${w ? "(rad)" : "(deg)"}`, value: g, onChange: (r) => C(r), min: 0, max: w ? Math.PI : 180, step: w ? 0.1 : 5 }), a.jsx(J, { label: "Use Radians", value: w, onChange: (r) => _(r) })] }), a.jsxs(b, { selectionService: n, label: "Universal Camera", onCreate: () => xe(), children: [a.jsx(p, { label: "Name", value: M, onChange: (r) => f(r) }), a.jsx(B, { label: "Position", value: N, onChange: (r) => x(r) })] }), a.jsxs(b, { selectionService: n, label: "Free Camera", onCreate: () => Se(), children: [a.jsx(p, { label: "Name", value: v, onChange: (r) => T(r) }), a.jsx(B, { label: "Position", value: K, onChange: (r) => y(r) })] }), a.jsxs(b, { selectionService: n, label: "Follow Camera", onCreate: () => be(), children: [a.jsx(p, { label: "Name", value: O, onChange: (r) => U(r) }), a.jsx(B, { label: "Position", value: s, onChange: (r) => R(r) }), a.jsx(u, { label: "Radius", value: o, onChange: (r) => z(r), min: 0.1, max: 1e3, step: 0.5 }), a.jsx(u, { label: "Height Offset", value: A, onChange: (r) => k(r), min: -100, max: 100, step: 0.5 }), a.jsx(u, { label: "Rotation Offset (deg)", value: E, onChange: (r) => q(r), min: -180, max: 180, step: 5 })] }), a.jsxs(b, { selectionService: n, label: "Fly Camera", onCreate: () => ve(), children: [a.jsx(p, { label: "Name", value: Y, onChange: (r) => he(r) }), a.jsx(B, { label: "Position", value: ee, onChange: (r) => pe(r) })] }), a.jsxs(b, { selectionService: n, label: "Geospatial Camera", onCreate: () => ye(), children: [a.jsx(p, { label: "Name", value: ae, onChange: (r) => ge(r) }), a.jsx(u, { label: "Planet Radius (m)", value: te, onChange: (r) => Ce(r), min: 1e3, max: 1e8, step: 1e3 })] })] });+}, _a = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("Particle System"), [l, d] = i.useState(2e3), [S, P] = i.useState("GPU Particle System"), [h, H] = i.useState(2e3), [g, C] = i.useState("Node Particle System"), [w, _] = i.useState(""), M = async () => await new Promise((x) => {+ setTimeout(() => {+ const v = new $e(t, l, e);+ v.particleTexture = new re("https://assets.babylonjs.com/textures/flare.png", e), v.start(), x(v);+ }, 0);+ }), f = async () => {+ if (!ie.IsSupported)+ throw alert("GPU Particle System is not supported."), new Error("GPU Particle System is not supported.");+ return await new Promise((x) => {+ setTimeout(() => {+ const v = new ie(S, { capacity: h }, e);+ v.particleTexture = new re("https://assets.babylonjs.com/textures/flare.png", e), v.start(), x(v);+ }, 0);+ });+ }, N = async () => {+ let x;+ const v = w.trim();+ v ? (x = await oe.ParseFromSnippetAsync(v), x.name = g) : x = oe.CreateDefault(g);+ const T = await x.buildAsync(e), K = T.systems;+ if (K.length === 0)+ throw new Error("No particle systems were produced by the node particle system.");+ for (const y of K)+ y.name = g;+ return T.start(), K[0];+ };+ return a.jsxs(D, { children: [a.jsxs(b, { selectionService: n, label: "CPU Particle System", onCreate: M, children: [a.jsx(p, { label: "Name", value: t, onChange: (x) => j(x) }), a.jsx(u, { label: "Capacity", value: l, onChange: (x) => d(x), min: 1, max: 1e5, step: 100 })] }), a.jsxs(b, { selectionService: n, label: "GPU Particle System", onCreate: f, children: [a.jsx(p, { label: "Name", value: S, onChange: (x) => P(x) }), a.jsx(u, { label: "Capacity", value: h, onChange: (x) => H(x), min: 1, max: 1e6, step: 1e3 })] }), a.jsxs(b, { selectionService: n, label: "Node Particle System", onCreate: N, children: [a.jsx(p, { label: "Name", value: g, onChange: (x) => C(x) }), a.jsx(p, { label: "Snippet ID", value: w, onChange: (x) => _(x) })] })] });+}, V = (e, n) => {+ const t = n.postProcessRenderPipelineManager.supportedPipelines, j = new Set(t.map((S) => S._name));+ if (!j.has(e))+ return e;+ let l = 1, d = `${e} ${l}`;+ for (; j.has(d); )+ l++, d = `${e} ${l}`;+ return d;+}, xa = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("Default rendering pipeline"), [l, d] = i.useState("SSAO rendering pipeline"), [S, P] = i.useState("SSAO2 rendering pipeline"), [h, H] = i.useState("SSR rendering pipeline"), [g, C] = i.useState("IBL Shadows rendering pipeline"), w = () => {+ const y = V(t, e);+ return new ea(y, !0, e, e.cameras);+ }, _ = () => {+ const y = V(l, e);+ return new aa(y, e, 1, e.cameras);+ }, M = () => {+ const y = V(S, e);+ return new ta(y, e, 1, e.cameras);+ }, f = () => {+ const y = V(h, e);+ return new na(y, e, e.cameras);+ }, N = () => {+ const y = V(g, e);+ return new sa(y, e, {}, e.cameras);+ }, x = e.getEngine().getCaps(), v = x.drawBuffersExtension, T = x.texelFetch, K = Me(e, "activeCamera");+ return a.jsx(D, { children: K ? a.jsxs(a.Fragment, { children: [a.jsx(b, { selectionService: n, label: "Default Pipeline", onCreate: () => w(), children: a.jsx(p, { label: "Name", value: t, onChange: (y) => j(y) }) }), a.jsx(b, { selectionService: n, label: "SSAO Pipeline", onCreate: () => _(), children: a.jsx(p, { label: "Name", value: l, onChange: (y) => d(y) }) }), v && a.jsx(b, { selectionService: n, label: "SSAO2 Pipeline", onCreate: () => M(), children: a.jsx(p, { label: "Name", value: S, onChange: (y) => P(y) }) }), v && T && a.jsx(b, { selectionService: n, label: "SSR Pipeline", onCreate: () => f(), children: a.jsx(p, { label: "Name", value: h, onChange: (y) => H(y) }) }), v && T && a.jsx(b, { selectionService: n, label: "IBL Shadows Pipeline", onCreate: () => N(), children: a.jsx(p, { label: "Name", value: g, onChange: (y) => C(y) }) })] }) : a.jsx(Ke, { message: "Cannot create rendering pipeline without an active camera.", title: "No active camera", intent: "info" }) });+};+function Sa(e, n) {+ let t = e, j = 1;+ for (; n.getFrameGraphByName(t); )+ t = e + " " + j++;+ return t;+}+const ba = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("Frame Graph"), l = () => {+ const d = Sa(t, e), S = new ra(d, e);+ return S.setToDefault(), S.buildAsync(), S.frameGraph;+ };+ return a.jsx(D, { children: a.jsx(b, { selectionService: n, label: "Frame Graph", onCreate: () => l(), children: a.jsx(p, { label: "Name", value: t, onChange: (d) => j(d) }) }) });+}, va = ({ scene: e, selectionService: n }) => {+ const [t, j] = i.useState("Sprite Manager"), [l, d] = i.useState(500), [S, P] = i.useState(64), [h, H] = i.useState("https://assets.babylonjs.com/textures/player.png"), g = () => new ia(t, h, l, S, e);+ return a.jsx(D, { children: a.jsxs(b, { selectionService: n, label: "Sprite Manager", onCreate: () => g(), children: [a.jsx(p, { label: "Name", value: t, onChange: (C) => j(C) }), a.jsx(p, { label: "Texture URL", value: h, onChange: (C) => H(C) }), a.jsx(u, { label: "Capacity", value: l, onChange: (C) => d(C), min: 1, max: 1e4, step: 100 }), a.jsx(u, { label: "Cell Size", value: S, onChange: (C) => P(C), min: 1, max: 1024, step: 1 })] }) });+}, de = {+ friendlyName: "Creation Tools",+ consumes: [Re, fe, Pe],+ factory: (e, n, t) => {+ const j = e.addSidePane({+ key: "Create",+ title: "Creation Tools",+ icon: oa,+ horizontalLocation: "left",+ verticalLocation: "top",+ content: () => {+ const l = Ne(() => n.currentScene, n.currentSceneObservable);+ return l && a.jsx(a.Fragment, { children: a.jsxs(He, { children: [a.jsx(I, { title: "Meshes", children: a.jsx(ha, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Materials", children: a.jsx(pa, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Lights", children: a.jsx(ga, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Particles", children: a.jsx(_a, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Cameras", children: a.jsx(Ca, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Rendering Pipelines", children: a.jsx(xa, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Frame Graphs", children: a.jsx(ba, { scene: l, selectionService: t }) }), a.jsx(I, { title: "Sprite Managers", children: a.jsx(va, { scene: l, selectionService: t }) })] }) });+ }+ });+ return {+ dispose: () => j.dispose()+ };+ }+};+var ya = {+ serviceDefinitions: [de]+};+const Ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({+ __proto__: null,+ CreateToolsServiceDefinition: de,+ default: ya+}, Symbol.toStringTag, { value: "Module" }));+export {+ le as B,+ ce as O,+ me as S,+ la as a,+ Ra as q+};
vendor/adom-step/vendor/3d-viewer-dist/chunk-g5capz7O.jsadded+31@@ -0,0 +1,31 @@+import { bX as n, bV as r, bY as a, bZ as o, R as h } from "./chunk-IERganv1.js";+class p extends n {+ /**+ * Creates a new FlowGraphPointerMoveEventBlock.+ * @param config optional configuration+ */+ constructor(e) {+ super(e), this.type = "PointerMove", this.targetMesh = this.registerDataInput("targetMesh", r, e?.targetMesh), this.pointerId = this.registerDataOutput("pointerId", a), this.meshUnderPointer = this.registerDataOutput("meshUnderPointer", r), this.pickedPoint = this.registerDataOutput("pickedPoint", r);+ }+ /** @internal */+ _executeEvent(e, s) {+ const i = this.targetMesh.getValue(e), t = s.pickInfo?.pickedMesh;+ return i && !(t === i || t && o(t, i)) ? !0 : (this.pointerId.setValue(s.event.pointerId, e), this.meshUnderPointer.setValue(t ?? null, e), this.pickedPoint.setValue(s.pickInfo?.pickedPoint ?? null, e), this._execute(e), !this.config?.stopPropagation);+ }+ /** @internal */+ _preparePendingTasks(e) {+ }+ /** @internal */+ _cancelPendingTasks(e) {+ }+ /**+ * @returns the class name of the block.+ */+ getClassName() {+ return "FlowGraphPointerMoveEventBlock";+ }+}+h("FlowGraphPointerMoveEventBlock", p);+export {+ p as FlowGraphPointerMoveEventBlock+};