@blendviewer/vision-scope 0.1.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.
Files changed (87) hide show
  1. package/README.md +95 -0
  2. package/dist/index.js +187288 -0
  3. package/dist/nestcad-envmaps/citadella/negx.jpg +0 -0
  4. package/dist/nestcad-envmaps/citadella/negy.jpg +0 -0
  5. package/dist/nestcad-envmaps/citadella/negz.jpg +0 -0
  6. package/dist/nestcad-envmaps/citadella/posx.jpg +0 -0
  7. package/dist/nestcad-envmaps/citadella/posy.jpg +0 -0
  8. package/dist/nestcad-envmaps/citadella/posz.jpg +0 -0
  9. package/dist/nestcad-envmaps/citadella/readme.txt +13 -0
  10. package/dist/nestcad-envmaps/citadella.jpg +0 -0
  11. package/dist/nestcad-envmaps/fishermans_bastion/negx.jpg +0 -0
  12. package/dist/nestcad-envmaps/fishermans_bastion/negy.jpg +0 -0
  13. package/dist/nestcad-envmaps/fishermans_bastion/negz.jpg +0 -0
  14. package/dist/nestcad-envmaps/fishermans_bastion/posx.jpg +0 -0
  15. package/dist/nestcad-envmaps/fishermans_bastion/posy.jpg +0 -0
  16. package/dist/nestcad-envmaps/fishermans_bastion/posz.jpg +0 -0
  17. package/dist/nestcad-envmaps/fishermans_bastion/readme.txt +13 -0
  18. package/dist/nestcad-envmaps/fishermans_bastion.jpg +0 -0
  19. package/dist/nestcad-envmaps/ice_river/negx.jpg +0 -0
  20. package/dist/nestcad-envmaps/ice_river/negy.jpg +0 -0
  21. package/dist/nestcad-envmaps/ice_river/negz.jpg +0 -0
  22. package/dist/nestcad-envmaps/ice_river/posx.jpg +0 -0
  23. package/dist/nestcad-envmaps/ice_river/posy.jpg +0 -0
  24. package/dist/nestcad-envmaps/ice_river/posz.jpg +0 -0
  25. package/dist/nestcad-envmaps/ice_river/readme.txt +13 -0
  26. package/dist/nestcad-envmaps/ice_river.jpg +0 -0
  27. package/dist/nestcad-envmaps/maskonaive/negx.jpg +0 -0
  28. package/dist/nestcad-envmaps/maskonaive/negy.jpg +0 -0
  29. package/dist/nestcad-envmaps/maskonaive/negz.jpg +0 -0
  30. package/dist/nestcad-envmaps/maskonaive/posx.jpg +0 -0
  31. package/dist/nestcad-envmaps/maskonaive/posy.jpg +0 -0
  32. package/dist/nestcad-envmaps/maskonaive/posz.jpg +0 -0
  33. package/dist/nestcad-envmaps/maskonaive/readme.txt +13 -0
  34. package/dist/nestcad-envmaps/maskonaive.jpg +0 -0
  35. package/dist/nestcad-envmaps/noimage.jpg +0 -0
  36. package/dist/nestcad-envmaps/park/1.png +0 -0
  37. package/dist/nestcad-envmaps/park/2.png +0 -0
  38. package/dist/nestcad-envmaps/park/3.png +0 -0
  39. package/dist/nestcad-envmaps/park/4.png +0 -0
  40. package/dist/nestcad-envmaps/park/5.png +0 -0
  41. package/dist/nestcad-envmaps/park/6.png +0 -0
  42. package/dist/nestcad-envmaps/park/7.png +0 -0
  43. package/dist/nestcad-envmaps/park/negx.jpg +0 -0
  44. package/dist/nestcad-envmaps/park/negy.jpg +0 -0
  45. package/dist/nestcad-envmaps/park/negz.jpg +0 -0
  46. package/dist/nestcad-envmaps/park/posx.jpg +0 -0
  47. package/dist/nestcad-envmaps/park/posy.jpg +0 -0
  48. package/dist/nestcad-envmaps/park/posz.jpg +0 -0
  49. package/dist/nestcad-envmaps/park/readme.txt +13 -0
  50. package/dist/nestcad-envmaps/park.jpg +0 -0
  51. package/dist/nestcad-envmaps/teide/negx.jpg +0 -0
  52. package/dist/nestcad-envmaps/teide/negy.jpg +0 -0
  53. package/dist/nestcad-envmaps/teide/negz.jpg +0 -0
  54. package/dist/nestcad-envmaps/teide/posx.jpg +0 -0
  55. package/dist/nestcad-envmaps/teide/posy.jpg +0 -0
  56. package/dist/nestcad-envmaps/teide/posz.jpg +0 -0
  57. package/dist/nestcad-envmaps/teide/readme.txt +13 -0
  58. package/dist/nestcad-envmaps/teide.jpg +0 -0
  59. package/dist/nestcad-loaders/draco.license.md +252 -0
  60. package/dist/nestcad-loaders/draco_decoder.js +118 -0
  61. package/dist/nestcad-loaders/draco_decoder.wasm +0 -0
  62. package/dist/nestcad-loaders/occt-import-js-worker.js +15 -0
  63. package/dist/nestcad-loaders/occt-import-js.js +21 -0
  64. package/dist/nestcad-loaders/occt-import-js.license.md +504 -0
  65. package/dist/nestcad-loaders/occt-import-js.wasm +0 -0
  66. package/dist/nestcad-loaders/rhino3dm.license.md +21 -0
  67. package/dist/nestcad-loaders/rhino3dm.min.js +21 -0
  68. package/dist/nestcad-loaders/rhino3dm.wasm +0 -0
  69. package/dist/nestcad-loaders/web-ifc-api-browser.js +54925 -0
  70. package/dist/nestcad-loaders/web-ifc.license.md +375 -0
  71. package/dist/nestcad-loaders/web-ifc.wasm +0 -0
  72. package/dist/samples/.gitkeep +3 -0
  73. package/dist/samples/config-sample.json +6 -0
  74. package/dist/samples/logo-sample.svg +4 -0
  75. package/dist/samples/readme-sample.md +10 -0
  76. package/dist/styles/archive.css +431 -0
  77. package/dist/styles/code.css +119 -0
  78. package/dist/styles/document.css +1158 -0
  79. package/dist/styles/image.css +77 -0
  80. package/dist/styles/loading.css +124 -0
  81. package/dist/styles/media.css +99 -0
  82. package/dist/styles/native-three.css +54 -0
  83. package/dist/styles/spatial.css +39 -0
  84. package/dist/styles/tabular.css +157 -0
  85. package/dist/ui-styles/ui.css +1171 -0
  86. package/dist/vision-scope.css +1 -0
  87. package/package.json +80 -0
@@ -0,0 +1,77 @@
1
+ /* Image Renderer Styles */
2
+
3
+ .vision-scope-image {
4
+ position: relative;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: #f5f5f5;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+
13
+ .vision-scope-image canvas {
14
+ max-width: 100%;
15
+ max-height: 100%;
16
+ object-fit: contain;
17
+ }
18
+
19
+ .vision-scope-image .vision-scope-loading {
20
+ position: absolute;
21
+ top: 50%;
22
+ left: 50%;
23
+ transform: translate(-50%, -50%);
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: center;
27
+ gap: 15px;
28
+ background: rgba(0, 0, 0, 0.8);
29
+ padding: 30px;
30
+ border-radius: 12px;
31
+ color: white;
32
+ z-index: 1000;
33
+ }
34
+
35
+ .vision-scope-image .loading-spinner {
36
+ width: 40px;
37
+ height: 40px;
38
+ border: 3px solid rgba(255, 255, 255, 0.3);
39
+ border-top-color: #fff;
40
+ border-radius: 50%;
41
+ animation: vision-scope-spin 0.8s linear infinite;
42
+ }
43
+
44
+ @keyframes vision-scope-spin {
45
+ to {
46
+ transform: rotate(360deg);
47
+ }
48
+ }
49
+
50
+ .vision-scope-image .loading-text {
51
+ font-size: 14px;
52
+ font-weight: 500;
53
+ }
54
+
55
+ .vision-scope-image .loading-progress {
56
+ width: 200px;
57
+ display: flex;
58
+ flex-direction: column;
59
+ gap: 8px;
60
+ }
61
+
62
+ .vision-scope-image .loading-progress .progress-bar {
63
+ width: 0%;
64
+ height: 4px;
65
+ background: #4caf50;
66
+ border-radius: 2px;
67
+ transition: width 0.3s ease;
68
+ }
69
+
70
+ .vision-scope-image .progress-text {
71
+ font-size: 12px;
72
+ text-align: center;
73
+ color: rgba(255, 255, 255, 0.8);
74
+ }
75
+
76
+
77
+
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Unified loader — matches internalThree.ejs / nestcad EmbeddedViewer exactly.
3
+ * White cascade dots on #eee background, no overlay panel or caption.
4
+ */
5
+
6
+ .vision-scope-root .loader,
7
+ .vision-scope-loading .loader {
8
+ width: 10px;
9
+ height: 68px;
10
+ display: inline-block;
11
+ position: absolute;
12
+ border-radius: 4px;
13
+ left: 45%;
14
+ top: 50%;
15
+ box-sizing: border-box;
16
+ animation: animloader 1s linear infinite alternate;
17
+ }
18
+
19
+ @keyframes animloader {
20
+ 0% {
21
+ box-shadow:
22
+ 20px 0 rgba(255, 255, 255, 0),
23
+ 40px 0 rgba(255, 255, 255, 0),
24
+ 60px 0 rgba(255, 255, 255, 0),
25
+ 80px 0 rgba(255, 255, 255, 0),
26
+ 100px 0 rgba(255, 255, 255, 0);
27
+ }
28
+ 20% {
29
+ box-shadow:
30
+ 20px 0 white,
31
+ 40px 0 rgba(255, 255, 255, 0),
32
+ 60px 0 rgba(255, 255, 255, 0),
33
+ 80px 0 rgba(255, 255, 255, 0),
34
+ 100px 0 rgba(255, 255, 255, 0);
35
+ }
36
+ 40% {
37
+ box-shadow:
38
+ 20px 0 white,
39
+ 40px 0 white,
40
+ 60px 0 rgba(255, 255, 255, 0),
41
+ 80px 0 rgba(255, 255, 255, 0),
42
+ 100px 0 rgba(255, 255, 255, 0);
43
+ }
44
+ 60% {
45
+ box-shadow:
46
+ 20px 0 white,
47
+ 40px 0 white,
48
+ 60px 0 white,
49
+ 80px 0 rgba(255, 255, 255, 0),
50
+ 100px 0 rgba(255, 255, 255, 0);
51
+ }
52
+ 80% {
53
+ box-shadow:
54
+ 20px 0 white,
55
+ 40px 0 white,
56
+ 60px 0 white,
57
+ 80px 0 white,
58
+ 100px 0 rgba(255, 255, 255, 0);
59
+ }
60
+ 100% {
61
+ box-shadow:
62
+ 20px 0 white,
63
+ 40px 0 white,
64
+ 60px 0 white,
65
+ 80px 0 white,
66
+ 100px 0 white;
67
+ }
68
+ }
69
+
70
+ .vision-scope-loading {
71
+ position: absolute;
72
+ inset: 0;
73
+ z-index: 10000;
74
+ pointer-events: none;
75
+ background: transparent;
76
+ }
77
+
78
+ .vision-scope-loading .loading-text {
79
+ display: none;
80
+ }
81
+
82
+ .vision-scope-loading--with-message {
83
+ display: flex;
84
+ flex-direction: column;
85
+ align-items: center;
86
+ justify-content: center;
87
+ gap: 16px;
88
+ background: rgba(238, 238, 238, 0.72);
89
+ }
90
+
91
+ .vision-scope-loading--with-message .loader {
92
+ position: relative;
93
+ left: auto;
94
+ top: auto;
95
+ }
96
+
97
+ .vision-scope-loading--with-message .loading-text {
98
+ display: block;
99
+ font-size: 13px;
100
+ font-weight: 500;
101
+ color: #475569;
102
+ letter-spacing: 0.02em;
103
+ }
104
+
105
+ .vision-scope-loading .loading-progress {
106
+ width: min(220px, 70vw);
107
+ display: flex;
108
+ flex-direction: column;
109
+ gap: 8px;
110
+ }
111
+
112
+ .vision-scope-loading .loading-progress .progress-bar {
113
+ width: 0%;
114
+ height: 4px;
115
+ background: #2563eb;
116
+ border-radius: 2px;
117
+ transition: width 0.25s ease;
118
+ }
119
+
120
+ .vision-scope-loading .progress-text {
121
+ font-size: 12px;
122
+ text-align: center;
123
+ color: #64748b;
124
+ }
@@ -0,0 +1,99 @@
1
+ /* Media Renderer Styles */
2
+
3
+ .vision-scope-media {
4
+ position: relative;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: #eeeeee; /* Default gray background like Spatial/Image */
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+
13
+ /* Video specific background - black for letterboxing */
14
+ .vision-scope-media.media-video {
15
+ background: #000;
16
+ }
17
+
18
+ /* Audio specific background - gray */
19
+ .vision-scope-media.media-audio {
20
+ background: #eeeeee;
21
+ }
22
+
23
+ /* Plyr player container */
24
+ .vision-scope-media .plyr {
25
+ width: 100%;
26
+ height: 100%;
27
+ }
28
+
29
+ /* Plyr video container - ensure contain is applied */
30
+ .vision-scope-media .plyr--video {
31
+ width: 100%;
32
+ height: 100%;
33
+ }
34
+
35
+ .vision-scope-media .plyr--video video {
36
+ width: 100% !important;
37
+ height: 100% !important;
38
+ object-fit: contain !important; /* Force contain with !important */
39
+ }
40
+
41
+ /* Plyr audio container - centered */
42
+ .vision-scope-media .plyr--audio {
43
+ width: 100%;
44
+ max-width: 600px;
45
+ position: absolute;
46
+ top: 50%;
47
+ left: 50%;
48
+ transform: translate(-50%, -50%);
49
+ }
50
+
51
+ /* Video player specific styles */
52
+ .vision-scope-media video {
53
+ width: 100% !important;
54
+ height: 100% !important;
55
+ object-fit: contain !important;
56
+ }
57
+
58
+ /* Audio player specific styles */
59
+ .vision-scope-media audio {
60
+ width: 100%;
61
+ max-width: 600px;
62
+ }
63
+
64
+ /* Loading indicator */
65
+ .vision-scope-media .vision-scope-loading {
66
+ position: absolute;
67
+ top: 50%;
68
+ left: 50%;
69
+ transform: translate(-50%, -50%);
70
+ display: flex;
71
+ flex-direction: column;
72
+ align-items: center;
73
+ gap: 15px;
74
+ background: rgba(0, 0, 0, 0.8);
75
+ padding: 30px;
76
+ border-radius: 12px;
77
+ color: white;
78
+ z-index: 1000;
79
+ }
80
+
81
+ .vision-scope-media .loading-spinner {
82
+ width: 40px;
83
+ height: 40px;
84
+ border: 3px solid rgba(255, 255, 255, 0.3);
85
+ border-top-color: #fff;
86
+ border-radius: 50%;
87
+ animation: vision-scope-spin 0.8s linear infinite;
88
+ }
89
+
90
+ @keyframes vision-scope-spin {
91
+ to {
92
+ transform: rotate(360deg);
93
+ }
94
+ }
95
+
96
+ .vision-scope-media .loading-text {
97
+ font-size: 14px;
98
+ font-weight: 500;
99
+ }
@@ -0,0 +1,54 @@
1
+ /*
2
+ * VisionScope Native Three.js Renderer Styles
3
+ */
4
+
5
+ .vision-scope-native-three {
6
+ position: relative;
7
+ width: 100%;
8
+ height: 100%;
9
+ overflow: hidden;
10
+ background-color: #eeeeee;
11
+ }
12
+
13
+ /* Loading uses shared styles from loading.css */
14
+
15
+ /* Canvas */
16
+ .vision-scope-native-three canvas {
17
+ display: block;
18
+ width: 100%;
19
+ height: 100%;
20
+ position: relative;
21
+ z-index: 1;
22
+ }
23
+
24
+ /* Stats (FPS Counter) */
25
+ .vision-scope-native-three .stats {
26
+ position: absolute;
27
+ top: 0;
28
+ left: 0;
29
+ z-index: 100;
30
+ }
31
+
32
+ /* Fullscreen styles */
33
+ .vision-scope-native-three:-webkit-full-screen {
34
+ width: 100%;
35
+ height: 100%;
36
+ }
37
+
38
+ .vision-scope-native-three:-moz-full-screen {
39
+ width: 100%;
40
+ height: 100%;
41
+ }
42
+
43
+ .vision-scope-native-three:-ms-fullscreen {
44
+ width: 100%;
45
+ height: 100%;
46
+ }
47
+
48
+ .vision-scope-native-three:fullscreen {
49
+ width: 100%;
50
+ height: 100%;
51
+ }
52
+
53
+
54
+
@@ -0,0 +1,39 @@
1
+ /* VisionScope Spatial Renderer Styles */
2
+
3
+ .vision-scope-spatial {
4
+ width: 100%;
5
+ height: 100%;
6
+ position: relative;
7
+ background: #eeeeee;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .vision-scope-spatial canvas {
12
+ position: relative;
13
+ z-index: 1;
14
+ }
15
+
16
+ /* Error State */
17
+ .vision-scope-error {
18
+ position: absolute;
19
+ top: 50%;
20
+ left: 50%;
21
+ transform: translate(-50%, -50%);
22
+ color: #ef4444;
23
+ font-size: 14px;
24
+ text-align: center;
25
+ z-index: 10001;
26
+ }
27
+
28
+ /* Fullscreen Support */
29
+ .vision-scope-spatial:fullscreen {
30
+ background: #eeeeee;
31
+ }
32
+
33
+ .vision-scope-spatial:-webkit-full-screen {
34
+ background: #eeeeee;
35
+ }
36
+
37
+ .vision-scope-spatial:-moz-full-screen {
38
+ background: #eeeeee;
39
+ }
@@ -0,0 +1,157 @@
1
+ @import 'x-data-spreadsheet/dist/xspreadsheet.css';
2
+
3
+ .vision-scope-tabular {
4
+ display: flex;
5
+ flex-direction: column;
6
+ min-height: 0;
7
+ height: 100%;
8
+ width: 100%;
9
+ background: #f3f3f3;
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
11
+ sans-serif;
12
+ }
13
+
14
+ .tabular-viewer-layout {
15
+ display: flex;
16
+ flex-direction: column;
17
+ min-height: 0;
18
+ height: 100%;
19
+ width: 100%;
20
+ box-sizing: border-box;
21
+ background: #f3f3f3;
22
+ }
23
+
24
+ .tabular-preview-banner {
25
+ flex-shrink: 0;
26
+ padding: 0.4rem 0.75rem;
27
+ font-size: 0.75rem;
28
+ line-height: 1.4;
29
+ color: #5f6368;
30
+ background: #e8f0fe;
31
+ border-bottom: 1px solid #d2e3fc;
32
+ }
33
+
34
+ .tabular-spreadsheet-host {
35
+ flex: 1;
36
+ min-height: 0;
37
+ min-width: 0;
38
+ width: 100%;
39
+ position: relative;
40
+ }
41
+
42
+ /* x-spreadsheet root fills host */
43
+ .tabular-spreadsheet-host .x-spreadsheet {
44
+ width: 100% !important;
45
+ height: 100% !important;
46
+ }
47
+
48
+ .tabular-spreadsheet-host .x-spreadsheet-sheet {
49
+ width: 100% !important;
50
+ }
51
+
52
+ /* Align with PDF viewer neutral chrome */
53
+ .vision-scope-tabular .x-spreadsheet-bottombar {
54
+ border-top: 1px solid #dadce0;
55
+ background: #fafafa;
56
+ }
57
+
58
+ .vision-scope-tabular .x-spreadsheet-toolbar {
59
+ display: none !important;
60
+ }
61
+
62
+ .tabular-viewer-content {
63
+ flex: 1;
64
+ min-height: 0;
65
+ display: flex;
66
+ flex-direction: column;
67
+ }
68
+
69
+ .tabular-sheet-switcher {
70
+ flex: 1;
71
+ min-height: 0;
72
+ display: flex;
73
+ flex-direction: column;
74
+ }
75
+
76
+ .tabular-sheet-tabs {
77
+ display: flex;
78
+ flex-shrink: 0;
79
+ gap: 0;
80
+ border-bottom: 1px solid #dadce0;
81
+ background: #fafafa;
82
+ padding: 0 8px;
83
+ }
84
+
85
+ .tabular-sheet-tab {
86
+ border: none;
87
+ background: transparent;
88
+ padding: 8px 14px;
89
+ font-size: 12px;
90
+ color: #5f6368;
91
+ cursor: pointer;
92
+ border-bottom: 2px solid transparent;
93
+ margin-bottom: -1px;
94
+ }
95
+
96
+ .tabular-sheet-tab.active {
97
+ color: #1a73e8;
98
+ border-bottom-color: #1a73e8;
99
+ font-weight: 500;
100
+ }
101
+
102
+ .tabular-sheet-panel {
103
+ flex: 1;
104
+ min-height: 0;
105
+ display: flex;
106
+ flex-direction: column;
107
+ }
108
+
109
+ .tabular-report-scroll {
110
+ flex: 1;
111
+ min-height: 0;
112
+ overflow: auto;
113
+ background: #fff;
114
+ padding: 8px 12px 12px;
115
+ }
116
+
117
+ .tabular-report-scroll[hidden],
118
+ .tabular-spreadsheet-host[hidden] {
119
+ display: none !important;
120
+ }
121
+
122
+ .tabular-report-scroll > .tabular-report-sheet {
123
+ display: block;
124
+ }
125
+
126
+ .tabular-report-sheet {
127
+ display: none;
128
+ }
129
+
130
+ .tabular-report-sheet.active {
131
+ display: block;
132
+ }
133
+
134
+ .tabular-report-canvas {
135
+ position: relative;
136
+ margin: 0;
137
+ background: #fff;
138
+ }
139
+
140
+ .tabular-report-cell {
141
+ position: absolute;
142
+ box-sizing: border-box;
143
+ display: flex;
144
+ padding: 2px 6px;
145
+ overflow: hidden;
146
+ line-height: 1.35;
147
+ }
148
+
149
+ .tabular-report-cell-text {
150
+ width: 100%;
151
+ }
152
+
153
+ .tabular-report-image {
154
+ position: absolute;
155
+ object-fit: contain;
156
+ pointer-events: none;
157
+ }