@realsee/five 6.5.0-alpha.8 → 6.5.0
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/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/five.Five.html +63 -56
- package/docs/classes/five.InternalWebGLRenderer.html +1 -1
- package/docs/classes/five.Model.html +32 -29
- package/docs/classes/five.PBMContainer.html +15 -2
- package/docs/classes/five.PBMMeshMaterial.html +6 -5
- package/docs/classes/five.PBMPointCloudMaterial.html +5 -4
- package/docs/classes/five.Parameter.html +53 -54
- package/docs/classes/five.Tile.html +1 -2
- package/docs/classes/five.Tile3DModel.html +22 -25
- package/docs/classes/plugins-1.ItemMaskController.html +1 -1
- package/docs/functions/five.createDebugBoundingMesh.html +1 -0
- package/docs/functions/five.isBoundingVolume.html +1 -0
- package/docs/functions/five.makeBoundingVolume.html +1 -0
- package/docs/interfaces/five.FiveInitArgs.html +2 -2
- package/docs/interfaces/five.PBMMeshMaterialParameters.html +3 -2
- package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +3 -2
- package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +10 -12
- package/docs/interfaces/five.ParameterMaterialValue.html +37 -37
- package/docs/interfaces/five.ParameterTilesetValue.html +16 -17
- package/docs/interfaces/five.ParameterValue.html +52 -53
- package/docs/interfaces/five.ResolvedParameterValue.html +52 -53
- package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +10 -12
- package/docs/interfaces/five.ViewLayer.html +22 -25
- package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +10 -12
- package/docs/interfaces/plugins-1.ItemMaskPluginType.State.html +2 -2
- package/docs/modules/five.html +7 -3
- package/docs/types/five.Tile3dOptions.html +1 -1
- package/docs/types/five.TileRequestOrder.html +1 -1
- package/docs/types/five.TilesetFrameState.html +1 -1
- package/docs/types/react.FiveProviderType.html +1 -1
- package/five/index.d.ts +58 -37
- package/five/index.js +160 -145
- package/five/index.mjs +4704 -4506
- package/gltf-loader/index.js +3 -3
- package/gltf-loader/index.mjs +146 -146
- package/line/index.js +3 -3
- package/line/index.mjs +10 -10
- package/package.json +1 -1
- package/plugins/index.js +2 -2
- package/plugins/index.mjs +2 -2
- package/react/index.js +3 -3
- package/react/index.mjs +101 -103
- package/shader-lib/index.js +2 -2
- package/shader-lib/index.mjs +2 -2
- package/sticker/index.js +3 -3
- package/sticker/index.mjs +7 -7
- package/umd/five-gltf-loader.js +3 -3
- package/umd/five-line.js +3 -3
- package/umd/five-plugins.js +2 -2
- package/umd/five-react.js +3 -3
- package/umd/five-shader-lib.js +2 -2
- package/umd/five-sticker.js +3 -3
- package/umd/five-vfx.js +2 -2
- package/umd/five-vue.js +2 -2
- package/umd/five.js +160 -145
- package/vfx/index.js +2 -2
- package/vfx/index.mjs +2 -2
- package/vue/index.js +2 -2
- package/vue/index.mjs +2 -2
- package/work-downloader/index.js +2 -2
- package/work-downloader/index.mjs +2 -2
- package/docs/types/five.TileDebug.html +0 -1
package/react/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.5.0
|
|
4
|
+
* Generated: 8/7/2025
|
|
5
|
+
* Version: 6.5.0
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -253,62 +253,62 @@
|
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
255
|
*/import * as u from "react";
|
|
256
|
-
import * as
|
|
256
|
+
import * as p from "three";
|
|
257
257
|
import { getViewportScale as ae, Five as ue } from "@realsee/five";
|
|
258
|
-
var
|
|
259
|
-
return
|
|
258
|
+
var E = function(e, n) {
|
|
259
|
+
return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
|
|
260
260
|
t.__proto__ = r;
|
|
261
261
|
} || function(t, r) {
|
|
262
262
|
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
|
|
263
|
-
},
|
|
263
|
+
}, E(e, n);
|
|
264
264
|
};
|
|
265
265
|
function B(e, n) {
|
|
266
266
|
if (typeof n != "function" && n !== null)
|
|
267
267
|
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
268
|
-
|
|
268
|
+
E(e, n);
|
|
269
269
|
function t() {
|
|
270
270
|
this.constructor = e;
|
|
271
271
|
}
|
|
272
272
|
e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
|
|
273
273
|
}
|
|
274
|
-
var
|
|
275
|
-
return
|
|
274
|
+
var h = function() {
|
|
275
|
+
return h = Object.assign || function(n) {
|
|
276
276
|
for (var t, r = 1, o = arguments.length; r < o; r++) {
|
|
277
277
|
t = arguments[r];
|
|
278
278
|
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (n[a] = t[a]);
|
|
279
279
|
}
|
|
280
280
|
return n;
|
|
281
|
-
},
|
|
281
|
+
}, h.apply(this, arguments);
|
|
282
282
|
};
|
|
283
|
-
function
|
|
283
|
+
function w(e, n, t) {
|
|
284
284
|
if (t || arguments.length === 2) for (var r = 0, o = n.length, a; r < o; r++)
|
|
285
285
|
(a || !(r in n)) && (a || (a = Array.prototype.slice.call(n, 0, r)), a[r] = n[r]);
|
|
286
286
|
return e.concat(a || Array.prototype.slice.call(n));
|
|
287
287
|
}
|
|
288
|
-
var
|
|
288
|
+
var k = [], R = [];
|
|
289
289
|
function ie(e) {
|
|
290
|
-
var n = e === void 0 ? {} : e, t = n.
|
|
290
|
+
var n = e === void 0 ? {} : e, t = n.preserveDrawingBuffer, r = t === void 0 ? !0 : t, o = n.webgl2, a = o === void 0 ? !1 : o;
|
|
291
291
|
if (typeof window != "undefined") {
|
|
292
|
-
var
|
|
293
|
-
if (
|
|
294
|
-
if (
|
|
295
|
-
var
|
|
296
|
-
|
|
292
|
+
var i = null;
|
|
293
|
+
if (a ? i = k.shift() : i = R.shift(), !i) {
|
|
294
|
+
if (a) {
|
|
295
|
+
var s = document.createElement("canvas"), c = s.getContext("webgl2");
|
|
296
|
+
c ? i = new p.WebGLRenderer({ preserveDrawingBuffer: r, antialias: !0, alpha: !0, stencil: !0, canvas: s, context: c }) : (console.error("error occurred when getting webgl2 canvas context, mybe webgl2 not support, fallback to webgl."), i = new p.WebGLRenderer({ preserveDrawingBuffer: r, antialias: !1, alpha: !0, stencil: !0 }));
|
|
297
297
|
} else
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
i = new p.WebGLRenderer({ preserveDrawingBuffer: r, antialias: !1, alpha: !0, stencil: !0 });
|
|
299
|
+
i.outputEncoding = p.sRGBEncoding;
|
|
300
300
|
}
|
|
301
|
-
return
|
|
301
|
+
return i.autoClear = !0, i;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
function se(e) {
|
|
305
305
|
if (e) {
|
|
306
306
|
var n = e.capabilities.isWebGL2;
|
|
307
|
-
n ? R.indexOf(e) === -1 && R.push(e) :
|
|
307
|
+
n ? R.indexOf(e) === -1 && R.push(e) : k.indexOf(e) === -1 && k.push(e);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
var L = u.createContext(null);
|
|
311
|
-
function
|
|
311
|
+
function v() {
|
|
312
312
|
var e = u.useContext(L);
|
|
313
313
|
if (!e)
|
|
314
314
|
throw new Error("FiveProvider never found.");
|
|
@@ -335,7 +335,7 @@ function Ge(e) {
|
|
|
335
335
|
B(t, n);
|
|
336
336
|
function t(r) {
|
|
337
337
|
var o = n.call(this, r) || this;
|
|
338
|
-
return o.__fiveEventDisposers = [], o.__fiveDisposeTimer = null, o.five = new ue(
|
|
338
|
+
return o.__fiveEventDisposers = [], o.__fiveDisposeTimer = null, o.five = new ue(h(h({}, e), { renderer: void 0 })), o.loadWork = o.loadWork.bind(o), o.state = {}, o;
|
|
339
339
|
}
|
|
340
340
|
return t.prototype.loadWork = function(r, o, a, i) {
|
|
341
341
|
if (i === void 0 && (i = !0), this.props.work)
|
|
@@ -348,21 +348,19 @@ function Ge(e) {
|
|
|
348
348
|
clearTimeout(this.__fiveDisposeTimer), this.__fiveDisposeTimer = null;
|
|
349
349
|
var a;
|
|
350
350
|
if (typeof window != "undefined") {
|
|
351
|
-
var i = ae(), s = i === 1 ? window.devicePixelRatio : 1;
|
|
352
351
|
a = ie({
|
|
353
|
-
pixelRatio: s,
|
|
354
|
-
backgroundAlpha: e.backgroundAlpha,
|
|
355
|
-
backgroundColor: e.backgroundColor,
|
|
356
352
|
webgl2: e == null ? void 0 : e.webgl2,
|
|
357
353
|
preserveDrawingBuffer: e == null ? void 0 : e.preserveDrawingBuffer
|
|
358
354
|
});
|
|
355
|
+
var i = ae(), s = i === 1 ? window.devicePixelRatio : 1;
|
|
356
|
+
a == null || a.setPixelRatio(s);
|
|
359
357
|
}
|
|
360
358
|
this.five.renderer = a, this.setState({ renderer: a }), this.__fiveEventDisposers.push(this.five.on("load", function() {
|
|
361
359
|
r.props.onWorksChange && r.props.onWorksChange(r.five.works);
|
|
362
|
-
})), this.__fiveEventDisposers.push(this.five.on("stateChange", function(l,
|
|
363
|
-
r.props.onStateChange && r.props.onStateChange(l,
|
|
364
|
-
})), this.__fiveEventDisposers.push(this.five.on("currentStateChange", function(l,
|
|
365
|
-
r.props.onCurrentStateChange && r.props.onCurrentStateChange(l,
|
|
360
|
+
})), this.__fiveEventDisposers.push(this.five.on("stateChange", function(l, d) {
|
|
361
|
+
r.props.onStateChange && r.props.onStateChange(l, d);
|
|
362
|
+
})), this.__fiveEventDisposers.push(this.five.on("currentStateChange", function(l, d) {
|
|
363
|
+
r.props.onCurrentStateChange && r.props.onCurrentStateChange(l, d);
|
|
366
364
|
})), this.__fiveEventDisposers.push(this.five.on("error", function(l) {
|
|
367
365
|
r.props.onError ? r.props.onError(l) : console.warn(l.message);
|
|
368
366
|
}));
|
|
@@ -386,8 +384,8 @@ function Ge(e) {
|
|
|
386
384
|
var fe = typeof window != "undefined" ? u.useLayoutEffect : u.useEffect, le = {
|
|
387
385
|
display: "inline-block",
|
|
388
386
|
overflow: "hidden"
|
|
389
|
-
},
|
|
390
|
-
var n = e.width, t = e.height, r =
|
|
387
|
+
}, Ie = function(e) {
|
|
388
|
+
var n = e.width, t = e.height, r = v(), o = u.createRef(), a = h({ width: n, height: t }, le);
|
|
391
389
|
return fe(function() {
|
|
392
390
|
var i = o.current;
|
|
393
391
|
if (i && r.renderer) {
|
|
@@ -400,18 +398,18 @@ var fe = typeof window != "undefined" ? u.useLayoutEffect : u.useEffect, le = {
|
|
|
400
398
|
}
|
|
401
399
|
}, [r, r.renderer, n, t, o.current]), u.createElement("div", { ref: o, style: a });
|
|
402
400
|
};
|
|
403
|
-
function
|
|
404
|
-
return
|
|
401
|
+
function qe() {
|
|
402
|
+
return v();
|
|
405
403
|
}
|
|
406
|
-
function
|
|
407
|
-
var t =
|
|
404
|
+
function ve(e, n) {
|
|
405
|
+
var t = v(), r = [t];
|
|
408
406
|
n !== void 0 && (r = r.concat(n)), u.useLayoutEffect(function() {
|
|
409
407
|
return e(t.scene);
|
|
410
408
|
}, r);
|
|
411
409
|
}
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
var e =
|
|
410
|
+
var ze = ve;
|
|
411
|
+
function Ae() {
|
|
412
|
+
var e = v(), n = H(), t = u.useState(function() {
|
|
415
413
|
return e.works;
|
|
416
414
|
}), r = t[0], o = t[1];
|
|
417
415
|
return u.useLayoutEffect(function() {
|
|
@@ -421,10 +419,10 @@ function ze() {
|
|
|
421
419
|
}, [e]), [r, n];
|
|
422
420
|
}
|
|
423
421
|
function U(e) {
|
|
424
|
-
return
|
|
422
|
+
return h({}, e.state);
|
|
425
423
|
}
|
|
426
424
|
function Je() {
|
|
427
|
-
var e =
|
|
425
|
+
var e = v(), n = u.useState(function() {
|
|
428
426
|
return U(e);
|
|
429
427
|
}), t = n[0], r = n[1], o = u.useCallback(function(a, i, s) {
|
|
430
428
|
i === void 0 && (i = !1), s === void 0 && (s = !0);
|
|
@@ -438,7 +436,7 @@ function Je() {
|
|
|
438
436
|
}, [e]), [t, o];
|
|
439
437
|
}
|
|
440
438
|
function Ke() {
|
|
441
|
-
var e =
|
|
439
|
+
var e = v(), n = u.useState(function() {
|
|
442
440
|
return e.getCurrentState();
|
|
443
441
|
}), t = n[0], r = n[1], o = u.useCallback(function(a, i, s) {
|
|
444
442
|
i === void 0 && (i = !1), s === void 0 && (s = !0);
|
|
@@ -452,7 +450,7 @@ function Ke() {
|
|
|
452
450
|
}, [e]), [t, o];
|
|
453
451
|
}
|
|
454
452
|
function Qe() {
|
|
455
|
-
var e =
|
|
453
|
+
var e = v(), n = u.useState(function() {
|
|
456
454
|
return e.getCurrentState();
|
|
457
455
|
}), t = n[0], r = n[1];
|
|
458
456
|
return u.useLayoutEffect(function() {
|
|
@@ -462,13 +460,13 @@ function Qe() {
|
|
|
462
460
|
}, [e]), e.works.getResolvedObserver(t);
|
|
463
461
|
}
|
|
464
462
|
function Xe(e, n, t) {
|
|
465
|
-
var r =
|
|
463
|
+
var r = v(), o = [r, e];
|
|
466
464
|
t !== void 0 && (o = o.concat(t)), u.useLayoutEffect(function() {
|
|
467
465
|
return r.on(e, n);
|
|
468
466
|
}, o);
|
|
469
467
|
}
|
|
470
468
|
function Ye() {
|
|
471
|
-
var e =
|
|
469
|
+
var e = v(), n = u.useCallback(function(i, s) {
|
|
472
470
|
return e.updateCamera(i, s);
|
|
473
471
|
}, [e]), t = u.useCallback(e.getPixels.bind(e), [e]), r = u.useCallback(function(i) {
|
|
474
472
|
return e.render(i);
|
|
@@ -480,7 +478,7 @@ function Ye() {
|
|
|
480
478
|
return { updateCamera: n, getPixels: t, render: r, needsRender: o, preloadPano: a };
|
|
481
479
|
}
|
|
482
480
|
function Ze() {
|
|
483
|
-
var e =
|
|
481
|
+
var e = v(), n = u.useState(function() {
|
|
484
482
|
return Symbol();
|
|
485
483
|
});
|
|
486
484
|
n[0];
|
|
@@ -496,11 +494,11 @@ function Ze() {
|
|
|
496
494
|
return r;
|
|
497
495
|
}
|
|
498
496
|
function j(e) {
|
|
499
|
-
var n = e.camera.getWorldDirection(new
|
|
497
|
+
var n = e.camera.getWorldDirection(new p.Vector3()), t = new p.Raycaster(e.camera.position, n);
|
|
500
498
|
return t;
|
|
501
499
|
}
|
|
502
500
|
function er() {
|
|
503
|
-
var e =
|
|
501
|
+
var e = v(), n = u.useState(function() {
|
|
504
502
|
return j(e);
|
|
505
503
|
}), t = n[0], r = n[1];
|
|
506
504
|
return u.useLayoutEffect(function() {
|
|
@@ -510,10 +508,10 @@ function er() {
|
|
|
510
508
|
}, [e]), t;
|
|
511
509
|
}
|
|
512
510
|
function T(e) {
|
|
513
|
-
return e.camera.getWorldDirection(new
|
|
511
|
+
return e.camera.getWorldDirection(new p.Vector3());
|
|
514
512
|
}
|
|
515
513
|
function rr() {
|
|
516
|
-
var e =
|
|
514
|
+
var e = v(), n = u.useState(function() {
|
|
517
515
|
return T(e);
|
|
518
516
|
}), t = n[0], r = n[1];
|
|
519
517
|
return u.useLayoutEffect(function() {
|
|
@@ -523,7 +521,7 @@ function rr() {
|
|
|
523
521
|
}, [e]), t;
|
|
524
522
|
}
|
|
525
523
|
function tr() {
|
|
526
|
-
var e =
|
|
524
|
+
var e = v(), n = u.useCallback(function(t) {
|
|
527
525
|
return e.model.intersectRaycaster(t);
|
|
528
526
|
}, [e]);
|
|
529
527
|
return n;
|
|
@@ -532,7 +530,7 @@ function N(e) {
|
|
|
532
530
|
return e.model.empty ? "Empty" : "Loaded";
|
|
533
531
|
}
|
|
534
532
|
function nr() {
|
|
535
|
-
var e =
|
|
533
|
+
var e = v(), n = u.useState(function() {
|
|
536
534
|
return N(e);
|
|
537
535
|
}), t = n[0], r = n[1];
|
|
538
536
|
return u.useLayoutEffect(function() {
|
|
@@ -542,7 +540,7 @@ function nr() {
|
|
|
542
540
|
}, [e]), t;
|
|
543
541
|
}
|
|
544
542
|
function or() {
|
|
545
|
-
var e =
|
|
543
|
+
var e = v(), n = u.useState(e.model.shownFloor), t = n[0], r = n[1], o = u.useState(e.model.floorLength), a = o[0], i = o[1], s = u.useCallback(function(c) {
|
|
546
544
|
typeof c == "number" ? e.model.show(c) : e.model.show();
|
|
547
545
|
}, [e]);
|
|
548
546
|
return u.useLayoutEffect(function() {
|
|
@@ -558,7 +556,7 @@ function or() {
|
|
|
558
556
|
}, [e]), [t, a, s];
|
|
559
557
|
}
|
|
560
558
|
function ar() {
|
|
561
|
-
var e =
|
|
559
|
+
var e = v(), n = u.useState(e.helperVisible), t = n[0], r = n[1], o = u.useCallback(function(a) {
|
|
562
560
|
e.helperVisible = a;
|
|
563
561
|
}, [e]);
|
|
564
562
|
return u.useLayoutEffect(function() {
|
|
@@ -577,10 +575,10 @@ function $(e, n) {
|
|
|
577
575
|
n[o] !== void 0 && (e[o] = n[o]);
|
|
578
576
|
}
|
|
579
577
|
}
|
|
580
|
-
function
|
|
578
|
+
function de(e, n) {
|
|
581
579
|
var t = f("state", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
|
|
582
580
|
if (t)
|
|
583
|
-
return
|
|
581
|
+
return h({}, e.state);
|
|
584
582
|
}, [e, o]);
|
|
585
583
|
return u.useLayoutEffect(function() {
|
|
586
584
|
if (t)
|
|
@@ -650,7 +648,7 @@ function Se(e, n) {
|
|
|
650
648
|
function we(e, n) {
|
|
651
649
|
var t = f("cameraDirection", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
|
|
652
650
|
if (t)
|
|
653
|
-
return e.camera.getWorldDirection(new
|
|
651
|
+
return e.camera.getWorldDirection(new p.Vector3());
|
|
654
652
|
}, [e, o]);
|
|
655
653
|
return u.useLayoutEffect(function() {
|
|
656
654
|
if (t)
|
|
@@ -662,7 +660,7 @@ function we(e, n) {
|
|
|
662
660
|
function be(e, n) {
|
|
663
661
|
var t = f("cameraRaycaster", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
|
|
664
662
|
if (t) {
|
|
665
|
-
var s = e.camera.getWorldDirection(new
|
|
663
|
+
var s = e.camera.getWorldDirection(new p.Vector3()), c = new p.Raycaster(e.camera.position, s);
|
|
666
664
|
return c;
|
|
667
665
|
}
|
|
668
666
|
}, [e, o]);
|
|
@@ -697,7 +695,7 @@ function Fe(e, n) {
|
|
|
697
695
|
});
|
|
698
696
|
}, [e]), [i, o];
|
|
699
697
|
}
|
|
700
|
-
function
|
|
698
|
+
function Ee(e, n) {
|
|
701
699
|
var t = f("helperVisible", n), r = u.useState(Symbol()), o = r[0], a = r[1], i = u.useMemo(function() {
|
|
702
700
|
if (t)
|
|
703
701
|
return e.helperVisible;
|
|
@@ -709,7 +707,7 @@ function ke(e, n) {
|
|
|
709
707
|
});
|
|
710
708
|
}, [e]), [i, o];
|
|
711
709
|
}
|
|
712
|
-
function
|
|
710
|
+
function ke(e, n) {
|
|
713
711
|
if (f("loadWork", n))
|
|
714
712
|
return e;
|
|
715
713
|
}
|
|
@@ -737,7 +735,7 @@ function Ve(e, n) {
|
|
|
737
735
|
return e.once.apply(e, t);
|
|
738
736
|
};
|
|
739
737
|
}
|
|
740
|
-
function
|
|
738
|
+
function Pe(e, n) {
|
|
741
739
|
if (f("off", n))
|
|
742
740
|
return function() {
|
|
743
741
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
@@ -745,7 +743,7 @@ function _e(e, n) {
|
|
|
745
743
|
return e.off.apply(e, t);
|
|
746
744
|
};
|
|
747
745
|
}
|
|
748
|
-
function
|
|
746
|
+
function _e(e, n) {
|
|
749
747
|
if (f("intersectRaycaster", n))
|
|
750
748
|
return function() {
|
|
751
749
|
for (var t, r = [], o = 0; o < arguments.length; o++)
|
|
@@ -810,15 +808,15 @@ function Te(e, n) {
|
|
|
810
808
|
function ir(e) {
|
|
811
809
|
return function(n) {
|
|
812
810
|
return u.forwardRef(function(t, r) {
|
|
813
|
-
var o =
|
|
814
|
-
var
|
|
815
|
-
return $(
|
|
811
|
+
var o = v(), a = H(), i = ge(o, e)[0], s = de(o, e), c = s[0], l = s[1], d = pe(o, e), m = d[0], g = d[1], S = he(o, e), b = S[0], C = S[1], V = me(o, e), G = V[0], I = V[1], P = ye(o, e), q = P[0], z = P[1], A = Se(o, e)[0], _ = we(o, e), J = _[0], K = _[1], x = be(o, e), Q = x[0], X = x[1], D = Ce(o, e), Y = D[0], Z = D[1], W = Fe(o, e), ee = W[0], re = W[1], O = Ee(o, e), te = O[0], ne = O[1], M = u.useMemo(function() {
|
|
812
|
+
var y = {};
|
|
813
|
+
return $(y, {
|
|
816
814
|
setState: Re(o, e),
|
|
817
|
-
loadWork:
|
|
815
|
+
loadWork: ke(a, e),
|
|
818
816
|
on: Le(o, e),
|
|
819
817
|
once: Ve(o, e),
|
|
820
|
-
off:
|
|
821
|
-
intersectRaycaster:
|
|
818
|
+
off: Pe(o, e),
|
|
819
|
+
intersectRaycaster: _e(o, e),
|
|
822
820
|
project2d: xe(o, e),
|
|
823
821
|
updateCamera: De(o, e),
|
|
824
822
|
getPixels: We(o, e),
|
|
@@ -827,38 +825,38 @@ function ir(e) {
|
|
|
827
825
|
preloadPano: Ue(o, e),
|
|
828
826
|
showFloor: je(o, e),
|
|
829
827
|
toggleHelperVisible: Te(o, e)
|
|
830
|
-
}),
|
|
828
|
+
}), y;
|
|
831
829
|
}, [o, a]), oe = u.useMemo(function() {
|
|
832
|
-
var
|
|
833
|
-
return $(
|
|
830
|
+
var y = h({}, M);
|
|
831
|
+
return $(y, {
|
|
834
832
|
unsafe__fiveInstance: i,
|
|
835
833
|
state: c,
|
|
836
834
|
currentState: m,
|
|
837
|
-
currentObserver:
|
|
835
|
+
currentObserver: b,
|
|
838
836
|
work: G,
|
|
839
|
-
model:
|
|
840
|
-
scene:
|
|
837
|
+
model: q,
|
|
838
|
+
scene: A,
|
|
841
839
|
cameraDirection: J,
|
|
842
840
|
cameraRaycaster: Q,
|
|
843
841
|
modelReadyState: Y,
|
|
844
842
|
shownFloor: ee,
|
|
845
843
|
helperVisible: te
|
|
846
|
-
}),
|
|
844
|
+
}), y;
|
|
847
845
|
}, [
|
|
848
846
|
o,
|
|
849
847
|
M,
|
|
850
848
|
l,
|
|
851
|
-
|
|
849
|
+
g,
|
|
852
850
|
C,
|
|
853
|
-
|
|
854
|
-
|
|
851
|
+
I,
|
|
852
|
+
z,
|
|
855
853
|
K,
|
|
856
854
|
X,
|
|
857
855
|
Z,
|
|
858
856
|
re,
|
|
859
857
|
ne
|
|
860
858
|
]);
|
|
861
|
-
return u.createElement(n,
|
|
859
|
+
return u.createElement(n, h({ ref: r, $five: oe }, t));
|
|
862
860
|
});
|
|
863
861
|
};
|
|
864
862
|
}
|
|
@@ -903,16 +901,16 @@ var Be = (
|
|
|
903
901
|
for (var o in t)
|
|
904
902
|
n.indexOf(o) >= 0 && !Ne(t[o], this.values[o]) && r.push(o);
|
|
905
903
|
if (r.length !== 0) {
|
|
906
|
-
for (var a =
|
|
904
|
+
for (var a = h({}, this.values), i = 0, s = r; i < s.length; i++) {
|
|
907
905
|
var c = s[i];
|
|
908
906
|
this.values[c] = t[c];
|
|
909
907
|
}
|
|
910
908
|
this.onValuesChange && this.onValuesChange(this.values, a);
|
|
911
|
-
for (var l = 0,
|
|
912
|
-
var m =
|
|
913
|
-
if ($e(
|
|
914
|
-
var
|
|
915
|
-
|
|
909
|
+
for (var l = 0, d = this.listeners; l < d.length; l++) {
|
|
910
|
+
var m = d[l], g = m[0], S = m[1];
|
|
911
|
+
if ($e(g, r)) {
|
|
912
|
+
var b = F(a, g), C = F(this.values, g);
|
|
913
|
+
S(C, b);
|
|
916
914
|
}
|
|
917
915
|
}
|
|
918
916
|
}
|
|
@@ -931,14 +929,14 @@ function cr(e) {
|
|
|
931
929
|
var r = u.useContext(n);
|
|
932
930
|
if (r === null)
|
|
933
931
|
throw new Error("StoreProvider never found.");
|
|
934
|
-
var o = u.useRef(!0), a = u.useState(r.getValues(t)), i = a[0], s = a[1], c =
|
|
932
|
+
var o = u.useRef(!0), a = u.useState(r.getValues(t)), i = a[0], s = a[1], c = w([r], t, !0);
|
|
935
933
|
u.useLayoutEffect(function() {
|
|
936
|
-
return o.current ? o.current = !1 : s(r.getValues(t)), r.on(t, function(
|
|
937
|
-
return s(
|
|
934
|
+
return o.current ? o.current = !1 : s(r.getValues(t)), r.on(t, function(d) {
|
|
935
|
+
return s(d);
|
|
938
936
|
});
|
|
939
937
|
}, c);
|
|
940
|
-
var l = u.useCallback(function(
|
|
941
|
-
return r.setValues(t,
|
|
938
|
+
var l = u.useCallback(function(d) {
|
|
939
|
+
return r.setValues(t, d);
|
|
942
940
|
}, c);
|
|
943
941
|
return [i, l];
|
|
944
942
|
},
|
|
@@ -953,7 +951,7 @@ function cr(e) {
|
|
|
953
951
|
throw new Error("StoreProvider never found.");
|
|
954
952
|
var o = u.useCallback(function(a) {
|
|
955
953
|
return r.setValues(t, a);
|
|
956
|
-
},
|
|
954
|
+
}, w([r], t, !0));
|
|
957
955
|
return o;
|
|
958
956
|
},
|
|
959
957
|
/**
|
|
@@ -966,7 +964,7 @@ function cr(e) {
|
|
|
966
964
|
var a = u.useContext(n);
|
|
967
965
|
if (a === null)
|
|
968
966
|
throw new Error("StoreProvider never found.");
|
|
969
|
-
var i =
|
|
967
|
+
var i = w([a], t, !0);
|
|
970
968
|
o !== void 0 && (i = i.concat(o)), u.useLayoutEffect(function() {
|
|
971
969
|
return a.on(t, r);
|
|
972
970
|
}, i);
|
|
@@ -978,12 +976,12 @@ function cr(e) {
|
|
|
978
976
|
var o = u.useCallback(function() {
|
|
979
977
|
for (var a = [], i = 0; i < arguments.length; i++)
|
|
980
978
|
a[i] = arguments[i];
|
|
981
|
-
var s = e[t], c = s[0], l = s.slice(1),
|
|
979
|
+
var s = e[t], c = s[0], l = s.slice(1), d = function() {
|
|
982
980
|
return r.getValues(l);
|
|
983
|
-
}, m = function(
|
|
984
|
-
return r.setValues(l,
|
|
981
|
+
}, m = function(g) {
|
|
982
|
+
return r.setValues(l, g);
|
|
985
983
|
};
|
|
986
|
-
return c.apply(void 0,
|
|
984
|
+
return c.apply(void 0, w([d, m], a, !1));
|
|
987
985
|
}, []);
|
|
988
986
|
return o;
|
|
989
987
|
},
|
|
@@ -1013,13 +1011,13 @@ function cr(e) {
|
|
|
1013
1011
|
};
|
|
1014
1012
|
}
|
|
1015
1013
|
export {
|
|
1016
|
-
|
|
1014
|
+
Ie as FiveCanvas,
|
|
1017
1015
|
ur as INJECTION_PROPNAME,
|
|
1018
1016
|
Be as Store,
|
|
1019
1017
|
sr as createFiveFeature,
|
|
1020
1018
|
Ge as createFiveProvider,
|
|
1021
1019
|
cr as createStore,
|
|
1022
|
-
|
|
1020
|
+
qe as unsafe__useFiveInstance,
|
|
1023
1021
|
Ye as useFiveAction,
|
|
1024
1022
|
rr as useFiveCameraDirection,
|
|
1025
1023
|
er as useFiveCameraRaycaster,
|
|
@@ -1031,9 +1029,9 @@ export {
|
|
|
1031
1029
|
tr as useFiveModelIntersectRaycaster,
|
|
1032
1030
|
nr as useFiveModelReadyState,
|
|
1033
1031
|
Ze as useFiveProject2d,
|
|
1034
|
-
|
|
1035
|
-
|
|
1032
|
+
ze as useFiveScene,
|
|
1033
|
+
ve as useFiveSceneEffect,
|
|
1036
1034
|
Je as useFiveState,
|
|
1037
|
-
|
|
1035
|
+
Ae as useFiveWork,
|
|
1038
1036
|
ir as withFive
|
|
1039
1037
|
};
|
package/shader-lib/index.js
CHANGED
package/shader-lib/index.mjs
CHANGED
package/sticker/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.5.0
|
|
4
|
+
* Generated: 8/7/2025
|
|
5
|
+
* Version: 6.5.0
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -252,4 +252,4 @@
|
|
|
252
252
|
* No amendment to or modification of this Agreement will be binding unless in
|
|
253
253
|
* writing and signed by Realsee. You and Realsee hereto confirm that this
|
|
254
254
|
* Agreement and all related documents shall be drafted in English.
|
|
255
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(t){return setTimeout(t,16)},R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?function(){return R+performance.now()}:function(){return Date.now()};function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var
|
|
255
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(t){return setTimeout(t,16)},R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?function(){return R+performance.now()}:function(){return Date.now()};function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var f=s.map=new a.Texture;f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,S(r,function(){f.image=r,f.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var p=s.map=new a.VideoTexture(r);p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.5.0"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(a.Mesh);exports.Sticker=b;
|
package/sticker/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* @realsee/five
|
|
4
|
-
* Generated:
|
|
5
|
-
* Version: 6.5.0
|
|
4
|
+
* Generated: 8/7/2025
|
|
5
|
+
* Version: 6.5.0
|
|
6
6
|
* Terms:
|
|
7
7
|
* Realsee SDK License Agreement
|
|
8
8
|
* Update: July 28, 2021
|
|
@@ -269,7 +269,7 @@ function y(r, n) {
|
|
|
269
269
|
}
|
|
270
270
|
r.prototype = n === null ? Object.create(n) : (e.prototype = n.prototype, new e());
|
|
271
271
|
}
|
|
272
|
-
var
|
|
272
|
+
var g = new Float32Array([
|
|
273
273
|
-0.5,
|
|
274
274
|
-0.5,
|
|
275
275
|
0,
|
|
@@ -282,7 +282,7 @@ var h = new Float32Array([
|
|
|
282
282
|
0.5,
|
|
283
283
|
0.5,
|
|
284
284
|
0
|
|
285
|
-
]),
|
|
285
|
+
]), h = new Float32Array([
|
|
286
286
|
0,
|
|
287
287
|
0,
|
|
288
288
|
1,
|
|
@@ -299,8 +299,8 @@ var h = new Float32Array([
|
|
|
299
299
|
3,
|
|
300
300
|
2
|
|
301
301
|
]), u = new a.BufferGeometry();
|
|
302
|
-
u.setAttribute("position", new a.BufferAttribute(
|
|
303
|
-
u.setAttribute("uv", new a.BufferAttribute(
|
|
302
|
+
u.setAttribute("position", new a.BufferAttribute(g, 3));
|
|
303
|
+
u.setAttribute("uv", new a.BufferAttribute(h, 2));
|
|
304
304
|
u.setIndex(new a.BufferAttribute(E, 1));
|
|
305
305
|
var d = window, w = d.requestAnimationFrame || d.mozRequestAnimationFrame || d.webkitRequestAnimationFrame || d.msRequestAnimationFrame || function(r) {
|
|
306
306
|
return setTimeout(r, 16);
|
|
@@ -366,7 +366,7 @@ var A = (
|
|
|
366
366
|
}
|
|
367
367
|
return Object.defineProperty(n, "version", {
|
|
368
368
|
get: function() {
|
|
369
|
-
return "6.5.0
|
|
369
|
+
return "6.5.0";
|
|
370
370
|
},
|
|
371
371
|
enumerable: !1,
|
|
372
372
|
configurable: !0
|