schematic-renderer 1.4.4 → 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.
- package/dist/cubane/BlockMeshBuilder.d.ts +0 -1
- package/dist/cubane/BlockMeshBuilder.d.ts.map +1 -1
- package/dist/cubane/mergeBufferGeometries.d.ts +19 -0
- package/dist/cubane/mergeBufferGeometries.d.ts.map +1 -0
- package/dist/schematic-renderer.es.js +60 -81
- package/dist/schematic-renderer.umd.js +100 -100
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockMeshBuilder.d.ts","sourceRoot":"","sources":["../../src/cubane/BlockMeshBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BlockMeshBuilder.d.ts","sourceRoot":"","sources":["../../src/cubane/BlockMeshBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/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,EAAE,KAAK,CAAA;KAAO,EAC3E,KAAK,CAAC,EAAE,KAAK,EACb,KAAK,GAAE,MAAiB,GACtB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;IAsFb,0BAA0B,CACtC,KAAK,EAAE,UAAU,EACjB,SAAS,GAAE;QACV,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,KAAK,CAAC;KACT,EACN,KAAK,CAAC,EAAE,KAAK,EACb,KAAK,GAAE,MAAiB,GACtB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;IAuE1B,OAAO,CAAC,aAAa;YAmBP,uBAAuB;YAwDvB,4BAA4B;YA0I5B,sBAAsB;IAmEpC,OAAO,CAAC,8BAA8B;IAuEtC,OAAO,CAAC,cAAc;YA+BR,kBAAkB;IAuGhC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA6B3B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAwExB;;OAEG;IACU,uBAAuB,CACnC,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;QACV,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC;QAC5C,gBAAgB,EAAE,aAAa,EAAE,CAAC;QAClC,eAAe,EAAE,OAAO,CAAC;KACzB,CAAC;IAsCF;;OAEG;YACW,mBAAmB;IAgEjC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAcxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,sBAAsB;IAmF9B,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"}
|
|
@@ -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
|
|
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,
|
|
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 : {};
|
|
@@ -30127,6 +30127,33 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30127
30127
|
return true;
|
|
30128
30128
|
}
|
|
30129
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
|
+
}
|
|
30130
30157
|
const _Cm = class _Cm {
|
|
30131
30158
|
constructor(A, I = {}) {
|
|
30132
30159
|
__publicField(this, "assetLoader");
|
|
@@ -30737,55 +30764,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30737
30764
|
}
|
|
30738
30765
|
}
|
|
30739
30766
|
mergeGeometries(A) {
|
|
30740
|
-
|
|
30741
|
-
return I.length === 0 ? new Q.BufferGeometry() : I.length === 1 ? I[0].clone() : this.manualMergeGeometries(I);
|
|
30742
|
-
}
|
|
30743
|
-
manualMergeGeometries(A) {
|
|
30744
|
-
const I = new Q.BufferGeometry(), C = [
|
|
30745
|
-
"position",
|
|
30746
|
-
"normal",
|
|
30747
|
-
"uv"
|
|
30748
|
-
], i = {};
|
|
30749
|
-
let w = 0, Z = 0, l = true, j = true;
|
|
30750
|
-
for (const V of A)
|
|
30751
|
-
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);
|
|
30752
|
-
for (const V of C) {
|
|
30753
|
-
if (V === "normal" && !l || V === "uv" && !j)
|
|
30754
|
-
continue;
|
|
30755
|
-
const J = A.find((N) => N.attributes[V]);
|
|
30756
|
-
J && (i[V] = {
|
|
30757
|
-
array: [],
|
|
30758
|
-
itemSize: J.attributes[V].itemSize
|
|
30759
|
-
});
|
|
30760
|
-
}
|
|
30761
|
-
const D = [];
|
|
30762
|
-
let g = 0;
|
|
30763
|
-
for (const V of A) {
|
|
30764
|
-
for (const J in i) {
|
|
30765
|
-
const N = V.attributes[J];
|
|
30766
|
-
if (N)
|
|
30767
|
-
i[J].array.push(...Array.from(N.array));
|
|
30768
|
-
else if (J === "normal" || J === "uv") {
|
|
30769
|
-
const L = V.attributes.position.count, d = i[J].itemSize;
|
|
30770
|
-
i[J].array.push(...new Array(L * d).fill(0));
|
|
30771
|
-
}
|
|
30772
|
-
}
|
|
30773
|
-
if (V.index) {
|
|
30774
|
-
const J = Array.from(V.index.array);
|
|
30775
|
-
for (const N of J)
|
|
30776
|
-
D.push(N + g);
|
|
30777
|
-
} else {
|
|
30778
|
-
const J = V.attributes.position.count;
|
|
30779
|
-
for (let N = 0; N < J; N++)
|
|
30780
|
-
D.push(g + N);
|
|
30781
|
-
}
|
|
30782
|
-
g += V.attributes.position.count;
|
|
30783
|
-
}
|
|
30784
|
-
for (const V in i) {
|
|
30785
|
-
const { array: J, itemSize: N } = i[V];
|
|
30786
|
-
I.setAttribute(V, new Q.Float32BufferAttribute(J, N));
|
|
30787
|
-
}
|
|
30788
|
-
return I.setIndex(D), !l && I.attributes.position && I.computeVertexNormals(), I;
|
|
30767
|
+
return rF(A);
|
|
30789
30768
|
}
|
|
30790
30769
|
isLiquidBlock(A) {
|
|
30791
30770
|
if (!A)
|
|
@@ -30872,7 +30851,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
30872
30851
|
"minecraft:bubble_column"
|
|
30873
30852
|
]));
|
|
30874
30853
|
let Cm = _Cm;
|
|
30875
|
-
class
|
|
30854
|
+
class fF {
|
|
30876
30855
|
constructor() {
|
|
30877
30856
|
__publicField(this, "packs", /* @__PURE__ */ new Map());
|
|
30878
30857
|
__publicField(this, "packOrder", []);
|
|
@@ -31611,7 +31590,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
31611
31590
|
__publicField(this, "lastPackLoadedFromCache", false);
|
|
31612
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, {
|
|
31613
31592
|
showUnknownBlocks: this.showUnknownBlocks
|
|
31614
|
-
}), this.entityRenderer = new uF(), this.signRenderer = new kF(this.assetLoader), this.packManager = new
|
|
31593
|
+
}), this.entityRenderer = new uF(), this.signRenderer = new kF(this.assetLoader), this.packManager = new fF(), this.assetLoader.setPackManager(this.packManager), this.packManager.setMeshRebuildCallback(() => {
|
|
31615
31594
|
this.clearMeshCaches();
|
|
31616
31595
|
});
|
|
31617
31596
|
const I = (A == null ? void 0 : A.autoRestore) ?? true, C = this.packManager;
|
|
@@ -32251,7 +32230,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32251
32230
|
this.assetLoader.dispose(), this.clearMeshCaches();
|
|
32252
32231
|
}
|
|
32253
32232
|
}
|
|
32254
|
-
|
|
32233
|
+
KF = class {
|
|
32255
32234
|
constructor(A, I, C = {}) {
|
|
32256
32235
|
__publicField(this, "enabled");
|
|
32257
32236
|
__publicField(this, "flySpeed");
|
|
@@ -32359,7 +32338,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32359
32338
|
}
|
|
32360
32339
|
};
|
|
32361
32340
|
let aV = null, qg = false;
|
|
32362
|
-
async function
|
|
32341
|
+
async function qF() {
|
|
32363
32342
|
if (qg)
|
|
32364
32343
|
return;
|
|
32365
32344
|
console.log("[InspectorManager] Lazy-loading debug GUI (lil-gui)...");
|
|
@@ -32382,7 +32361,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32382
32361
|
}, this.options.enableInspector && this.initialize();
|
|
32383
32362
|
}
|
|
32384
32363
|
async initialize() {
|
|
32385
|
-
if (await
|
|
32364
|
+
if (await qF(), this.gui = new aV({
|
|
32386
32365
|
title: "Schematic Renderer",
|
|
32387
32366
|
width: 300
|
|
32388
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)
|
|
@@ -32662,7 +32641,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32662
32641
|
this.gui && (this.gui.destroy(), this.gui = null), this.panels.clear();
|
|
32663
32642
|
}
|
|
32664
32643
|
};
|
|
32665
|
-
class
|
|
32644
|
+
class _F {
|
|
32666
32645
|
constructor(A, I) {
|
|
32667
32646
|
__publicField(this, "renderer");
|
|
32668
32647
|
__publicField(this, "name");
|
|
@@ -32901,7 +32880,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32901
32880
|
return this.baseRegion.free(), this.baseRegion = A.clone(), this.updateActiveRegion(), this;
|
|
32902
32881
|
}
|
|
32903
32882
|
}
|
|
32904
|
-
class
|
|
32883
|
+
class $F extends XC.EventEmitter {
|
|
32905
32884
|
constructor(A) {
|
|
32906
32885
|
super();
|
|
32907
32886
|
__publicField(this, "renderer");
|
|
@@ -32933,7 +32912,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
32933
32912
|
const l = this.regions.get(A);
|
|
32934
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;
|
|
32935
32914
|
}
|
|
32936
|
-
const Z = new
|
|
32915
|
+
const Z = new _F(this.renderer, {
|
|
32937
32916
|
name: A,
|
|
32938
32917
|
min: I,
|
|
32939
32918
|
max: C,
|
|
@@ -33075,7 +33054,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
33075
33054
|
this.regions.forEach((A) => A.dispose()), this.regions.clear(), this.definitionRegionNames.clear();
|
|
33076
33055
|
}
|
|
33077
33056
|
}
|
|
33078
|
-
class
|
|
33057
|
+
class AT {
|
|
33079
33058
|
constructor(A) {
|
|
33080
33059
|
__publicField(this, "renderer");
|
|
33081
33060
|
__publicField(this, "raycaster");
|
|
@@ -33231,7 +33210,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
33231
33210
|
__publicField(this, "needsRender", true);
|
|
33232
33211
|
__publicField(this, "continuousReasons", /* @__PURE__ */ new Set());
|
|
33233
33212
|
var _a2, _b3, _c3;
|
|
33234
|
-
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
|
|
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 = {
|
|
33235
33214
|
cameraPosition: new Q.Vector3()
|
|
33236
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({
|
|
33237
33216
|
showUnknownBlocks: (_b3 = this.options.debugOptions) == null ? void 0 : _b3.showUnknownBlocks
|
|
@@ -33286,7 +33265,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
33286
33265
|
onSchematicFileLoadFailure: (_e = (_d = this.options) == null ? void 0 : _d.callbacks) == null ? void 0 : _e.onSchematicFileLoadFailure
|
|
33287
33266
|
}
|
|
33288
33267
|
};
|
|
33289
|
-
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
|
|
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({
|
|
33290
33269
|
animationDuration: 0
|
|
33291
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();
|
|
33292
33271
|
} catch (C) {
|
|
@@ -34055,13 +34034,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
34055
34034
|
})();
|
|
34056
34035
|
export {
|
|
34057
34036
|
iw as BasePanel,
|
|
34058
|
-
|
|
34037
|
+
WT as BlockPosition,
|
|
34059
34038
|
gc as CapturePanel,
|
|
34060
|
-
|
|
34039
|
+
nT as CircuitBuilderWrapper,
|
|
34061
34040
|
mc as ControlsPanel,
|
|
34062
34041
|
Bn as CustomIoHighlight,
|
|
34063
|
-
|
|
34064
|
-
|
|
34042
|
+
cT as DefinitionRegionWrapper,
|
|
34043
|
+
zT as ExecutionModeWrapper,
|
|
34065
34044
|
sc as ExportPanel,
|
|
34066
34045
|
SW as FlyControls,
|
|
34067
34046
|
ac as InsignIoHighlight,
|
|
@@ -34070,36 +34049,36 @@ export {
|
|
|
34070
34049
|
Im as InsignManager,
|
|
34071
34050
|
Ec as InsignRegionHighlight,
|
|
34072
34051
|
_g as InspectorManager,
|
|
34073
|
-
|
|
34074
|
-
|
|
34075
|
-
|
|
34076
|
-
|
|
34052
|
+
PT as IoLayoutBuilderWrapper,
|
|
34053
|
+
OT as IoLayoutWrapper,
|
|
34054
|
+
bT as IoTypeWrapper,
|
|
34055
|
+
KF as KeyboardControls,
|
|
34077
34056
|
lc as KeyboardShortcutManager,
|
|
34078
34057
|
pV as KeyframeTrack,
|
|
34079
|
-
|
|
34080
|
-
|
|
34081
|
-
|
|
34058
|
+
RT as LayoutFunctionWrapper,
|
|
34059
|
+
FT as MchprsWorldWrapper,
|
|
34060
|
+
TT as OutputConditionWrapper,
|
|
34082
34061
|
pc as OverlayManager,
|
|
34083
34062
|
Nc as PerformancePanel,
|
|
34084
34063
|
jc as RenderSettingsPanel,
|
|
34085
34064
|
ic as ResourcePackManagerProxy,
|
|
34086
34065
|
Jc as ResourcePackPanel,
|
|
34087
|
-
|
|
34066
|
+
BT as SchematicBuilderWrapper,
|
|
34088
34067
|
OV as SchematicExporter,
|
|
34089
34068
|
hl as SchematicRenderer,
|
|
34090
34069
|
GV as SchematicRendererContext,
|
|
34091
|
-
|
|
34070
|
+
XT as SchematicWrapper,
|
|
34092
34071
|
dc as SidebarManager,
|
|
34093
34072
|
qA as SimulationLogger,
|
|
34094
34073
|
Yc as SimulationManager,
|
|
34095
|
-
|
|
34096
|
-
|
|
34097
|
-
|
|
34098
|
-
|
|
34074
|
+
eT as SimulationOptionsWrapper,
|
|
34075
|
+
YT as SortStrategyWrapper,
|
|
34076
|
+
yT as StateModeConstants,
|
|
34077
|
+
oT as TypedCircuitExecutorWrapper,
|
|
34099
34078
|
lA as UIColors,
|
|
34100
34079
|
RC as UIStyles,
|
|
34101
34080
|
Mc as UnifiedSidebar,
|
|
34102
|
-
|
|
34081
|
+
ET as ValueWrapper,
|
|
34103
34082
|
__tla,
|
|
34104
|
-
|
|
34083
|
+
tT as initializeNucleationWasm
|
|
34105
34084
|
};
|