@shjjs/visual-ui 3.0.7 → 3.0.9

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.
@@ -1,21 +1,21 @@
1
- var w = Object.defineProperty;
2
- var x = (p, t, e) => t in p ? w(p, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[t] = e;
3
- var f = (p, t, e) => x(p, typeof t != "symbol" ? t + "" : t, e);
4
- import { cloneDeep as k, isString as C } from "lodash";
5
- import { parseStaticData as M } from "./sources/static.mjs";
6
- import { parseUrlData as v } from "./sources/url.mjs";
7
- import { parseVariableData as A } from "./sources/variable.mjs";
8
- import { parseAPIPort as E } from "./sources/api.mjs";
9
- import { DataSourceUtils as U } from "./utils/utils.mjs";
10
- import { parseStorage as B } from "./sources/storage.mjs";
11
- import { parseMqttData as T } from "./sources/mqtt.mjs";
12
- import { parseWebSocketData as W } from "./sources/websocket.mjs";
13
- import { MqttConnectionPoolManager as d } from "./utils/mqttConnectionPool.mjs";
14
- import { WebSocketConnectionPoolManager as S } from "./utils/websocketConnectionPool.mjs";
15
- import { mappingData as q } from "./utils/mappingData.mjs";
16
- import { groupData as K } from "./utils/groupData.mjs";
17
- import { storageData as m } from "./utils/storageData.mjs";
18
- const l = class l {
1
+ var x = Object.defineProperty;
2
+ var k = (l, t, e) => t in l ? x(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var h = (l, t, e) => k(l, typeof t != "symbol" ? t + "" : t, e);
4
+ import { cloneDeep as C, isString as M } from "lodash";
5
+ import { parseStaticData as v } from "./sources/static.mjs";
6
+ import { parseUrlData as A } from "./sources/url.mjs";
7
+ import { parseVariableData as E } from "./sources/variable.mjs";
8
+ import { parseAPIPort as U } from "./sources/api.mjs";
9
+ import { DataSourceUtils as B } from "./utils/utils.mjs";
10
+ import { parseStorage as T } from "./sources/storage.mjs";
11
+ import { parseMqttData as W } from "./sources/mqtt.mjs";
12
+ import { parseWebSocketData as q } from "./sources/websocket.mjs";
13
+ import { MqttConnectionPoolManager as S } from "./utils/mqttConnectionPool.mjs";
14
+ import { WebSocketConnectionPoolManager as D } from "./utils/websocketConnectionPool.mjs";
15
+ import { mappingData as K } from "./utils/mappingData.mjs";
16
+ import { groupData as b } from "./utils/groupData.mjs";
17
+ import { storageData as g } from "./utils/storageData.mjs";
18
+ const c = class c {
19
19
  /**
20
20
  * 添加数据源解析器
21
21
  * @param type - 数据源类型
@@ -224,7 +224,7 @@ const l = class l {
224
224
  r(s);
225
225
  return;
226
226
  }
227
- e ? (m(o.source.storage, s.noMappingData), r(s.noMappingData)) : (m(o.source.storage, s.finalKeyData), r(s.finalKeyData));
227
+ e ? (g(o.source.storage, s.noMappingData), r(s.noMappingData)) : (g(o.source.storage, s.finalKeyData), r(s.finalKeyData));
228
228
  });
229
229
  }
230
230
  /**
@@ -236,31 +236,32 @@ const l = class l {
236
236
  * @returns
237
237
  */
238
238
  static processData(t, e, a, r) {
239
- const { filter: o, mapping: i, dynamicMapping: n, isUserdata: s } = k(t);
240
- return new Promise(function(P) {
241
- const D = e;
242
- l.filterData(o, e).then(
243
- (u) => {
244
- const h = {
239
+ const { filter: o, mapping: i, dynamicMapping: n, isUserdata: s } = C(t);
240
+ return new Promise(function(y) {
241
+ const w = e;
242
+ c.filterData(o, e).then(
243
+ (p) => {
244
+ var d;
245
+ const u = {
245
246
  id: a,
246
247
  finalKeyData: { id: a, data: null },
247
248
  finalUserData: { id: a, data: null },
248
- filteredData: { id: a, data: u },
249
- rawData: { id: a, data: D },
249
+ filteredData: { id: a, data: p },
250
+ rawData: { id: a, data: w },
250
251
  noMappingData: null
251
252
  };
252
253
  if (r)
253
- h.finalUserData.data = u, h.noMappingData = u;
254
+ u.finalUserData.data = u.noMappingData = p;
254
255
  else {
255
- const { mappedData: c, finalMapping: y } = q(
256
- u,
256
+ const f = K(
257
+ p,
257
258
  i,
258
259
  n,
259
260
  s
260
- );
261
- h.finalKeyData.data = c != null && c.length ? K(c, y) : u, h.finalUserData.data = c != null && c.length ? c : u;
261
+ ), m = !!((d = f.mappedData) != null && d.length);
262
+ u.finalKeyData.data = m ? b(f.mappedData, f.finalMapping) : p, u.finalUserData.data = m ? f.mappedData : p;
262
263
  }
263
- P(h);
264
+ y(u);
264
265
  }
265
266
  );
266
267
  });
@@ -272,11 +273,11 @@ const l = class l {
272
273
  * @returns
273
274
  */
274
275
  static async filterData(t, e) {
275
- if (!C(t))
276
+ if (!M(t))
276
277
  return e;
277
278
  try {
278
279
  let a = t.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, "");
279
- a = U.replaceStringVariables(a);
280
+ a = B.replaceStringVariables(a);
280
281
  const r = `
281
282
  ${a}
282
283
  if (typeof filter !== 'function') {
@@ -295,38 +296,38 @@ const l = class l {
295
296
  static destroy() {
296
297
  this.timerPool.forEach((t) => {
297
298
  clearInterval(t);
298
- }), this.timerPool.clear(), this.dataSourceStatePool.clear(), this.dataSourceStatePool = /* @__PURE__ */ new Map(), this.waitingPool.clear(), this.waitingPool = /* @__PURE__ */ new Map(), d.closeAllConnections(), S.closeAllConnections();
299
+ }), this.timerPool.clear(), this.dataSourceStatePool.clear(), this.dataSourceStatePool = /* @__PURE__ */ new Map(), this.waitingPool.clear(), this.waitingPool = /* @__PURE__ */ new Map(), S.closeAllConnections(), D.closeAllConnections();
299
300
  }
300
301
  static clearMqttConnectionById(t) {
301
- d.removeConnectionByUUID(t);
302
+ S.removeConnectionByUUID(t);
302
303
  }
303
304
  static clearWebSocketConnectionById(t) {
304
- S.removeConnectionByUUID(t);
305
+ D.removeConnectionByUUID(t);
305
306
  }
306
307
  };
307
308
  /**
308
309
  * 定时器池
309
310
  */
310
- f(l, "timerPool", /* @__PURE__ */ new Map()), /**
311
+ h(c, "timerPool", /* @__PURE__ */ new Map()), /**
311
312
  * 数据源状态池 - 跟踪所有数据源的执行状态
312
313
  */
313
- f(l, "dataSourceStatePool", /* @__PURE__ */ new Map()), /**
314
+ h(c, "dataSourceStatePool", /* @__PURE__ */ new Map()), /**
314
315
  * 等待执行的数据源池 - 存储因依赖关系而等待的数据源
315
316
  */
316
- f(l, "waitingPool", /* @__PURE__ */ new Map()), /**
317
+ h(c, "waitingPool", /* @__PURE__ */ new Map()), /**
317
318
  * 数据源解析器
318
319
  */
319
- f(l, "parsers", /* @__PURE__ */ new Set([
320
- { type: "url", parser: v },
321
- { type: "static", parser: M },
322
- { type: "variable", parser: A },
323
- { type: "api", parser: E },
324
- { type: "storage", parser: B },
325
- { type: "mqtt", parser: T },
326
- { type: "ws", parser: W }
320
+ h(c, "parsers", /* @__PURE__ */ new Set([
321
+ { type: "url", parser: A },
322
+ { type: "static", parser: v },
323
+ { type: "variable", parser: E },
324
+ { type: "api", parser: U },
325
+ { type: "storage", parser: T },
326
+ { type: "mqtt", parser: W },
327
+ { type: "ws", parser: q }
327
328
  ]));
328
- let g = l;
329
+ let P = c;
329
330
  export {
330
- U as DataSourceUtils,
331
- g as SHJDatasourceV2
331
+ B as DataSourceUtils,
332
+ P as SHJDatasourceV2
332
333
  };
@@ -5,7 +5,7 @@ import { cloneDeep as g } from "lodash";
5
5
  import { SHJDatasourceV2 as u } from "../index.mjs";
6
6
  import { storageData as V } from "./storageData.mjs";
7
7
  import "../../event/actions/fullScreenAction.mjs";
8
- import { EventUtils as m } from "../../event/utils/utils.mjs";
8
+ import { EventUtils as h } from "../../event/utils/utils.mjs";
9
9
  const i = class i {
10
10
  static executeAllVariable(a) {
11
11
  a.forEach((e) => {
@@ -87,7 +87,7 @@ const i = class i {
87
87
  }
88
88
  r._callbacks ?? (r._callbacks = /* @__PURE__ */ new Map()), r._callbacks.forEach(
89
89
  (n) => n(a._value)
90
- ), t && m.updateWidgetVariableData(r);
90
+ ), t && h.updateWidgetVariableData(r);
91
91
  }
92
92
  }
93
93
  static getVariableById(a) {
@@ -96,8 +96,8 @@ const i = class i {
96
96
  static getVariableByName(a) {
97
97
  return window._variables.find((e) => e.name === a);
98
98
  }
99
- static getVariableValueByName(a) {
100
- const e = window._variables.find((t) => t.name === a);
99
+ static getVariableValueById(a) {
100
+ const e = window._variables.find((t) => t.id === a);
101
101
  return e ? e._value : null;
102
102
  }
103
103
  static noneData(a) {
@@ -124,7 +124,7 @@ d(i, "addVariable", (a) => {
124
124
  sources: [a.sources],
125
125
  noUseMapping: !0,
126
126
  callback: (e) => {
127
- i.setVariableById(a, e, !1);
127
+ i.setVariableById(a, e, !0);
128
128
  }
129
129
  });
130
130
  }), d(i, "deleteVariableById", (a) => {
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-79619911"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dde8cdcf"]]);
5
5
  export {
6
- _ as default
6
+ r as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as d, onMounted as J, computed as a, shallowRef as b, ref as u, watch as j, createElementBlock as E, openBlock as c, createElementVNode as H, createBlock as V, createCommentVNode as O, unref as P } from "vue";
2
- import { useVueImportMap as x, Sandbox as N, useStore as k } from "@vue/repl";
1
+ import { defineComponent as d, onMounted as J, computed as a, shallowRef as b, ref as u, watch as j, createElementBlock as E, openBlock as c, createElementVNode as H, createBlock as V, createCommentVNode as k, unref as O } from "vue";
2
+ import { useVueImportMap as P, Sandbox as x, useStore as N } from "@vue/repl";
3
3
  import { useWatch as D } from "./hooks/useWatch.mjs";
4
4
  /* empty css */
5
5
  /* empty css */
@@ -171,7 +171,7 @@ const B = { class: "custom-component-render" }, R = { class: "preview-content" }
171
171
  J(() => {
172
172
  window.SHJDatasourceV2 = M, window.SHJParseEvent = T;
173
173
  });
174
- const e = a(() => _(i.option)), { productionMode: p, vueVersion: v, importMap: h } = x(), w = a(() => ({
174
+ const e = a(() => _(i.option)), { productionMode: p, vueVersion: v, importMap: h } = P(), w = a(() => ({
175
175
  script: {
176
176
  inlineTemplate: p.value,
177
177
  isProd: p.value,
@@ -188,7 +188,7 @@ const B = { class: "custom-component-render" }, R = { class: "preview-content" }
188
188
  if (!(l.value === s && o.value)) {
189
189
  l.value = s, t.value = !0;
190
190
  try {
191
- const r = k(
191
+ const r = N(
192
192
  { builtinImportMap: h, vueVersion: v, sfcOptions: w },
193
193
  s
194
194
  );
@@ -265,6 +265,7 @@ const B = { class: "custom-component-render" }, R = { class: "preview-content" }
265
265
  #app {
266
266
  height: 100%;
267
267
  overflow: hidden;
268
+ background-color: transparent !important;
268
269
  }
269
270
  </style>
270
271
  ${g}
@@ -273,12 +274,13 @@ const B = { class: "custom-component-render" }, R = { class: "preview-content" }
273
274
  }));
274
275
  return (s, r) => (c(), E("div", B, [
275
276
  H("div", R, [
276
- !t.value && o.value ? (c(), V(P(N), {
277
+ !t.value && o.value ? (c(), V(O(x), {
277
278
  key: 0,
278
279
  store: o.value,
280
+ theme: "dark",
279
281
  "clear-console": !1,
280
282
  "preview-options": C.value
281
- }, null, 8, ["store", "preview-options"])) : O("", !0)
283
+ }, null, 8, ["store", "preview-options"])) : k("", !0)
282
284
  ])
283
285
  ]));
284
286
  }
@@ -1,7 +1,7 @@
1
- import { defineComponent as z, computed as q, ref as K, onMounted as N, onBeforeUnmount as W, watch as d, createElementBlock as Y, openBlock as _ } from "vue";
1
+ import { defineComponent as P, computed as K, ref as N, onMounted as W, onBeforeUnmount as Y, watch as c, createElementBlock as _, openBlock as j } from "vue";
2
2
  import "@babylonjs/loaders/glTF";
3
3
  import * as t from "@babylonjs/core";
4
- import { cloneDeep as h, isEqual as f } from "lodash";
4
+ import { cloneDeep as d, isEqual as h } from "lodash";
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  import "../../../Interaction/components/Tabs/index.mjs";
@@ -157,13 +157,13 @@ import "../../../Scene/components/UnityIframe/index.mjs";
157
157
  import "../../../Scene/components/UnityWebgl/index.mjs";
158
158
  import "../../../Scene/components/Vr/index.mjs";
159
159
  import "../../../Scene/components/Earth/index.mjs";
160
- import { SHJParseEvent as k } from "../../../../commons/plugins/event/index.mjs";
160
+ import { SHJParseEvent as z } from "../../../../commons/plugins/event/index.mjs";
161
161
  import "../../../../commons/plugins/datasource/utils/request.mjs";
162
162
  import "mqtt";
163
163
  import "nanoid";
164
- import { upgradeModelViewer as j } from "./version.mjs";
165
- const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
166
- ...J,
164
+ import { upgradeModelViewer as J } from "./version.mjs";
165
+ const U = P({ name: "ShjModelViewer" }), Qt = /* @__PURE__ */ P({
166
+ ...U,
167
167
  props: {
168
168
  option: {},
169
169
  sources: {},
@@ -171,10 +171,10 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
171
171
  basicEvents: {}
172
172
  },
173
173
  emits: ["on-load-success", "on-play-animation"],
174
- setup(y, { expose: P, emit: H }) {
175
- const e = q(() => j(y.option)), E = H;
176
- let T, o, n, p, v, s, w, g, u, b, l, a;
177
- const B = () => {
174
+ setup(y, { expose: H, emit: I }) {
175
+ const e = K(() => J(y.option)), E = I;
176
+ let A, o, n, p, v, s, w, g, u, b, l, a;
177
+ const C = N(), B = () => {
178
178
  n || (n = new t.ArcRotateCamera(
179
179
  "Camera",
180
180
  e.value.camera.alpha,
@@ -194,9 +194,9 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
194
194
  e.value.camera.lowerBetaLimit
195
195
  ), n.upperBetaLimit = t.Tools.ToRadians(
196
196
  e.value.camera.upperBetaLimit
197
- ), n.useBouncingBehavior = e.value.camera.useBouncingBehavior, n.wheelDeltaPercentage = e.value.camera.wheelDeltaPercentage || 0.01, n.useAutoRotationBehavior = e.value.camera.autoRotation, n.panningSensibility = 1 / (e.value.camera.panningSensibility || 0.01), n.attachControl(A.value, !0);
197
+ ), n.useBouncingBehavior = e.value.camera.useBouncingBehavior, n.wheelDeltaPercentage = e.value.camera.wheelDeltaPercentage || 0.01, n.useAutoRotationBehavior = e.value.camera.autoRotation, n.panningSensibility = 1 / (e.value.camera.panningSensibility || 0.01), n.attachControl(C.value, !0);
198
198
  }, F = () => {
199
- o || (o = new t.Scene(T)), o.environmentTexture = t.CubeTexture.CreateFromPrefilteredData(
199
+ o || (o = new t.Scene(A)), o.environmentTexture = t.CubeTexture.CreateFromPrefilteredData(
200
200
  e.value.scene.environmentTexture,
201
201
  o
202
202
  ), o.environmentIntensity = e.value.scene.environmentIntensity, e.value.scene.colorShow ? o.clearColor = t.Color4.FromHexString(
@@ -224,11 +224,11 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
224
224
  ), p.diffuse = t.Color3.FromHexString(
225
225
  e.value.directionalLight.diffuse || "#ffffff"
226
226
  ), p.intensity = e.value.directionalLight.intensity, p.shadowMinZ = e.value.directionalLight.shadowMinZ, p.shadowMaxZ = e.value.directionalLight.shadowMaxZ, p.autoCalcShadowZBounds = e.value.directionalLight.autoCalcShadowZBounds, e.value.directionalLight.shadowGenerator.enable) {
227
- const { mapSize: i, transparencyShadow: r, usePercentageCloserFiltering: m, bias: c } = e.value.directionalLight.shadowGenerator;
227
+ const { mapSize: i, transparencyShadow: r, usePercentageCloserFiltering: m, bias: f } = e.value.directionalLight.shadowGenerator;
228
228
  if (!s && (s = new t.ShadowGenerator(i, p), l))
229
229
  for (let L = 0; L < l.length; L++)
230
230
  e.value.meshes.isCasterShadow && s && s.addShadowCaster(l[L], !0);
231
- s.mapSize = i, s.transparencyShadow = r, s.usePercentageCloserFiltering = m, s.bias = c;
231
+ s.mapSize = i, s.transparencyShadow = r, s.usePercentageCloserFiltering = m, s.bias = f;
232
232
  } else
233
233
  s && (s.dispose(), s = null);
234
234
  e.value.directionalLight.lightGizmo && e.value.directionalLight.lightGizmo.enable ? (v || (v = new t.LightGizmo(), v.light = p), v.scaleRatio = e.value.directionalLight.lightGizmo.scaleRatio) : v && (v.dispose(), v = null);
@@ -254,10 +254,10 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
254
254
  width: i,
255
255
  height: r,
256
256
  position: m,
257
- rotation: c,
257
+ rotation: f,
258
258
  scaling: L,
259
- material: C,
260
- receiveShadows: Z
259
+ material: T,
260
+ receiveShadows: q
261
261
  } = e.value.ground;
262
262
  u || (u = t.MeshBuilder.CreateGround(
263
263
  "ground",
@@ -268,24 +268,24 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
268
268
  m[1],
269
269
  m[2]
270
270
  ), u.rotation = new t.Vector3(
271
- t.Tools.ToRadians(c[0]),
272
- t.Tools.ToRadians(c[1]),
273
- t.Tools.ToRadians(c[2])
271
+ t.Tools.ToRadians(f[0]),
272
+ t.Tools.ToRadians(f[1]),
273
+ t.Tools.ToRadians(f[2])
274
274
  ), u.scaling = new t.Vector3(L[0], L[1], L[2]);
275
275
  const x = new t.StandardMaterial("", o);
276
276
  x.emissiveTexture = new t.Texture(
277
- C.emissiveTexture,
277
+ T.emissiveTexture,
278
278
  o
279
279
  ), x.diffuseTexture = new t.Texture(
280
- C.emissiveTexture,
280
+ T.emissiveTexture,
281
281
  o
282
282
  ), x.ambientTexture = new t.Texture(
283
- C.emissiveTexture,
283
+ T.emissiveTexture,
284
284
  o
285
285
  ), x.diffuseColor = new t.Color3(1, 1, 1), x.opacityTexture = new t.Texture(
286
- C.opacityTexture,
286
+ T.opacityTexture,
287
287
  o
288
- ), u.material = x, u.receiveShadows = Z;
288
+ ), u.material = x, u.receiveShadows = q;
289
289
  } else
290
290
  u && (u.dispose(), u = null);
291
291
  }, M = () => {
@@ -306,7 +306,7 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
306
306
  if (o) {
307
307
  o.stopAllAnimations();
308
308
  const m = o.getAnimationGroupByName(i);
309
- m && (E("on-play-animation"), k.parseEvents(y.useEvents, "on-play-animation"), m.start(
309
+ m && (E("on-play-animation"), z.parseEvents(y.useEvents, "on-play-animation"), m.start(
310
310
  r.loop,
311
311
  r.speedRatio,
312
312
  m.from,
@@ -335,10 +335,7 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
335
335
  l[i].isPickable = !1, l[i].receiveShadows = e.value.meshes.isCasterShadow, e.value.meshes.isCasterShadow && s && s.addShadowCaster(l[i], !0);
336
336
  e.value.animation.animationGroups = o.animationGroups.map((i) => ({ uniqueId: i.uniqueId, name: i.name })), y.basicEvents && (y.basicEvents.function[0].args[0].select = o.animationGroups.map(
337
337
  (i) => ({ name: i.name, value: i.name })
338
- )), e.value.animation.defaultAnimation && e.value.animation.defaultAnimation.name ? D(e.value.animation.defaultAnimation.name, {
339
- loop: e.value.animation.defaultAnimation.loop,
340
- speedRatio: e.value.animation.defaultAnimation.speedRatio
341
- }) : o.animationGroups && o.animationGroups[0] && o.animationGroups[0].stop();
338
+ )), k();
342
339
  }, V = () => {
343
340
  const i = e.value.pipelineOption;
344
341
  i && i.enabled ? (a || (a = new t.DefaultRenderingPipeline(
@@ -351,104 +348,117 @@ const J = z({ name: "ShjModelViewer" }), Xt = /* @__PURE__ */ z({
351
348
  ), a.chromaticAberration.direction.y = Math.cos(
352
349
  i.chromaticAberrationDirection
353
350
  )), a.sharpenEnabled = i.sharpenEnabled, a.sharpen.edgeAmount = i.sharpenEdgeAmount, a.sharpen.colorAmount = i.sharpenColorAmount) : a && (a.dispose(), a = null);
354
- }, I = function() {
355
- F(), B(), G(), R(), O(), M(), S(), V(), E("on-load-success"), k.parseEvents(y.useEvents, "on-load-success");
356
- }, A = K();
357
- return N(() => {
358
- T = new t.Engine(A.value, !0), T && e.value.meshes.url && (I(), T.runRenderLoop(function() {
351
+ }, k = () => {
352
+ o.stopAllAnimations(), e.value.animation.defaultAnimation && e.value.animation.defaultAnimation.name ? D(e.value.animation.defaultAnimation.name, {
353
+ loop: e.value.animation.defaultAnimation.loop,
354
+ speedRatio: e.value.animation.defaultAnimation.speedRatio
355
+ }) : o.animationGroups && o.animationGroups[0] && o.animationGroups[0].stop();
356
+ }, Z = function() {
357
+ F(), B(), G(), R(), O(), M(), S(), V(), E("on-load-success"), z.parseEvents(y.useEvents, "on-load-success");
358
+ };
359
+ return W(() => {
360
+ A = new t.Engine(C.value, !0), A && e.value.meshes.url && (Z(), A.runRenderLoop(function() {
359
361
  o && o.render();
360
362
  }));
361
- }), W(() => {
362
- o.dispose(), T.dispose();
363
- }), P({
363
+ }), Y(() => {
364
+ o.dispose(), A.dispose();
365
+ }), H({
364
366
  playAnimation: (i, r) => {
365
- const m = r[0].value, c = {
367
+ const m = r[0].value, f = {
366
368
  loop: r[1].keys[0].defaultValue,
367
369
  speedRatio: r[1].keys[1].defaultValue
368
370
  };
369
- D(m, c);
371
+ D(m, f);
370
372
  }
371
- }), d(
372
- () => h(e.value.camera),
373
+ }), c(
374
+ () => d(e.value.camera),
373
375
  (i, r) => {
374
- !f(i, r) && n && B();
376
+ !h(i, r) && n && B();
375
377
  },
376
378
  {
377
379
  deep: !0
378
380
  }
379
- ), d(
380
- () => h(e.value.scene),
381
+ ), c(
382
+ () => d(e.value.scene),
381
383
  (i, r) => {
382
- !f(i, r) && o && F();
384
+ !h(i, r) && o && F();
383
385
  },
384
386
  {
385
387
  deep: !0
386
388
  }
387
- ), d(
388
- () => h(e.value.directionalLight),
389
+ ), c(
390
+ () => d(e.value.directionalLight),
389
391
  (i, r) => {
390
- f(i, r) || R();
392
+ h(i, r) || R();
391
393
  },
392
394
  {
393
395
  deep: !0
394
396
  }
395
- ), d(
396
- () => h(e.value.hemisphericLight),
397
+ ), c(
398
+ () => d(e.value.hemisphericLight),
397
399
  (i, r) => {
398
- f(i, r) || G();
400
+ h(i, r) || G();
399
401
  },
400
402
  {
401
403
  deep: !0
402
404
  }
403
- ), d(
404
- () => h(e.value.ground),
405
+ ), c(
406
+ () => d(e.value.ground),
405
407
  (i, r) => {
406
- f(i, r) || O();
408
+ h(i, r) || O();
407
409
  },
408
410
  {
409
411
  deep: !0
410
412
  }
411
- ), d(
412
- () => h(e.value.skybox),
413
+ ), c(
414
+ () => d(e.value.skybox),
413
415
  (i, r) => {
414
- f(i, r) || M();
416
+ h(i, r) || M();
415
417
  },
416
418
  {
417
419
  deep: !0
418
420
  }
419
- ), d(
420
- () => h(e.value.meshes),
421
+ ), c(
422
+ () => d(e.value.meshes),
421
423
  (i, r) => {
422
- !f(i, r) && l && i.url === r.url && S();
424
+ !h(i, r) && l && i.url === r.url && S();
423
425
  },
424
426
  {
425
427
  deep: !0
426
428
  }
427
- ), d(
428
- () => h(e.value.meshes.url),
429
+ ), c(
430
+ () => d(e.value.meshes.url),
429
431
  (i, r) => {
430
- f(i, r) || (o.meshes.forEach((m, c) => {
431
- c > 1 && m.dispose();
432
+ h(i, r) || (o.meshes.forEach((m, f) => {
433
+ f > 1 && m.dispose();
432
434
  }), l = null, S());
433
435
  },
434
436
  {
435
437
  deep: !0
436
438
  }
437
- ), d(
438
- () => h(e.value.pipelineOption),
439
+ ), c(
440
+ () => d(e.value.pipelineOption),
441
+ (i, r) => {
442
+ h(i, r) || V();
443
+ },
444
+ {
445
+ deep: !0
446
+ }
447
+ ), c(
448
+ () => d(e.value.animation),
439
449
  (i, r) => {
440
- f(i, r) || V();
450
+ h(i, r) || k();
441
451
  },
442
452
  {
443
453
  deep: !0
444
454
  }
445
- ), (i, r) => (_(), Y("canvas", {
455
+ ), (i, r) => (j(), _("canvas", {
446
456
  ref_key: "canvasRef",
447
- ref: A,
457
+ ref: C,
448
458
  class: "babylon-canvas"
449
459
  }, null, 512));
450
460
  }
451
461
  });
452
462
  export {
453
- Xt as default
463
+ Qt as default
454
464
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./index.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-56e45189"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc5fed6a"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };