@seatlayer/core 0.47.0 → 0.47.1
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/view3d/index.cjs +19 -4
- package/dist/view3d/index.cjs.map +1 -1
- package/dist/view3d/index.d.cts +15 -2
- package/dist/view3d/index.d.ts +15 -2
- package/dist/view3d/index.js +19 -4
- package/dist/view3d/index.js.map +1 -1
- package/package.json +1 -1
package/dist/view3d/index.cjs
CHANGED
|
@@ -5848,11 +5848,12 @@ var Analytics3D = class {
|
|
|
5848
5848
|
} catch {
|
|
5849
5849
|
}
|
|
5850
5850
|
}
|
|
5851
|
-
opened(seats, hasHeights, buildMs) {
|
|
5851
|
+
opened(seats, hasHeights, buildMs, prepSource) {
|
|
5852
5852
|
this.emit("3d_opened", {
|
|
5853
5853
|
seats,
|
|
5854
5854
|
hasHeights,
|
|
5855
|
-
...buildMs === void 0 ? {} : { buildMs: Math.round(buildMs) }
|
|
5855
|
+
...buildMs === void 0 ? {} : { buildMs: Math.round(buildMs) },
|
|
5856
|
+
...prepSource === void 0 ? {} : { prepSource }
|
|
5856
5857
|
});
|
|
5857
5858
|
}
|
|
5858
5859
|
/** First user-driven orbit/dolly per mount only (the intro ease is not user
|
|
@@ -6167,10 +6168,11 @@ function mountVenue3D(container, input, opts = {}) {
|
|
|
6167
6168
|
orbit.camera.fov = FOV_END;
|
|
6168
6169
|
orbit.camera.updateProjectionMatrix();
|
|
6169
6170
|
};
|
|
6171
|
+
const isNarrow = () => (container.clientWidth || glctx.canvas.clientWidth) <= 520;
|
|
6170
6172
|
let arriveChip = null;
|
|
6171
6173
|
const layoutArriveChip = () => {
|
|
6172
6174
|
if (!arriveChip) return;
|
|
6173
|
-
const narrow = (
|
|
6175
|
+
const narrow = isNarrow();
|
|
6174
6176
|
Object.assign(arriveChip.style, narrow ? {
|
|
6175
6177
|
left: "12px",
|
|
6176
6178
|
right: "12px",
|
|
@@ -6350,6 +6352,10 @@ function mountVenue3D(container, input, opts = {}) {
|
|
|
6350
6352
|
zoomInButton.addEventListener("click", () => orbit.zoomBy(0.82));
|
|
6351
6353
|
setNavigationMode("orbit");
|
|
6352
6354
|
container.appendChild(navigationModeChip);
|
|
6355
|
+
const layoutNavigationChip = () => {
|
|
6356
|
+
navigationModeChip.style.display = isNarrow() ? "none" : "flex";
|
|
6357
|
+
};
|
|
6358
|
+
layoutNavigationChip();
|
|
6353
6359
|
const overviewChip = document.createElement("button");
|
|
6354
6360
|
overviewChip.type = "button";
|
|
6355
6361
|
overviewChip.textContent = "\u2302 Overview";
|
|
@@ -6670,6 +6676,7 @@ function mountVenue3D(container, input, opts = {}) {
|
|
|
6670
6676
|
const { width, height } = glctx.resize();
|
|
6671
6677
|
orbit.setAspect(width / Math.max(1, height));
|
|
6672
6678
|
layoutArriveChip();
|
|
6679
|
+
layoutNavigationChip();
|
|
6673
6680
|
loop.requestRender();
|
|
6674
6681
|
},
|
|
6675
6682
|
stats() {
|
|
@@ -6777,7 +6784,15 @@ function mountVenue3D(container, input, opts = {}) {
|
|
|
6777
6784
|
glctx.dispose();
|
|
6778
6785
|
}
|
|
6779
6786
|
};
|
|
6780
|
-
analytics.opened(
|
|
6787
|
+
analytics.opened(
|
|
6788
|
+
model.seatCount,
|
|
6789
|
+
hasHeights,
|
|
6790
|
+
input.prepared?.buildMs ?? performance.now() - buildStartedAt,
|
|
6791
|
+
// Known synchronously at mount: either the caller handed us a scene
|
|
6792
|
+
// prepared by `prepareVenue3D` (which reports worker vs. main-thread
|
|
6793
|
+
// fallback) or we compiled it inline here. Never delays the event.
|
|
6794
|
+
input.prepared?.source ?? "inline"
|
|
6795
|
+
);
|
|
6781
6796
|
return handle;
|
|
6782
6797
|
}
|
|
6783
6798
|
// Annotate the CommonJS export names for ESM import in node:
|