schematic-renderer 1.4.3 → 1.4.5

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.
@@ -70,7 +70,6 @@ export declare class BlockMeshBuilder {
70
70
  private getMaterialKey;
71
71
  private createFaceMaterial;
72
72
  private mergeGeometries;
73
- private manualMergeGeometries;
74
73
  private isLiquidBlock;
75
74
  private isWaterBlock;
76
75
  private static readonly ALWAYS_WATERLOGGED;
@@ -1 +1 @@
1
- {"version":3,"file":"BlockMeshBuilder.d.ts","sourceRoot":"","sources":["../../src/cubane/BlockMeshBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAqB,aAAa,EAAE,MAAM,SAAS,CAAC;AAU9E,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,WAAW,CAAc;IAGjC,OAAO,CAAC,iBAAiB,CAAU;gBAEvB,WAAW,EAAE,WAAW,EAAE,OAAO,GAAE;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAO;IAKtE,eAAe,CAC3B,KAAK,EAAE,UAAU,EACjB,SAAS,GAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAO,EAC3E,KAAK,CAAC,EAAE,KAAK,EACb,KAAK,GAAE,MAAiB,GACtB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;IAWb,sBAAsB,CAClC,KAAK,EAAE,UAAU,EACjB,SAAS,GAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAA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AmF9B,OAAO,CAAC,cAAc;YAiBR,kBAAkB;IAwIhC,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAMvC;IAEH,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,eAAe;IAqCvB,OAAO,CAAC,qBAAqB;CAiB7B"}
@@ -0,0 +1,19 @@
1
+ import * as THREE from "three";
2
+ /**
3
+ * Merge BufferGeometries into one — concatenating position/normal/uv and offsetting
4
+ * each sub-geometry's indices by the running vertex count.
5
+ *
6
+ * Writes straight into preallocated typed arrays with `.set()` (a memcpy-style bulk
7
+ * copy), so there is no per-element `push`, no `Array.from` intermediates, and no
8
+ * argument spread. That makes it both fast (one allocation per attribute, no GC churn
9
+ * from a growing `number[]`) and safe on large meshes: the previous implementation did
10
+ * `array.push(...Array.from(typedArray))`, which spreads every float as a call argument
11
+ * and throws `RangeError: Maximum call stack size exceeded` once a geometry is large
12
+ * enough.
13
+ *
14
+ * Only geometries with a non-empty position attribute and a non-empty index are merged.
15
+ * Empty input yields an empty geometry; a single input is cloned. Normals are computed
16
+ * if the inputs don't supply them.
17
+ */
18
+ export declare function mergeBufferGeometries(geometries: THREE.BufferGeometry[]): THREE.BufferGeometry;
19
+ //# sourceMappingURL=mergeBufferGeometries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeBufferGeometries.d.ts","sourceRoot":"","sources":["../../src/cubane/mergeBufferGeometries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,cAAc,EAAE,GAAG,KAAK,CAAC,cAAc,CA4D9F"}
@@ -1 +1 @@
1
- {"version":3,"file":"CameraManager.d.ts","sourceRoot":"","sources":["../../src/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;;;;;OAKG;IACI,kBAAkB,CACxB,YAAY,EAAE,MAAM,EACpB,UAAU,GAAE,MAAW,EACvB,OAAO,GAAE,OAAc,GACrB,IAAI;IAqCP;;;OAGG;IACI,oBAAoB,CAAC,OAAO,GAAE,OAAc,GAAG,IAAI;IAK1D;;;OAGG;IACI,kBAAkB,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAc3D,OAAO,IAAI,IAAI;IA0BtB,+BAA+B;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAmBxB;IAEX;;;;;;OAMG;IACI,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,OAAc,GAAG,IAAI;IAgChE;;;;OAIG;IACI,eAAe,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAE,OAAc,GAAG,IAAI;IAgC1F,4CAA4C;IAC5C,OAAO,CAAC,iBAAiB;IAQzB;;OAEG;WACW,aAAa,IAAI,MAAM,EAAE;IAMvC;;;;;;;OAOG;IACI,wBAAwB,CAC9B,SAAS,EAAE,KAAK,CAAC,OAAO,EACxB,WAAW,EAAE,KAAK,CAAC,IAAI,EACvB,OAAO,GAAE,MAAa,GACpB,MAAM;CA2CT"}
@@ -5,10 +5,10 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import dU, { CircuitBuilderWrapper as LU, IoTypeWrapper as cZ, LayoutFunctionWrapper as eD, ExecutionModeWrapper as YD, DefinitionRegionWrapper as ri, BlockPosition as Zi, SortStrategyWrapper as yD, SchematicWrapper as oD } from "nucleation";
8
- import { BlockPosition as UT, CircuitBuilderWrapper as WT, DefinitionRegionWrapper as nT, ExecutionModeWrapper as cT, IoLayoutBuilderWrapper as zT, IoLayoutWrapper as PT, IoTypeWrapper as OT, LayoutFunctionWrapper as bT, MchprsWorldWrapper as RT, OutputConditionWrapper as FT, SchematicBuilderWrapper as TT, SchematicWrapper as BT, SimulationOptionsWrapper as XT, SortStrategyWrapper as eT, StateModeConstants as YT, TypedCircuitExecutorWrapper as yT, ValueWrapper as oT, default as ET } from "nucleation";
8
+ import { BlockPosition as WT, CircuitBuilderWrapper as nT, DefinitionRegionWrapper as cT, ExecutionModeWrapper as zT, IoLayoutBuilderWrapper as PT, IoLayoutWrapper as OT, IoTypeWrapper as bT, LayoutFunctionWrapper as RT, MchprsWorldWrapper as FT, OutputConditionWrapper as TT, SchematicBuilderWrapper as BT, SchematicWrapper as XT, SimulationOptionsWrapper as eT, SortStrategyWrapper as YT, StateModeConstants as yT, TypedCircuitExecutorWrapper as oT, ValueWrapper as ET, default as tT } from "nucleation";
9
9
  import * as Q from "three";
10
10
  import { Ray as QU, Plane as UU, MathUtils as _i, Vector3 as UA, Controls as kl, MOUSE as fi, TOUCH as hi, Quaternion as SI, Spherical as ED, Vector2 as EI, Euler as Hl, EventDispatcher as WU, UniformsLib as aZ, ShaderLib as GZ, UniformsUtils as $g, ShaderMaterial as nU, Box3 as fZ, InstancedBufferGeometry as cU, Float32BufferAttribute as xZ, InstancedInterleavedBuffer as Xl, InterleavedBufferAttribute as ni, WireframeGeometry as zU, Sphere as rl, Vector4 as Yw, Matrix4 as QC, Line3 as PU, Mesh as nA, DataTextureLoader as OU, HalfFloatType as zZ, FloatType as Vl, DataUtils as PZ, LinearSRGBColorSpace as TC, LinearFilter as $i, Color as Mi, REVISION as bU, CompressedTexture as sl, Source as RU, NoColorSpace as FU, RGBAFormat as TU, ImageUtils as BU, DoubleSide as fl, PropertyBinding as Xw, InterpolateDiscrete as AV, BufferAttribute as FC, Scene as tD, InterpolateLinear as Kl, NearestFilter as ql, NearestMipmapNearestFilter as IV, NearestMipmapLinearFilter as CV, LinearMipmapNearestFilter as iV, LinearMipmapLinearFilter as _l, ClampToEdgeWrapping as wV, RepeatWrapping as vZ, MirroredRepeatWrapping as ZV, SRGBColorSpace as Aw, Raycaster as XU, Object3D as Iw, MeshBasicMaterial as ci, LineBasicMaterial as MV, CylinderGeometry as vI, BoxGeometry as yI, BufferGeometry as el, OctahedronGeometry as OZ, Line as xC, SphereGeometry as eU, TorusGeometry as Ww, PlaneGeometry as YU, TrianglesDrawMode as yU, TriangleFanDrawMode as Yl, TriangleStripDrawMode as lV, Loader as oU, LoaderUtils as Tw, FileLoader as mV, SpotLight as EU, PointLight as tU, DirectionalLight as SU, MeshPhysicalMaterial as BC, InstancedMesh as aU, InstancedBufferAttribute as GU, TextureLoader as pU, ImageBitmapLoader as uU, InterleavedBuffer as xU, PointsMaterial as vU, Material as Jl, MeshStandardMaterial as jV, SkinnedMesh as hU, LineSegments as kU, LineLoop as HU, Points as rU, Group as Nl, PerspectiveCamera as fU, OrthographicCamera as KU, Skeleton as qU, AnimationClip as _U, Bone as $U, ColorManagement as SD, FrontSide as AW, Texture as aD, VectorKeyframeTrack as GD, NumberKeyframeTrack as pD, QuaternionKeyframeTrack as uD, Interpolant as IW } from "three";
11
- let iw, gc, mc, Bn, sc, SW, ac, Xn, Gc, Im, Ec, _g, fF, lc, pV, pc, Nc, jc, ic, Jc, OV, hl, GV, dc, qA, Yc, lA, RC, Mc;
11
+ let iw, gc, mc, Bn, sc, SW, ac, Xn, Gc, Im, Ec, _g, KF, lc, pV, pc, Nc, jc, ic, Jc, OV, hl, GV, dc, qA, Yc, lA, RC, Mc;
12
12
  let __tla = (async () => {
13
13
  var _a, _b2, _c2;
14
14
  var CW = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
@@ -2828,18 +2828,16 @@ ${C || "(no log captured)"}`);
2828
2828
  }
2829
2829
  }
2830
2830
  snapToDirection(A, I = true) {
2831
- var _a2;
2832
- const C = this.getControlsTarget(), i = this.activeCamera.camera, w = i.position.distanceTo(C), Z = new Q.Vector3(A[0], A[1], A[2]);
2833
- if (Z.lengthSq() < 1e-6)
2831
+ var _a2, _b3, _c3;
2832
+ const C = this.activeCamera.camera, i = new Q.Vector3(A[0], A[1], A[2]);
2833
+ if (i.lengthSq() < 1e-6)
2834
2834
  return;
2835
- Z.normalize();
2836
- const l = C.clone().add(Z.multiplyScalar(w));
2837
- i.position.copy(l), i.lookAt(C);
2835
+ i.normalize();
2836
+ const w = this.calculateSchematicBounds(), Z = w ? w.center.clone() : this.getControlsTarget();
2837
+ let l = C.position.distanceTo(Z);
2838
+ I && w && C instanceof Q.PerspectiveCamera && (l = this.calculateFramingDistance(i, w.boundingBox, 0.05)), C.position.copy(Z.clone().add(i.clone().multiplyScalar(l))), C.lookAt(Z);
2838
2839
  const j = this.controls.get(this.activeControlKey);
2839
- j && "target" in j && (j.target.copy(C), (_a2 = j.update) == null ? void 0 : _a2.call(j)), I && this.focusOnSchematics({
2840
- padding: 0.05,
2841
- animationDuration: 0
2842
- });
2840
+ j && "target" in j && (j.target.copy(Z), (_a2 = j.update) == null ? void 0 : _a2.call(j)), (_c3 = (_b3 = this.schematicRenderer).invalidate) == null ? void 0 : _c3.call(_b3);
2843
2841
  }
2844
2842
  getControlsTarget() {
2845
2843
  const A = this.controls.get(this.activeControlKey);
@@ -30129,6 +30127,33 @@ function print() { __p += __j.call(arguments, '') }
30129
30127
  return true;
30130
30128
  }
30131
30129
  }
30130
+ function rF(U) {
30131
+ const A = U.filter((c) => c.attributes.position && c.attributes.position.count > 0 && c.index && c.index.count > 0);
30132
+ if (A.length === 0)
30133
+ return new Q.BufferGeometry();
30134
+ if (A.length === 1)
30135
+ return A[0].clone();
30136
+ let I = 0, C = 0, i = true, w = true;
30137
+ for (const c of A)
30138
+ I += c.attributes.position.count, C += c.index ? c.index.count : c.attributes.position.count, c.attributes.normal || (i = false), c.attributes.uv || (w = false);
30139
+ const Z = A[0].attributes.position.itemSize, l = i ? A[0].attributes.normal.itemSize : 3, j = w ? A[0].attributes.uv.itemSize : 2, D = new Float32Array(I * Z), g = i ? new Float32Array(I * l) : null, V = w ? new Float32Array(I * j) : null, J = I > 65535 ? new Uint32Array(C) : new Uint16Array(C);
30140
+ let N = 0, L = 0;
30141
+ for (const c of A) {
30142
+ const n = c.attributes.position.count;
30143
+ D.set(c.attributes.position.array, N * Z), g && g.set(c.attributes.normal.array, N * l), V && V.set(c.attributes.uv.array, N * j);
30144
+ const z = c.index;
30145
+ if (z) {
30146
+ const P = z.array;
30147
+ for (let F = 0; F < P.length; F++)
30148
+ J[L++] = P[F] + N;
30149
+ } else
30150
+ for (let P = 0; P < n; P++)
30151
+ J[L++] = N + P;
30152
+ N += n;
30153
+ }
30154
+ const d = new Q.BufferGeometry();
30155
+ return d.setAttribute("position", new Q.BufferAttribute(D, Z)), g && d.setAttribute("normal", new Q.BufferAttribute(g, l)), V && d.setAttribute("uv", new Q.BufferAttribute(V, j)), d.setIndex(new Q.BufferAttribute(J, 1)), i || d.computeVertexNormals(), d;
30156
+ }
30132
30157
  const _Cm = class _Cm {
30133
30158
  constructor(A, I = {}) {
30134
30159
  __publicField(this, "assetLoader");
@@ -30739,55 +30764,7 @@ function print() { __p += __j.call(arguments, '') }
30739
30764
  }
30740
30765
  }
30741
30766
  mergeGeometries(A) {
30742
- const I = A.filter((C) => C.attributes.position && C.attributes.position.count > 0 && C.index && C.index.count > 0);
30743
- return I.length === 0 ? new Q.BufferGeometry() : I.length === 1 ? I[0].clone() : this.manualMergeGeometries(I);
30744
- }
30745
- manualMergeGeometries(A) {
30746
- const I = new Q.BufferGeometry(), C = [
30747
- "position",
30748
- "normal",
30749
- "uv"
30750
- ], i = {};
30751
- let w = 0, Z = 0, l = true, j = true;
30752
- for (const V of A)
30753
- w += V.attributes.position.count, V.index ? Z += V.index.count : Z += V.attributes.position.count, V.attributes.normal || (l = false), V.attributes.uv || (j = false);
30754
- for (const V of C) {
30755
- if (V === "normal" && !l || V === "uv" && !j)
30756
- continue;
30757
- const J = A.find((N) => N.attributes[V]);
30758
- J && (i[V] = {
30759
- array: [],
30760
- itemSize: J.attributes[V].itemSize
30761
- });
30762
- }
30763
- const D = [];
30764
- let g = 0;
30765
- for (const V of A) {
30766
- for (const J in i) {
30767
- const N = V.attributes[J];
30768
- if (N)
30769
- i[J].array.push(...Array.from(N.array));
30770
- else if (J === "normal" || J === "uv") {
30771
- const L = V.attributes.position.count, d = i[J].itemSize;
30772
- i[J].array.push(...new Array(L * d).fill(0));
30773
- }
30774
- }
30775
- if (V.index) {
30776
- const J = Array.from(V.index.array);
30777
- for (const N of J)
30778
- D.push(N + g);
30779
- } else {
30780
- const J = V.attributes.position.count;
30781
- for (let N = 0; N < J; N++)
30782
- D.push(g + N);
30783
- }
30784
- g += V.attributes.position.count;
30785
- }
30786
- for (const V in i) {
30787
- const { array: J, itemSize: N } = i[V];
30788
- I.setAttribute(V, new Q.Float32BufferAttribute(J, N));
30789
- }
30790
- return I.setIndex(D), !l && I.attributes.position && I.computeVertexNormals(), I;
30767
+ return rF(A);
30791
30768
  }
30792
30769
  isLiquidBlock(A) {
30793
30770
  if (!A)
@@ -30874,7 +30851,7 @@ function print() { __p += __j.call(arguments, '') }
30874
30851
  "minecraft:bubble_column"
30875
30852
  ]));
30876
30853
  let Cm = _Cm;
30877
- class rF {
30854
+ class fF {
30878
30855
  constructor() {
30879
30856
  __publicField(this, "packs", /* @__PURE__ */ new Map());
30880
30857
  __publicField(this, "packOrder", []);
@@ -31613,7 +31590,7 @@ function print() { __p += __j.call(arguments, '') }
31613
31590
  __publicField(this, "lastPackLoadedFromCache", false);
31614
31591
  this.showUnknownBlocks = (A == null ? void 0 : A.showUnknownBlocks) ?? false, this.assetLoader = new fc(), this.modelResolver = new HF(this.assetLoader), this.blockMeshBuilder = new Cm(this.assetLoader, {
31615
31592
  showUnknownBlocks: this.showUnknownBlocks
31616
- }), this.entityRenderer = new uF(), this.signRenderer = new kF(this.assetLoader), this.packManager = new rF(), this.assetLoader.setPackManager(this.packManager), this.packManager.setMeshRebuildCallback(() => {
31593
+ }), this.entityRenderer = new uF(), this.signRenderer = new kF(this.assetLoader), this.packManager = new fF(), this.assetLoader.setPackManager(this.packManager), this.packManager.setMeshRebuildCallback(() => {
31617
31594
  this.clearMeshCaches();
31618
31595
  });
31619
31596
  const I = (A == null ? void 0 : A.autoRestore) ?? true, C = this.packManager;
@@ -32253,7 +32230,7 @@ function print() { __p += __j.call(arguments, '') }
32253
32230
  this.assetLoader.dispose(), this.clearMeshCaches();
32254
32231
  }
32255
32232
  }
32256
- fF = class {
32233
+ KF = class {
32257
32234
  constructor(A, I, C = {}) {
32258
32235
  __publicField(this, "enabled");
32259
32236
  __publicField(this, "flySpeed");
@@ -32361,7 +32338,7 @@ function print() { __p += __j.call(arguments, '') }
32361
32338
  }
32362
32339
  };
32363
32340
  let aV = null, qg = false;
32364
- async function KF() {
32341
+ async function qF() {
32365
32342
  if (qg)
32366
32343
  return;
32367
32344
  console.log("[InspectorManager] Lazy-loading debug GUI (lil-gui)...");
@@ -32384,7 +32361,7 @@ function print() { __p += __j.call(arguments, '') }
32384
32361
  }, this.options.enableInspector && this.initialize();
32385
32362
  }
32386
32363
  async initialize() {
32387
- if (await KF(), this.gui = new aV({
32364
+ if (await qF(), this.gui = new aV({
32388
32365
  title: "Schematic Renderer",
32389
32366
  width: 300
32390
32367
  }), this.gui.domElement.parentElement && (this.gui.domElement.parentElement.style.zIndex = "9999"), this.initializeState(), this.addRendererPanel(), this.addScenePanel(), this.addCameraPanel(), this.addPerformancePanel(), this.addGPUPanel(), this.options.customPanels)
@@ -32664,7 +32641,7 @@ function print() { __p += __j.call(arguments, '') }
32664
32641
  this.gui && (this.gui.destroy(), this.gui = null), this.panels.clear();
32665
32642
  }
32666
32643
  };
32667
- class qF {
32644
+ class _F {
32668
32645
  constructor(A, I) {
32669
32646
  __publicField(this, "renderer");
32670
32647
  __publicField(this, "name");
@@ -32903,7 +32880,7 @@ function print() { __p += __j.call(arguments, '') }
32903
32880
  return this.baseRegion.free(), this.baseRegion = A.clone(), this.updateActiveRegion(), this;
32904
32881
  }
32905
32882
  }
32906
- class _F extends XC.EventEmitter {
32883
+ class $F extends XC.EventEmitter {
32907
32884
  constructor(A) {
32908
32885
  super();
32909
32886
  __publicField(this, "renderer");
@@ -32935,7 +32912,7 @@ function print() { __p += __j.call(arguments, '') }
32935
32912
  const l = this.regions.get(A);
32936
32913
  return l.setBounds(new Q.Vector3(I.x, I.y, I.z), new Q.Vector3(C.x, C.y, C.z)), w && (w.color !== void 0 && l.setColor(w.color), w.opacity !== void 0 && l.setOpacity(w.opacity)), l;
32937
32914
  }
32938
- const Z = new qF(this.renderer, {
32915
+ const Z = new _F(this.renderer, {
32939
32916
  name: A,
32940
32917
  min: I,
32941
32918
  max: C,
@@ -33077,7 +33054,7 @@ function print() { __p += __j.call(arguments, '') }
33077
33054
  this.regions.forEach((A) => A.dispose()), this.regions.clear(), this.definitionRegionNames.clear();
33078
33055
  }
33079
33056
  }
33080
- class $F {
33057
+ class AT {
33081
33058
  constructor(A) {
33082
33059
  __publicField(this, "renderer");
33083
33060
  __publicField(this, "raycaster");
@@ -33233,7 +33210,7 @@ function print() { __p += __j.call(arguments, '') }
33233
33210
  __publicField(this, "needsRender", true);
33234
33211
  __publicField(this, "continuousReasons", /* @__PURE__ */ new Set());
33235
33212
  var _a2, _b3, _c3;
33236
- this.canvas = A, this.options = Xc.merge({}, Bc, i), this.targetFPS = this.options.targetFPS ?? 60, this.frameInterval = this.targetFPS > 0 ? 1e3 / this.targetFPS : 0, this.idleFPS = this.options.idleFPS ?? 1, this.enableAnimatedTextures = this.options.enableAnimatedTextures ?? false, this.timer = new Q.Timer(), this.materialMap = /* @__PURE__ */ new Map(), this.eventEmitter = new XC.EventEmitter(), this.canvas.schematicRenderer = this, this.sceneManager = new hW(this), this.uiManager = new ec(this), this.cameraManager = new oI(this, i.cameraOptions), this.keyboardControls = new fF(this.cameraManager.activeCamera.camera, this.canvas, i.keyboardControlsOptions), this.sceneManager.updateHelpers(), this.eventEmitter.emit("sceneReady"), this.resourcePackManager = new YV(this.options.resourcePackOptions), this.packs = new ic(this.resourcePackManager), this.setupResourcePackCallbacks(), ((_a2 = this.options.sidebarOptions) == null ? void 0 : _a2.enabled) !== false && (this.sidebar = new dc(this, this.options.sidebarOptions)), this.options.showSlicerOverlay && (this.slicerOverlay = new Xg(this, this.options.slicerOverlayOptions)), this.state = {
33213
+ this.canvas = A, this.options = Xc.merge({}, Bc, i), this.targetFPS = this.options.targetFPS ?? 60, this.frameInterval = this.targetFPS > 0 ? 1e3 / this.targetFPS : 0, this.idleFPS = this.options.idleFPS ?? 1, this.enableAnimatedTextures = this.options.enableAnimatedTextures ?? false, this.timer = new Q.Timer(), this.materialMap = /* @__PURE__ */ new Map(), this.eventEmitter = new XC.EventEmitter(), this.canvas.schematicRenderer = this, this.sceneManager = new hW(this), this.uiManager = new ec(this), this.cameraManager = new oI(this, i.cameraOptions), this.keyboardControls = new KF(this.cameraManager.activeCamera.camera, this.canvas, i.keyboardControlsOptions), this.sceneManager.updateHelpers(), this.eventEmitter.emit("sceneReady"), this.resourcePackManager = new YV(this.options.resourcePackOptions), this.packs = new ic(this.resourcePackManager), this.setupResourcePackCallbacks(), ((_a2 = this.options.sidebarOptions) == null ? void 0 : _a2.enabled) !== false && (this.sidebar = new dc(this, this.options.sidebarOptions)), this.options.showSlicerOverlay && (this.slicerOverlay = new Xg(this, this.options.slicerOverlayOptions)), this.state = {
33237
33214
  cameraPosition: new Q.Vector3()
33238
33215
  }, this.options.enableProgressBar && this.uiManager && (this.uiManager.showProgressBar("Initializing renderer..."), this.uiManager.updateProgress(0.1)), this.options.context ? (this.cubane = this.options.context.cubane, this.options.context.attachRenderer(this)) : this.cubane = new vl({
33239
33216
  showUnknownBlocks: (_b3 = this.options.debugOptions) == null ? void 0 : _b3.showUnknownBlocks
@@ -33288,7 +33265,7 @@ function print() { __p += __j.call(arguments, '') }
33288
33265
  onSchematicFileLoadFailure: (_e = (_d = this.options) == null ? void 0 : _d.callbacks) == null ? void 0 : _e.onSchematicFileLoadFailure
33289
33266
  }
33290
33267
  };
33291
- this.schematicManager = new Gn(this, Z), this.renderManager = new _W(this), await this.renderManager.initialize(), this.highlightManager = new en(this), this.insignManager = new Im(this), this.insignIoManager = new Gc(this), this.regionManager = new _F(this), this.regionInteractionHandler = new $F(this), this.overlayManager = new pc(this), this.options.enableGizmos && (this.gizmoManager = new Tc(this)), Object.keys(A).length > 0 && (C("Loading initial schematics...", 0.75), await this.schematicManager.loadSchematics(A)), C("Finalizing setup...", 0.9), this.schematicManager.isEmpty() || this.cameraManager.focusOnSchematics({
33268
+ this.schematicManager = new Gn(this, Z), this.renderManager = new _W(this), await this.renderManager.initialize(), this.highlightManager = new en(this), this.insignManager = new Im(this), this.insignIoManager = new Gc(this), this.regionManager = new $F(this), this.regionInteractionHandler = new AT(this), this.overlayManager = new pc(this), this.options.enableGizmos && (this.gizmoManager = new Tc(this)), Object.keys(A).length > 0 && (C("Loading initial schematics...", 0.75), await this.schematicManager.loadSchematics(A)), C("Finalizing setup...", 0.9), this.schematicManager.isEmpty() || this.cameraManager.focusOnSchematics({
33292
33269
  animationDuration: 0
33293
33270
  }), this.initializeInteractionComponents(), C("Ready", 1), this.animate(), ((_f = this.options.debugOptions) == null ? void 0 : _f.enableInspector) && (this.inspectorManager = new _g(this, this.options.debugOptions)), (_h = (_g2 = this.options.callbacks) == null ? void 0 : _g2.onRendererInitialized) == null ? void 0 : _h.call(_g2, this), this.canvas.dispatchEvent(new CustomEvent("rendererInitialized")), this.options.enableProgressBar && this.uiManager && this.uiManager.hideProgressBar();
33294
33271
  } catch (C) {
@@ -34057,13 +34034,13 @@ function print() { __p += __j.call(arguments, '') }
34057
34034
  })();
34058
34035
  export {
34059
34036
  iw as BasePanel,
34060
- UT as BlockPosition,
34037
+ WT as BlockPosition,
34061
34038
  gc as CapturePanel,
34062
- WT as CircuitBuilderWrapper,
34039
+ nT as CircuitBuilderWrapper,
34063
34040
  mc as ControlsPanel,
34064
34041
  Bn as CustomIoHighlight,
34065
- nT as DefinitionRegionWrapper,
34066
- cT as ExecutionModeWrapper,
34042
+ cT as DefinitionRegionWrapper,
34043
+ zT as ExecutionModeWrapper,
34067
34044
  sc as ExportPanel,
34068
34045
  SW as FlyControls,
34069
34046
  ac as InsignIoHighlight,
@@ -34072,36 +34049,36 @@ export {
34072
34049
  Im as InsignManager,
34073
34050
  Ec as InsignRegionHighlight,
34074
34051
  _g as InspectorManager,
34075
- zT as IoLayoutBuilderWrapper,
34076
- PT as IoLayoutWrapper,
34077
- OT as IoTypeWrapper,
34078
- fF as KeyboardControls,
34052
+ PT as IoLayoutBuilderWrapper,
34053
+ OT as IoLayoutWrapper,
34054
+ bT as IoTypeWrapper,
34055
+ KF as KeyboardControls,
34079
34056
  lc as KeyboardShortcutManager,
34080
34057
  pV as KeyframeTrack,
34081
- bT as LayoutFunctionWrapper,
34082
- RT as MchprsWorldWrapper,
34083
- FT as OutputConditionWrapper,
34058
+ RT as LayoutFunctionWrapper,
34059
+ FT as MchprsWorldWrapper,
34060
+ TT as OutputConditionWrapper,
34084
34061
  pc as OverlayManager,
34085
34062
  Nc as PerformancePanel,
34086
34063
  jc as RenderSettingsPanel,
34087
34064
  ic as ResourcePackManagerProxy,
34088
34065
  Jc as ResourcePackPanel,
34089
- TT as SchematicBuilderWrapper,
34066
+ BT as SchematicBuilderWrapper,
34090
34067
  OV as SchematicExporter,
34091
34068
  hl as SchematicRenderer,
34092
34069
  GV as SchematicRendererContext,
34093
- BT as SchematicWrapper,
34070
+ XT as SchematicWrapper,
34094
34071
  dc as SidebarManager,
34095
34072
  qA as SimulationLogger,
34096
34073
  Yc as SimulationManager,
34097
- XT as SimulationOptionsWrapper,
34098
- eT as SortStrategyWrapper,
34099
- YT as StateModeConstants,
34100
- yT as TypedCircuitExecutorWrapper,
34074
+ eT as SimulationOptionsWrapper,
34075
+ YT as SortStrategyWrapper,
34076
+ yT as StateModeConstants,
34077
+ oT as TypedCircuitExecutorWrapper,
34101
34078
  lA as UIColors,
34102
34079
  RC as UIStyles,
34103
34080
  Mc as UnifiedSidebar,
34104
- oT as ValueWrapper,
34081
+ ET as ValueWrapper,
34105
34082
  __tla,
34106
- ET as initializeNucleationWasm
34083
+ tT as initializeNucleationWasm
34107
34084
  };