@inweb/viewer-three 27.12.1 → 27.12.3
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/viewer-three.js +14 -5
- package/dist/viewer-three.js.map +1 -1
- package/dist/viewer-three.min.js +2 -2
- package/dist/viewer-three.module.js +14 -5
- package/dist/viewer-three.module.js.map +1 -1
- package/lib/Viewer/loaders/DynamicGltfLoader/DynamicModelImpl.d.ts +3 -1
- package/lib/Viewer/models/ModelImpl.d.ts +3 -2
- package/lib/Viewer/models/ModelImpl.types.d.ts +82 -1
- package/package.json +5 -5
- package/src/Viewer/loaders/DynamicGltfLoader/DynamicGltfLoader.js +4 -2
- package/src/Viewer/loaders/DynamicGltfLoader/DynamicModelImpl.ts +8 -2
- package/src/Viewer/models/ModelImpl.ts +7 -2
- package/src/Viewer/models/ModelImpl.types.ts +94 -1
package/dist/viewer-three.js
CHANGED
|
@@ -39853,7 +39853,7 @@ void main() {
|
|
|
39853
39853
|
this.scene.traverse((object) => (object.visible = true));
|
|
39854
39854
|
return this;
|
|
39855
39855
|
}
|
|
39856
|
-
highlight(handles) {
|
|
39856
|
+
highlight(handles, style) {
|
|
39857
39857
|
if (this.highlighter) {
|
|
39858
39858
|
const objects = this.getObjectsByHandles(handles);
|
|
39859
39859
|
this.highlighter.highlightObjects(objects);
|
|
@@ -39867,6 +39867,9 @@ void main() {
|
|
|
39867
39867
|
}
|
|
39868
39868
|
return this;
|
|
39869
39869
|
}
|
|
39870
|
+
setHighlightStyle(name, style) {
|
|
39871
|
+
return this;
|
|
39872
|
+
}
|
|
39870
39873
|
explode(scale = 0, coeff = 4) {
|
|
39871
39874
|
const centersCache = new Map();
|
|
39872
39875
|
const calcObjectCenter = (object, target) => {
|
|
@@ -39997,14 +40000,18 @@ void main() {
|
|
|
39997
40000
|
this.gltfLoader.showAllHiddenObjects();
|
|
39998
40001
|
return this;
|
|
39999
40002
|
}
|
|
40000
|
-
highlight(handles) {
|
|
40001
|
-
this.gltfLoader.highlightObjects(handles);
|
|
40003
|
+
highlight(handles, style) {
|
|
40004
|
+
this.gltfLoader.highlightObjects(handles, style);
|
|
40002
40005
|
return this;
|
|
40003
40006
|
}
|
|
40004
40007
|
unhighlight(handles) {
|
|
40005
40008
|
this.gltfLoader.unhighlightObjects(handles);
|
|
40006
40009
|
return this;
|
|
40007
40010
|
}
|
|
40011
|
+
setHighlightStyle(name, style) {
|
|
40012
|
+
this.gltfLoader.setHighlightStyle(name, style);
|
|
40013
|
+
return this;
|
|
40014
|
+
}
|
|
40008
40015
|
explode(scale = 0, coeff = 4) {
|
|
40009
40016
|
const centersCache = new Map();
|
|
40010
40017
|
const calcObjectCenter = (object, target) => {
|
|
@@ -42205,7 +42212,9 @@ void main() {
|
|
|
42205
42212
|
uniform highp sampler2D highlightTexture;
|
|
42206
42213
|
uniform float objectStateTextureSize;
|
|
42207
42214
|
varying vec4 vColorOverride;
|
|
42208
|
-
|
|
42215
|
+
// The style index is the same for all vertices of an object. Interpolated, it can come out just below the
|
|
42216
|
+
// integer, and int() then picks the previous style (pixel noise on some GPUs, e.g. SwiftShader).
|
|
42217
|
+
flat varying float vHighlightStyle;
|
|
42209
42218
|
|
|
42210
42219
|
ivec2 getObjectStateCoord(float instanceId) {
|
|
42211
42220
|
int size = int(objectStateTextureSize);
|
|
@@ -42253,7 +42262,7 @@ void main() {
|
|
|
42253
42262
|
#include <common>
|
|
42254
42263
|
varying float vVisibility;
|
|
42255
42264
|
varying vec4 vColorOverride;
|
|
42256
|
-
varying float vHighlightStyle;
|
|
42265
|
+
flat varying float vHighlightStyle;
|
|
42257
42266
|
uniform vec4 highlightStyles[${MAX_HIGHLIGHT_STYLES * HIGHLIGHT_STYLE_VEC4_COUNT}];
|
|
42258
42267
|
|
|
42259
42268
|
// Edges color for the "edges" material, faces color for everything else
|