UNPKG

@shopware-ag/dive

Version:

Shopware Spatial Framework

26 lines (25 loc) 806 B
import { D as n, b as r, c as l, O as m } from "../../chunks/FileTypes-Ck6z0LqE.mjs"; import "three/webgpu"; import "three/examples/jsm/loaders/HDRLoader.js"; import "three/tsl"; const V = { ...n }, D = async (c, a) => { const o = new r({ ...a, autoStart: !1 }); o.mainView.camera.position.set(0, 1, 2); const e = await new l().setFromURL(c); o.scene.root.add(e), e.placeOnFloor(); const i = new m( o.mainView.camera, o.mainView.canvas ); o.clock.addTicker(i); const t = Object.assign(o, { orbitController: i, model: e }), s = o.disposeAsync.bind(o); return t.disposeAsync = async () => { i.dispose(), await s(); }, ((a == null ? void 0 : a.autoStart) ?? !0) && (await o.startAsync(), i.focusObject(e)), t; }; export { D as QuickView, V as QuickViewDefaultSettings };