viral-viewer-2 7.2.0 → 7.2.2
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/batched-mesh-simplifier-D-o3ukyo.mjs +128 -0
- package/dist/components/animation/viral-animation.d.ts +1 -1
- package/dist/components/avatar-manager/viral-avatar-manager.d.ts +1 -1
- package/dist/components/camera/viral-camera.d.ts +9 -8
- package/dist/components/custom-objects/index.d.ts +2 -3
- package/dist/components/custom-objects/viral-avatar.d.ts +2 -2
- package/dist/components/custom-objects/viral-batched-mesh.d.ts +14 -4
- package/dist/components/custom-objects/{viral-merged-model.d.ts → viral-bim-world.d.ts} +14 -6
- package/dist/components/custom-objects/viral-bim.model.d.ts +11 -0
- package/dist/components/custom-objects/viral-instanced-mesh-v2.d.ts +14 -3
- package/dist/components/data-manager/viral-data-manager.d.ts +1 -1
- package/dist/components/duplication-analyzer/viral-duplication-analyzer.d.ts +1 -1
- package/dist/components/event-handler/keyboard/viral-keyboard.d.ts +1 -1
- package/dist/components/event-handler/mouse/viral-mouse.d.ts +1 -4
- package/dist/components/event-handler/viral-centralized-event-handler.d.ts +1 -10
- package/dist/components/event-handler/viral-lifecycle-event-handler.d.ts +2 -2
- package/dist/components/loader/viral-point-cloud.loader.d.ts +2 -2
- package/dist/components/loader/viral-revit.loader.d.ts +3 -4
- package/dist/components/loader/viral-three.loader.d.ts +2 -2
- package/dist/components/loader/viral.loader.d.ts +1 -1
- package/dist/components/material/viral-material-manager.d.ts +2 -2
- package/dist/components/post-processing/post-processing-renderer.d.ts +51 -6
- package/dist/components/post-processing/screen-space-edges-pass.d.ts +7 -1
- package/dist/components/post-processing/selection-outline-pass.d.ts +65 -0
- package/dist/components/renderer/viral-renderer.d.ts +1 -1
- package/dist/components/scene/viral-scene.d.ts +4 -7
- package/dist/components/section-box/viral-section-box.d.ts +66 -25
- package/dist/components/stats/viral-stats.d.ts +1 -1
- package/dist/components/visibility-manager/viral-visibility-manager.d.ts +44 -24
- package/dist/components/worker/bounding-box-intersect.worker.d.ts +1 -1
- package/dist/components/worker/bounding-box.worker.d.ts +1 -1
- package/dist/components/worker/graph-layout.worker.d.ts +1 -1
- package/dist/components/worker/{load-element-batch.worker.d.ts → load-batched-element.worker.d.ts} +3 -3
- package/dist/entities/archive-elements.d.ts +1 -1
- package/dist/entities/data-tree.d.ts +7 -2
- package/dist/entities/index.d.ts +9 -9
- package/dist/gui/batch-debug-panel/viral-batch-debug-panel.d.ts +1 -1
- package/dist/gui/context-menu/viral-context-menu.d.ts +1 -1
- package/dist/gui/draggable-modal/viral-draggable-modal.d.ts +1 -1
- package/dist/gui/instanced-debug-panel/viral-instanced-debug-panel.d.ts +1 -1
- package/dist/gui/navigation-cube/components/cube-camera.d.ts +2 -2
- package/dist/gui/navigation-cube/components/cube-renderer.d.ts +1 -1
- package/dist/gui/navigation-cube/components/cube-scene.d.ts +2 -2
- package/dist/gui/navigation-cube/components/cube.mouse.d.ts +1 -1
- package/dist/gui/navigation-cube/viral-navigation-cube.d.ts +2 -2
- package/dist/gui/pivot-point/viral-pivot-point.d.ts +1 -1
- package/dist/gui/render-debug-panel/viral-render-debug-panel.d.ts +1 -1
- package/dist/gui/spinner/viral-spinner.d.ts +1 -1
- package/dist/gui/tools/tools/viral-tool-ambient-occlusion.d.ts +2 -2
- package/dist/gui/tools/tools/viral-tool-avatar.d.ts +2 -2
- package/dist/gui/tools/tools/viral-tool-dark-mode.d.ts +2 -2
- package/dist/gui/tools/tools/viral-tool-elevation.d.ts +3 -3
- package/dist/gui/tools/tools/viral-tool-export-scene.d.ts +2 -2
- package/dist/gui/tools/tools/viral-tool-measure.d.ts +3 -3
- package/dist/gui/tools/tools/viral-tool-sunlight.d.ts +2 -2
- package/dist/gui/tools/viral-tools.d.ts +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +10808 -35
- package/dist/utils/batched-mesh-simplifier.d.ts +2 -2
- package/dist/utils/geometry-simplifier.d.ts +1 -1
- package/dist/viral-viewer-api.d.ts +19 -21
- package/package.json +49 -42
- package/dist/batched-mesh-simplifier-Bqx1Evd9.mjs +0 -1076
- package/dist/components/custom-objects/viral-edge-mesh.d.ts +0 -133
- package/dist/components/custom-objects/viral-instanced-mesh-v3.d.ts +0 -123
- package/dist/components/custom-objects/viral-instanced-mesh.d.ts +0 -41
- package/dist/components/custom-objects/viral-main.model.d.ts +0 -16
- package/dist/components/custom-objects/viral-mesh.abstract.d.ts +0 -3
- package/dist/components/custom-objects/viral-mesh.d.ts +0 -13
- package/dist/components/custom-objects/viral-seperate-model.d.ts +0 -18
- package/dist/components/handler/geometry.handler.d.ts +0 -12
- package/dist/components/lod-generator/viral-lod-generator.d.ts +0 -116
- package/dist/index-DRYwg_CR.mjs +0 -326870
- /package/dist/components/worker-script/{load-element-batch.script.d.ts → load-batched-element.script.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SimplifyOptions } from "./geometry-simplifier";
|
|
2
|
-
import { BufferElement } from "../types";
|
|
3
1
|
import { ViralBatchedMesh } from "../components/custom-objects/viral-batched-mesh";
|
|
2
|
+
import type { BufferElement } from "../types";
|
|
3
|
+
import { type SimplifyOptions } from "./geometry-simplifier";
|
|
4
4
|
/**
|
|
5
5
|
* Simplify buffer elements while preserving the ability to batch them
|
|
6
6
|
* This simplifies each element's geometry individually, so element mapping remains valid
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ViralCamera } from "./components/camera/viral-camera";
|
|
3
|
-
import { ViralMouse } from "./components/event-handler/mouse/viral-mouse";
|
|
4
|
-
import { ViralScene } from "./components/scene/viral-scene";
|
|
5
|
-
import { ViralRenderer } from "./components/renderer/viral-renderer";
|
|
1
|
+
import type { ViewerOptions } from ".";
|
|
6
2
|
import { ViralAnimation } from "./components/animation/viral-animation";
|
|
7
|
-
import {
|
|
3
|
+
import { ViralAvatarManager } from "./components/avatar-manager/viral-avatar-manager";
|
|
4
|
+
import { ViralBVH } from "./components/bvh/viral-bvh";
|
|
5
|
+
import { ViralCamera } from "./components/camera/viral-camera";
|
|
6
|
+
import { ViralCompressProcessor } from "./components/compress/viral-compress.processor";
|
|
7
|
+
import { ViralDataManager } from "./components/data-manager/viral-data-manager";
|
|
8
|
+
import { EventDispatcher } from "./components/event-handler/base/event-dispatcher";
|
|
8
9
|
import { ViralKeyboard } from "./components/event-handler/keyboard/viral-keyboard";
|
|
9
|
-
import {
|
|
10
|
+
import { ViralMouse } from "./components/event-handler/mouse/viral-mouse";
|
|
10
11
|
import { ViralCentralizedEventHandler } from "./components/event-handler/viral-centralized-event-handler";
|
|
12
|
+
import { ViralLifecycleEventHandler } from "./components/event-handler/viral-lifecycle-event-handler";
|
|
11
13
|
import { ViralLoader } from "./components/loader/viral.loader";
|
|
12
|
-
import { ViralStats } from "./components/stats/viral-stats";
|
|
13
|
-
import { ViralBVH } from "./components/bvh/viral-bvh";
|
|
14
14
|
import { ViralMaterialManager } from "./components/material/viral-material-manager";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { ViralRenderer } from "./components/renderer/viral-renderer";
|
|
16
|
+
import { ViralScene } from "./components/scene/viral-scene";
|
|
17
|
+
import { ViralSectionBox } from "./components/section-box/viral-section-box";
|
|
18
|
+
import { ViralStats } from "./components/stats/viral-stats";
|
|
17
19
|
import { ViralVisibilityManager } from "./components/visibility-manager/viral-visibility-manager";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
+
import { ViralBatchDebugPanel } from "./gui/batch-debug-panel/viral-batch-debug-panel";
|
|
21
|
+
import { ViralContextMenu } from "./gui/context-menu/viral-context-menu";
|
|
20
22
|
import { ViralDraggableModal } from "./gui/draggable-modal/viral-draggable-modal";
|
|
21
|
-
import {
|
|
23
|
+
import { ViralInstancedDebugPanel } from "./gui/instanced-debug-panel/viral-instanced-debug-panel";
|
|
22
24
|
import { ViralNavigationCube } from "./gui/navigation-cube/viral-navigation-cube";
|
|
23
|
-
import { ViralAvatarManager } from "./components/avatar-manager/viral-avatar-manager";
|
|
24
|
-
import { ViralGeometryHandler } from "./components/handler/geometry.handler";
|
|
25
|
-
import { ViralSectionBox } from "./components/section-box/viral-section-box";
|
|
26
25
|
import { ViralPivotPoint } from "./gui/pivot-point/viral-pivot-point";
|
|
27
|
-
import { ViralBatchDebugPanel } from "./gui/batch-debug-panel/viral-batch-debug-panel";
|
|
28
26
|
import { ViralRenderDebugPanel } from "./gui/render-debug-panel/viral-render-debug-panel";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
27
|
+
import { ViralSpinner } from "./gui/spinner/viral-spinner";
|
|
28
|
+
import { ViralTools } from "./gui/tools/viral-tools";
|
|
29
|
+
import { LocalStorageService } from "./services/local-storage.service";
|
|
31
30
|
/**
|
|
32
31
|
* Root of library
|
|
33
32
|
*/
|
|
@@ -57,7 +56,6 @@ export declare class ViralViewerApi extends EventDispatcher {
|
|
|
57
56
|
viralAvatarManager: ViralAvatarManager;
|
|
58
57
|
localStorageService: LocalStorageService;
|
|
59
58
|
viralStats: ViralStats | null;
|
|
60
|
-
viralGeometryHandler: ViralGeometryHandler | null;
|
|
61
59
|
viralSectionBox: ViralSectionBox | null;
|
|
62
60
|
viralBatchDebugPanel: ViralBatchDebugPanel | null;
|
|
63
61
|
viralRenderDebugPanel: ViralRenderDebugPanel | null;
|
package/package.json
CHANGED
|
@@ -1,42 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "viral-viewer-2",
|
|
3
|
+
"version": "7.2.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.mjs",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"LICENSE"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "cd examples && npx vite",
|
|
13
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
+
"build": "npx tsc",
|
|
15
|
+
"bundle-webpack": "webpack --config webpack.config.js",
|
|
16
|
+
"bundle-vite": "npx vite build",
|
|
17
|
+
"deploy": "npm run bundle-vite && npm publish",
|
|
18
|
+
"lint": "biome check .",
|
|
19
|
+
"lint:fix": "biome check --write .",
|
|
20
|
+
"format": "biome format .",
|
|
21
|
+
"format:fix": "biome format . --write",
|
|
22
|
+
"check": "biome check .",
|
|
23
|
+
"check:fix": "biome check . --write"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [],
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@biomejs/biome": "2.3.15",
|
|
30
|
+
"@types/node": "^20.2.5",
|
|
31
|
+
"@types/pako": "^2.0.0",
|
|
32
|
+
"@types/three": "^0.181.0",
|
|
33
|
+
"lil-gui": "^0.20.0",
|
|
34
|
+
"typescript": "^5.0.4",
|
|
35
|
+
"vite": "^5.1.1",
|
|
36
|
+
"vite-plugin-dts": "^3.6.1",
|
|
37
|
+
"vite-plugin-static-copy": "^1.0.1"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"camera-controls": "^2.9.0",
|
|
41
|
+
"meshoptimizer": "^0.25.0",
|
|
42
|
+
"n8ao": "^1.10.1",
|
|
43
|
+
"pako": "^2.1.0",
|
|
44
|
+
"postprocessing": "^6.38.0",
|
|
45
|
+
"potree-core-viral": "^0.3.0",
|
|
46
|
+
"three": "^0.181.2",
|
|
47
|
+
"three-mesh-bvh": "^0.9.2"
|
|
48
|
+
}
|
|
49
|
+
}
|