viral-viewer-2 6.4.3 → 6.4.4
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/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
class
|
|
1
|
+
class r3 {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.MaterialIndex = 0, this.Vertices = [], this.Indices = [], this.Name = "", this.Instances = [];
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
-
class
|
|
6
|
+
class a3 {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.MaterialIndex = 0, this.Elements = [];
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
class
|
|
11
|
+
class o3 {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.Vertices = [], this.Indices = [], this.Instances = [], this.Id = "";
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
class
|
|
16
|
+
class l3 {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.Vertices = [], this.Indices = [], this.Transform = null;
|
|
19
19
|
}
|
|
@@ -60,12 +60,12 @@ class Pl {
|
|
|
60
60
|
return Object.keys(this.items).length;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
class
|
|
63
|
+
class c3 {
|
|
64
64
|
constructor() {
|
|
65
65
|
this.Solids = [], this.Id = "", this.Instances = [];
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
class
|
|
68
|
+
class h3 {
|
|
69
69
|
constructor() {
|
|
70
70
|
this.MaterialIndex = 0, this.Vertices = [], this.Indices = [], this.Buffer = [];
|
|
71
71
|
}
|
|
@@ -80,7 +80,7 @@ class Zx {
|
|
|
80
80
|
this.min = new na(), this.max = new na();
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
class
|
|
83
|
+
class u3 {
|
|
84
84
|
constructor() {
|
|
85
85
|
this.Data = {}, this.CameraData = new qx();
|
|
86
86
|
}
|
|
@@ -1808,7 +1808,7 @@ var yw = oc, xw = kf, vw = gw, bw = kf, ww = rc, _w = {
|
|
|
1808
1808
|
ungzip: bw,
|
|
1809
1809
|
constants: ww
|
|
1810
1810
|
};
|
|
1811
|
-
const { Inflate:
|
|
1811
|
+
const { Inflate: d3, inflate: Mw, inflateRaw: f3, ungzip: p3 } = _w;
|
|
1812
1812
|
var Sw = Mw;
|
|
1813
1813
|
class Aw {
|
|
1814
1814
|
pakoUnzip(e) {
|
|
@@ -42450,10 +42450,21 @@ class e3 {
|
|
|
42450
42450
|
this.viralViewerApi.viralCamera.focusModelByName();
|
|
42451
42451
|
}
|
|
42452
42452
|
}
|
|
42453
|
-
|
|
42454
|
-
|
|
42453
|
+
class t3 {
|
|
42454
|
+
static generateRandomString(e) {
|
|
42455
|
+
const t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
42456
|
+
let i = "";
|
|
42457
|
+
for (let s = 0; s < e; s++) {
|
|
42458
|
+
const r = Math.floor(Math.random() * t.length);
|
|
42459
|
+
i += t[r];
|
|
42460
|
+
}
|
|
42461
|
+
return i;
|
|
42462
|
+
}
|
|
42463
|
+
}
|
|
42464
|
+
const i3 = 0.064;
|
|
42465
|
+
class n3 {
|
|
42455
42466
|
constructor(e, t, i, s) {
|
|
42456
|
-
this.viralViewerApi = e, this.mixer = null, this.idleAnimation = null, this.walkAnimation = null, this.avatar = null, this.destination = null, this.isReady = !1, this.viralViewerApi.viralLoader.threeLoader.loadGLTF(
|
|
42467
|
+
this.viralViewerApi = e, this.mixer = null, this.idleAnimation = null, this.walkAnimation = null, this.avatar = null, this.destination = null, this.isReady = !1, this.id = t3.generateRandomString(10), this.viralViewerApi.viralLoader.threeLoader.loadGLTF(
|
|
42457
42468
|
t,
|
|
42458
42469
|
(r) => {
|
|
42459
42470
|
this.avatar = r.scene;
|
|
@@ -42484,7 +42495,7 @@ class i3 {
|
|
|
42484
42495
|
if (this.avatar && this.mixer) {
|
|
42485
42496
|
let t = this.avatar.getObjectByName("Hips");
|
|
42486
42497
|
if (this.mixer.update(e), t.position.set(0, t.position.y, 0), this.destination && this.avatar.position.distanceTo(this.destination) > 0.1) {
|
|
42487
|
-
const i = this.avatar.position.clone().sub(this.destination).normalize().multiplyScalar(
|
|
42498
|
+
const i = this.avatar.position.clone().sub(this.destination).normalize().multiplyScalar(i3);
|
|
42488
42499
|
this.avatar.position.sub(i), this.avatar.lookAt(this.destination), this.idle();
|
|
42489
42500
|
} else
|
|
42490
42501
|
this.walk();
|
|
@@ -42494,12 +42505,12 @@ class i3 {
|
|
|
42494
42505
|
this.destination = e;
|
|
42495
42506
|
}
|
|
42496
42507
|
}
|
|
42497
|
-
class
|
|
42508
|
+
class s3 {
|
|
42498
42509
|
constructor(e) {
|
|
42499
42510
|
this.viralViewerApi = e, this.avatars = [];
|
|
42500
42511
|
}
|
|
42501
42512
|
load(e, t, i) {
|
|
42502
|
-
let s = new
|
|
42513
|
+
let s = new n3(
|
|
42503
42514
|
this.viralViewerApi,
|
|
42504
42515
|
e,
|
|
42505
42516
|
t,
|
|
@@ -42508,7 +42519,7 @@ class n3 {
|
|
|
42508
42519
|
return this.avatars.push(s), s;
|
|
42509
42520
|
}
|
|
42510
42521
|
}
|
|
42511
|
-
class
|
|
42522
|
+
class v3 {
|
|
42512
42523
|
constructor(e = {
|
|
42513
42524
|
isDev: !1,
|
|
42514
42525
|
cameraZUp: !1,
|
|
@@ -42520,7 +42531,7 @@ class x3 {
|
|
|
42520
42531
|
this.lifeCycleEvent = new RR(), this.viralCompressProcessor = new Aw(), this.localStorageService = new pP(), this.viralStats = null, this.options = e, this.viralLifecycleEventHandler = new LR(
|
|
42521
42532
|
this.lifeCycleEvent,
|
|
42522
42533
|
this.options
|
|
42523
|
-
), this.targetElement = e.container, IR("QUICK_SAND"), DR(this.targetElement, "QUICK_SAND"), this.options.enableNavigationCube && (this.viralNavigationCube = new e3(this)), this.options.enableTools && (this.viralTools = new qR(this)), this.viralSpinner = new FR(this), this.viralDraggableModal = new XR(this), this.viralContextMenu = new gP(this), this.viralScene = new G2(this), this.viralMaterialManager = new CR(this), this.viralRenderer = new dP(this), this.viralCamera = new O2(this), this.viralMouse = new N2(this), this.viralKeyboard = new mP(this), this.viralAnimation = new fP(this), this.viralVisibilityManager = new OR(this), this.viralCentralizedEventHandler = new yP(this), this.viralLoader = new bC(this), this.viralBVH = new PR(), this.viralDataManager = new kR(this), this.viralAvatarManager = new
|
|
42534
|
+
), this.targetElement = e.container, IR("QUICK_SAND"), DR(this.targetElement, "QUICK_SAND"), this.options.enableNavigationCube && (this.viralNavigationCube = new e3(this)), this.options.enableTools && (this.viralTools = new qR(this)), this.viralSpinner = new FR(this), this.viralDraggableModal = new XR(this), this.viralContextMenu = new gP(this), this.viralScene = new G2(this), this.viralMaterialManager = new CR(this), this.viralRenderer = new dP(this), this.viralCamera = new O2(this), this.viralMouse = new N2(this), this.viralKeyboard = new mP(this), this.viralAnimation = new fP(this), this.viralVisibilityManager = new OR(this), this.viralCentralizedEventHandler = new yP(this), this.viralLoader = new bC(this), this.viralBVH = new PR(), this.viralDataManager = new kR(this), this.viralAvatarManager = new s3(this), this.options.isDev && (this.viralStats = new wC(this)), this.options.isDev ? this.viralAnimation.devAnimation() : this.viralAnimation.animation();
|
|
42524
42535
|
let t = window;
|
|
42525
42536
|
t.VIRAL_VIEWER = this;
|
|
42526
42537
|
}
|
|
@@ -42528,8 +42539,8 @@ class x3 {
|
|
|
42528
42539
|
export {
|
|
42529
42540
|
jx as DebouncedEventHandler,
|
|
42530
42541
|
Pl as Dictionary,
|
|
42531
|
-
|
|
42532
|
-
|
|
42542
|
+
o3 as ElementFragment,
|
|
42543
|
+
a3 as Fragment,
|
|
42533
42544
|
fu as HTMLUtil,
|
|
42534
42545
|
Sn as LogUtil,
|
|
42535
42546
|
vn as THREEUtil,
|
|
@@ -42538,13 +42549,13 @@ export {
|
|
|
42538
42549
|
_o as ViralKeyboardEventType,
|
|
42539
42550
|
Mn as ViralMouseEventType,
|
|
42540
42551
|
na as ViralPoint,
|
|
42541
|
-
|
|
42542
|
-
|
|
42543
|
-
|
|
42552
|
+
v3 as ViralViewerApi,
|
|
42553
|
+
l3 as ViralViewerRevitGeometry,
|
|
42554
|
+
r3 as ViralViewerRevitNoneStructuralGeometry,
|
|
42544
42555
|
Zx as ViralutionBox,
|
|
42545
42556
|
qx as ViralutionCamera,
|
|
42546
|
-
|
|
42557
|
+
c3 as ViralutionElement,
|
|
42547
42558
|
Pi as ViralutionEvent,
|
|
42548
|
-
|
|
42549
|
-
|
|
42559
|
+
h3 as ViralutionSolid,
|
|
42560
|
+
u3 as ViralutionTrackingModel
|
|
42550
42561
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viral-viewer-2",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "npx tsc",
|
|
14
14
|
"bundle-webpack": "webpack --config webpack.config.js",
|
|
15
15
|
"bundle-vite": "npx vite build",
|
|
16
|
-
"deploy": "npm run
|
|
16
|
+
"deploy": "npm run bundle-vite && npm publish"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [],
|
|
19
19
|
"author": "",
|