@xeokit/xeokit-sdk 2.4.0-alpha-15 → 2.4.0-alpha-17
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/xeokit-sdk.cjs.js +226 -250
- package/dist/xeokit-sdk.es.js +226 -250
- package/dist/xeokit-sdk.es5.js +181 -185
- package/dist/xeokit-sdk.min.cjs.js +4 -4
- package/dist/xeokit-sdk.min.es.js +4 -4
- package/dist/xeokit-sdk.min.es5.js +3 -3
- package/package.json +1 -1
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -323,7 +323,7 @@ class ContextMenu {
|
|
|
323
323
|
* @param {Object} [cfg.context] The context, which is passed into the item callbacks. This can also be dynamically set on {@link ContextMenu#context}. This must be set before calling {@link ContextMenu#show}.
|
|
324
324
|
* @param {Boolean} [cfg.enabled=true] Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu#show} does nothing while this is ````false````.
|
|
325
325
|
* @param {Boolean} [cfg.hideOnMouseDown=true] Whether this ````ContextMenu```` automatically hides whenever we mouse-down or tap anywhere in the page.
|
|
326
|
-
* @param {Boolean} [cfg.
|
|
326
|
+
* @param {Boolean} [cfg.hideOnAction=true] Whether this ````ContextMenu```` automatically hides after we select a menu item. Se false if we want the menu to remain shown and show any updates to its item titles, after we've selected an item.
|
|
327
327
|
*/
|
|
328
328
|
constructor(cfg = {}) {
|
|
329
329
|
|
|
@@ -362,7 +362,7 @@ class ContextMenu {
|
|
|
362
362
|
this.items = cfg.items;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
this.
|
|
365
|
+
this._hideOnAction = (cfg.hideOnAction !== false);
|
|
366
366
|
|
|
367
367
|
this.context = cfg.context;
|
|
368
368
|
this.enabled = cfg.enabled !== false;
|
|
@@ -801,7 +801,7 @@ class ContextMenu {
|
|
|
801
801
|
if (item.doAction) {
|
|
802
802
|
item.doAction(self._context);
|
|
803
803
|
}
|
|
804
|
-
if (this.
|
|
804
|
+
if (this._hideOnAction) {
|
|
805
805
|
self.hide();
|
|
806
806
|
} else {
|
|
807
807
|
self._updateItemsTitles();
|
|
@@ -8940,7 +8940,7 @@ class VBOSceneModelNode {
|
|
|
8940
8940
|
|
|
8941
8941
|
}
|
|
8942
8942
|
|
|
8943
|
-
const tempVec3a$
|
|
8943
|
+
const tempVec3a$1h = math.vec3();
|
|
8944
8944
|
|
|
8945
8945
|
/**
|
|
8946
8946
|
* Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
|
|
@@ -9020,7 +9020,7 @@ function worldToRTCPos(worldPos, rtcCenter, rtcPos) {
|
|
|
9020
9020
|
*/
|
|
9021
9021
|
function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) {
|
|
9022
9022
|
|
|
9023
|
-
const center = math.getPositionsCenter(worldPositions, tempVec3a$
|
|
9023
|
+
const center = math.getPositionsCenter(worldPositions, tempVec3a$1h);
|
|
9024
9024
|
|
|
9025
9025
|
const rtcCenterX = Math.round(center[0] / cellSize) * cellSize;
|
|
9026
9026
|
const rtcCenterY = Math.round(center[1] / cellSize) * cellSize;
|
|
@@ -9056,7 +9056,7 @@ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize =
|
|
|
9056
9056
|
*/
|
|
9057
9057
|
function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) {
|
|
9058
9058
|
const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
|
|
9059
|
-
const dirNormalized = math.normalizeVec3(dir, tempVec3a$
|
|
9059
|
+
const dirNormalized = math.normalizeVec3(dir, tempVec3a$1h);
|
|
9060
9060
|
math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
|
|
9061
9061
|
return rtcPlanePos;
|
|
9062
9062
|
}
|
|
@@ -11521,12 +11521,12 @@ class Annotation extends Marker {
|
|
|
11521
11521
|
const canvasPos = this.canvasPos;
|
|
11522
11522
|
this._marker.style.left = (Math.floor(left + canvasPos[0]) - 12) + "px";
|
|
11523
11523
|
this._marker.style.top = (Math.floor(top + canvasPos[1]) - 12) + "px";
|
|
11524
|
-
this._marker.style["z-index"] =
|
|
11524
|
+
this._marker.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
|
|
11525
11525
|
const offsetX = 20;
|
|
11526
11526
|
const offsetY = -17;
|
|
11527
11527
|
this._label.style.left = 20 + Math.floor(left + canvasPos[0] + offsetX) + "px";
|
|
11528
11528
|
this._label.style.top = Math.floor(top + canvasPos[1] + offsetY) + "px";
|
|
11529
|
-
this._label.style["z-index"] =
|
|
11529
|
+
this._label.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
|
|
11530
11530
|
}
|
|
11531
11531
|
|
|
11532
11532
|
/**
|
|
@@ -11687,8 +11687,8 @@ class Annotation extends Marker {
|
|
|
11687
11687
|
}
|
|
11688
11688
|
}
|
|
11689
11689
|
|
|
11690
|
-
const tempVec3a$
|
|
11691
|
-
const tempVec3b$
|
|
11690
|
+
const tempVec3a$1g = math.vec3();
|
|
11691
|
+
const tempVec3b$c = math.vec3();
|
|
11692
11692
|
const tempVec3c$9 = math.vec3();
|
|
11693
11693
|
|
|
11694
11694
|
/**
|
|
@@ -12063,8 +12063,6 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12063
12063
|
* @param {String} [cfg.id="Annotations"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
|
|
12064
12064
|
* @param {String} [cfg.markerHTML] HTML text template for Annotation markers. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````markerElementId````.
|
|
12065
12065
|
* @param {String} [cfg.labelHTML] HTML text template for Annotation labels. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````labelElementId````.
|
|
12066
|
-
* @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12067
|
-
* @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12068
12066
|
* @param {HTMLElement} [cfg.container] Container DOM element for markers and labels. Defaults to ````document.body````.
|
|
12069
12067
|
* @param {{String:(String|Number)}} [cfg.values={}] Map of default values to insert into the HTML templates for the marker and label.
|
|
12070
12068
|
* @param {Number} [cfg.surfaceOffset=0.3] The amount by which each {@link Annotation} is offset from the surface of
|
|
@@ -12073,12 +12071,10 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12073
12071
|
constructor(viewer, cfg) {
|
|
12074
12072
|
|
|
12075
12073
|
super("Annotations", viewer);
|
|
12076
|
-
|
|
12074
|
+
|
|
12077
12075
|
this._labelHTML = cfg.labelHTML || "<div></div>";
|
|
12078
12076
|
this._markerHTML = cfg.markerHTML || "<div></div>";
|
|
12079
12077
|
this._container = cfg.container || document.body;
|
|
12080
|
-
this._markerZIndex = cfg.markerZIndex || randomZIndex;
|
|
12081
|
-
this._labelZIndex = cfg.labelZIndex || randomZIndex;
|
|
12082
12078
|
this._values = cfg.values || {};
|
|
12083
12079
|
|
|
12084
12080
|
/**
|
|
@@ -12154,8 +12150,6 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12154
12150
|
* @param {Number[]} [params.look] Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
|
|
12155
12151
|
* @param {Number[]} [params.up] Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
|
|
12156
12152
|
* @param {String} [params.projection] Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
|
|
12157
|
-
* @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12158
|
-
* @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12159
12153
|
* @returns {Annotation} The new {@link Annotation}.
|
|
12160
12154
|
*/
|
|
12161
12155
|
createAnnotation(params) {
|
|
@@ -12171,8 +12165,8 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12171
12165
|
if (!pickResult.worldPos || !pickResult.worldNormal) {
|
|
12172
12166
|
this.error("Param 'pickResult' does not have both worldPos and worldNormal");
|
|
12173
12167
|
} else {
|
|
12174
|
-
const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$
|
|
12175
|
-
const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$
|
|
12168
|
+
const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1g);
|
|
12169
|
+
const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$c);
|
|
12176
12170
|
const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$9);
|
|
12177
12171
|
worldPos = offsetWorldPos;
|
|
12178
12172
|
entity = pickResult.entity;
|
|
@@ -12207,9 +12201,7 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12207
12201
|
markerElement: markerElement,
|
|
12208
12202
|
labelElement: labelElement,
|
|
12209
12203
|
markerHTML: params.markerHTML || this._markerHTML,
|
|
12210
|
-
markerZIndex : params.markerZIndex || this._markerZIndex,
|
|
12211
12204
|
labelHTML: params.labelHTML || this._labelHTML,
|
|
12212
|
-
labelZIndex : params.labelZIndex || this._labelZIndex,
|
|
12213
12205
|
occludable: params.occludable,
|
|
12214
12206
|
values: utils.apply(params.values, utils.apply(this._values, {})),
|
|
12215
12207
|
markerShown: params.markerShown,
|
|
@@ -14370,7 +14362,7 @@ const MARKER_COLOR = math.vec3([1.0, 0.0, 0.0]);
|
|
|
14370
14362
|
const POINT_SIZE = 20;
|
|
14371
14363
|
const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces
|
|
14372
14364
|
|
|
14373
|
-
const tempVec3a$
|
|
14365
|
+
const tempVec3a$1f = math.vec3();
|
|
14374
14366
|
|
|
14375
14367
|
/**
|
|
14376
14368
|
* Manages occlusion testing. Private member of a Renderer.
|
|
@@ -14707,7 +14699,7 @@ class OcclusionTester {
|
|
|
14707
14699
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
14708
14700
|
if (active) {
|
|
14709
14701
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
14710
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
14702
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f));
|
|
14711
14703
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
14712
14704
|
}
|
|
14713
14705
|
}
|
|
@@ -18712,7 +18704,7 @@ class CustomProjection extends Component {
|
|
|
18712
18704
|
}
|
|
18713
18705
|
|
|
18714
18706
|
const tempVec3$6 = math.vec3();
|
|
18715
|
-
const tempVec3b$
|
|
18707
|
+
const tempVec3b$b = math.vec3();
|
|
18716
18708
|
const tempVec3c$8 = math.vec3();
|
|
18717
18709
|
const tempVec3d$4 = math.vec3();
|
|
18718
18710
|
const tempVec3e$3 = math.vec3();
|
|
@@ -19022,7 +19014,7 @@ class Camera extends Component {
|
|
|
19022
19014
|
orbitYaw(angleInc) {
|
|
19023
19015
|
let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
19024
19016
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
19025
|
-
lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$
|
|
19017
|
+
lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$b);
|
|
19026
19018
|
this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$8); // Set eye position as 'look' plus 'eye' vector
|
|
19027
19019
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4); // Rotate 'up' vector
|
|
19028
19020
|
}
|
|
@@ -19040,7 +19032,7 @@ class Camera extends Component {
|
|
|
19040
19032
|
}
|
|
19041
19033
|
}
|
|
19042
19034
|
let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
19043
|
-
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$
|
|
19035
|
+
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$b), math.normalizeVec3(this._up, tempVec3c$8));
|
|
19044
19036
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
19045
19037
|
eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$4);
|
|
19046
19038
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3e$3);
|
|
@@ -19055,7 +19047,7 @@ class Camera extends Component {
|
|
|
19055
19047
|
yaw(angleInc) {
|
|
19056
19048
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
19057
19049
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
19058
|
-
look2 = math.transformPoint3(tempMat, look2, tempVec3b$
|
|
19050
|
+
look2 = math.transformPoint3(tempMat, look2, tempVec3b$b);
|
|
19059
19051
|
this.look = math.addVec3(look2, this._eye, tempVec3c$8);
|
|
19060
19052
|
if (this._gimbalLock) {
|
|
19061
19053
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4);
|
|
@@ -19075,7 +19067,7 @@ class Camera extends Component {
|
|
|
19075
19067
|
}
|
|
19076
19068
|
}
|
|
19077
19069
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
19078
|
-
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$
|
|
19070
|
+
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$b), math.normalizeVec3(this._up, tempVec3c$8));
|
|
19079
19071
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
19080
19072
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3f$3);
|
|
19081
19073
|
look2 = math.transformPoint3(tempMat, look2, tempVec3d$4);
|
|
@@ -19092,7 +19084,7 @@ class Camera extends Component {
|
|
|
19092
19084
|
const vec = [0, 0, 0];
|
|
19093
19085
|
let v;
|
|
19094
19086
|
if (pan[0] !== 0) {
|
|
19095
|
-
const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$
|
|
19087
|
+
const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$b));
|
|
19096
19088
|
v = math.mulVec3Scalar(left, pan[0]);
|
|
19097
19089
|
vec[0] += v[0];
|
|
19098
19090
|
vec[1] += v[1];
|
|
@@ -19121,7 +19113,7 @@ class Camera extends Component {
|
|
|
19121
19113
|
*/
|
|
19122
19114
|
zoom(delta) {
|
|
19123
19115
|
const vec = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
19124
|
-
const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$
|
|
19116
|
+
const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$b));
|
|
19125
19117
|
const newLenLook = Math.abs(lenLook + delta);
|
|
19126
19118
|
if (newLenLook < 0.5) {
|
|
19127
19119
|
return;
|
|
@@ -19583,7 +19575,7 @@ class Camera extends Component {
|
|
|
19583
19575
|
}
|
|
19584
19576
|
|
|
19585
19577
|
const tempVec4$9 = math.vec4();
|
|
19586
|
-
const tempVec3a$
|
|
19578
|
+
const tempVec3a$1e = math.vec3();
|
|
19587
19579
|
|
|
19588
19580
|
/**
|
|
19589
19581
|
* @private
|
|
@@ -19670,7 +19662,7 @@ class TrianglesDataTextureColorRenderer {
|
|
|
19670
19662
|
if (active) {
|
|
19671
19663
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
19672
19664
|
if (origin) {
|
|
19673
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
19665
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
|
|
19674
19666
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
19675
19667
|
} else {
|
|
19676
19668
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -20197,7 +20189,7 @@ class TrianglesDataTextureColorRenderer {
|
|
|
20197
20189
|
|
|
20198
20190
|
const defaultColor$6 = new Float32Array([1, 1, 1]);
|
|
20199
20191
|
math.vec4();
|
|
20200
|
-
const tempVec3a$
|
|
20192
|
+
const tempVec3a$1d = math.vec3();
|
|
20201
20193
|
|
|
20202
20194
|
/**
|
|
20203
20195
|
* @private
|
|
@@ -20305,7 +20297,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
20305
20297
|
if (active) {
|
|
20306
20298
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
20307
20299
|
if (origin) {
|
|
20308
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
20300
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
|
|
20309
20301
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
20310
20302
|
} else {
|
|
20311
20303
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -20661,7 +20653,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
20661
20653
|
}
|
|
20662
20654
|
}
|
|
20663
20655
|
|
|
20664
|
-
const tempVec3a$
|
|
20656
|
+
const tempVec3a$1c = math.vec3();
|
|
20665
20657
|
const defaultColor$5 = new Float32Array([0,0,0,1]);
|
|
20666
20658
|
|
|
20667
20659
|
/**
|
|
@@ -20761,7 +20753,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
20761
20753
|
if (active) {
|
|
20762
20754
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
20763
20755
|
if (origin) {
|
|
20764
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
20756
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
|
|
20765
20757
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
20766
20758
|
} else {
|
|
20767
20759
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -21080,7 +21072,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
21080
21072
|
}
|
|
21081
21073
|
}
|
|
21082
21074
|
|
|
21083
|
-
const tempVec3a$
|
|
21075
|
+
const tempVec3a$1b = math.vec3();
|
|
21084
21076
|
|
|
21085
21077
|
/**
|
|
21086
21078
|
* @private
|
|
@@ -21154,7 +21146,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
21154
21146
|
if (active) {
|
|
21155
21147
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
21156
21148
|
if (origin) {
|
|
21157
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
21149
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
|
|
21158
21150
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
21159
21151
|
} else {
|
|
21160
21152
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -21482,7 +21474,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
21482
21474
|
}
|
|
21483
21475
|
}
|
|
21484
21476
|
|
|
21485
|
-
const tempVec3a$
|
|
21477
|
+
const tempVec3a$1a = math.vec3();
|
|
21486
21478
|
|
|
21487
21479
|
/**
|
|
21488
21480
|
* @private
|
|
@@ -21569,7 +21561,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
21569
21561
|
if (active) {
|
|
21570
21562
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
21571
21563
|
if (origin) {
|
|
21572
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
21564
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
|
|
21573
21565
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
21574
21566
|
} else {
|
|
21575
21567
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -21925,7 +21917,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
21925
21917
|
}
|
|
21926
21918
|
}
|
|
21927
21919
|
|
|
21928
|
-
const tempVec3a$
|
|
21920
|
+
const tempVec3a$19 = math.vec3();
|
|
21929
21921
|
|
|
21930
21922
|
/**
|
|
21931
21923
|
* @private
|
|
@@ -22017,7 +22009,7 @@ class TrianglesDataTexturePickDepthRenderer {
|
|
|
22017
22009
|
if (active) {
|
|
22018
22010
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
22019
22011
|
if (origin) {
|
|
22020
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
22012
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
|
|
22021
22013
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
22022
22014
|
} else {
|
|
22023
22015
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -22376,7 +22368,7 @@ class TrianglesDataTexturePickDepthRenderer {
|
|
|
22376
22368
|
}
|
|
22377
22369
|
}
|
|
22378
22370
|
|
|
22379
|
-
const tempVec3a$
|
|
22371
|
+
const tempVec3a$18 = math.vec3();
|
|
22380
22372
|
|
|
22381
22373
|
/**
|
|
22382
22374
|
* @private
|
|
@@ -22468,7 +22460,7 @@ class TrianglesDataTexturePickNormalsRenderer {
|
|
|
22468
22460
|
if (active) {
|
|
22469
22461
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
22470
22462
|
if (origin) {
|
|
22471
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
22463
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
|
|
22472
22464
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
22473
22465
|
} else {
|
|
22474
22466
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -23032,7 +23024,7 @@ class TrianglesDataTextureOcclusionRenderer {
|
|
|
23032
23024
|
}
|
|
23033
23025
|
|
|
23034
23026
|
math.vec4();
|
|
23035
|
-
const tempVec3a$
|
|
23027
|
+
const tempVec3a$17 = math.vec3();
|
|
23036
23028
|
|
|
23037
23029
|
/**
|
|
23038
23030
|
* @private
|
|
@@ -23117,7 +23109,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
23117
23109
|
if (active) {
|
|
23118
23110
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
23119
23111
|
if (origin) {
|
|
23120
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
23112
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
|
|
23121
23113
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
23122
23114
|
} else {
|
|
23123
23115
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -23488,7 +23480,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
23488
23480
|
}
|
|
23489
23481
|
}
|
|
23490
23482
|
|
|
23491
|
-
const tempVec3a$
|
|
23483
|
+
const tempVec3a$16 = math.vec3();
|
|
23492
23484
|
|
|
23493
23485
|
/**
|
|
23494
23486
|
* @private
|
|
@@ -23551,7 +23543,7 @@ class TrianglesDataTextureNormalsRenderer {
|
|
|
23551
23543
|
if (active) {
|
|
23552
23544
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
23553
23545
|
if (origin) {
|
|
23554
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
23546
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
|
|
23555
23547
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
23556
23548
|
} else {
|
|
23557
23549
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -23981,7 +23973,7 @@ class TrianglesDataTextureShadowRenderer {
|
|
|
23981
23973
|
}
|
|
23982
23974
|
|
|
23983
23975
|
const tempVec4$8 = math.vec4();
|
|
23984
|
-
const tempVec3a$
|
|
23976
|
+
const tempVec3a$15 = math.vec3();
|
|
23985
23977
|
|
|
23986
23978
|
const TEXTURE_DECODE_FUNCS$2 = {
|
|
23987
23979
|
"linear": "linearToLinear",
|
|
@@ -24052,7 +24044,7 @@ class TrianglesDataTextureColorQualityRenderer {
|
|
|
24052
24044
|
if (active) {
|
|
24053
24045
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
24054
24046
|
if (origin) {
|
|
24055
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
24047
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
|
|
24056
24048
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
24057
24049
|
} else {
|
|
24058
24050
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -24791,7 +24783,7 @@ class TrianglesDataTextureColorQualityRenderer {
|
|
|
24791
24783
|
}
|
|
24792
24784
|
}
|
|
24793
24785
|
|
|
24794
|
-
const tempVec3a$
|
|
24786
|
+
const tempVec3a$14 = math.vec3();
|
|
24795
24787
|
|
|
24796
24788
|
/**
|
|
24797
24789
|
* @private
|
|
@@ -24905,7 +24897,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
24905
24897
|
if (active) {
|
|
24906
24898
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
24907
24899
|
if (origin) {
|
|
24908
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
24900
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$14);
|
|
24909
24901
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
24910
24902
|
} else {
|
|
24911
24903
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -27642,8 +27634,8 @@ const tempUint8Array4 = new Uint8Array (4);
|
|
|
27642
27634
|
|
|
27643
27635
|
const tempFloat32Array3 = new Float32Array (3);
|
|
27644
27636
|
|
|
27645
|
-
const tempVec3a$
|
|
27646
|
-
const tempVec3b$
|
|
27637
|
+
const tempVec3a$13 = math.vec3();
|
|
27638
|
+
const tempVec3b$a = math.vec3();
|
|
27647
27639
|
const tempVec3c$7 = math.vec3();
|
|
27648
27640
|
const tempVec3d$3 = math.vec3();
|
|
27649
27641
|
const tempVec3e$2 = math.vec3();
|
|
@@ -29268,8 +29260,8 @@ class TrianglesDataTextureLayer {
|
|
|
29268
29260
|
const origin = state.origin;
|
|
29269
29261
|
const offset = portion.offset;
|
|
29270
29262
|
|
|
29271
|
-
const rtcRayOrigin = tempVec3a$
|
|
29272
|
-
const rtcRayDir = tempVec3b$
|
|
29263
|
+
const rtcRayOrigin = tempVec3a$13;
|
|
29264
|
+
const rtcRayDir = tempVec3b$a;
|
|
29273
29265
|
|
|
29274
29266
|
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$7) : worldRayOrigin); // World -> RTC
|
|
29275
29267
|
rtcRayDir.set(worldRayDir);
|
|
@@ -32118,7 +32110,7 @@ class ViewFrustumCullingManager {
|
|
|
32118
32110
|
|
|
32119
32111
|
WEBGL_INFO.SUPPORTED_EXTENSIONS["ANGLE_instanced_arrays"];
|
|
32120
32112
|
|
|
32121
|
-
const tempVec3a$
|
|
32113
|
+
const tempVec3a$12 = math.vec3();
|
|
32122
32114
|
const tempMat4$3 = math.mat4();
|
|
32123
32115
|
|
|
32124
32116
|
const defaultScale$1 = math.vec3([1, 1, 1]);
|
|
@@ -33090,7 +33082,7 @@ class DataTextureSceneModel extends Component {
|
|
|
33090
33082
|
}
|
|
33091
33083
|
|
|
33092
33084
|
const cfgOrigin = cfg.origin || cfg.rtcCenter;
|
|
33093
|
-
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$
|
|
33085
|
+
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$12) : this._origin;
|
|
33094
33086
|
|
|
33095
33087
|
switch (primitive) {
|
|
33096
33088
|
case "triangles":
|
|
@@ -33354,7 +33346,7 @@ class DataTextureSceneModel extends Component {
|
|
|
33354
33346
|
if (!origin) {
|
|
33355
33347
|
origin = cfgOrigin;
|
|
33356
33348
|
} else {
|
|
33357
|
-
origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$
|
|
33349
|
+
origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$12);
|
|
33358
33350
|
}
|
|
33359
33351
|
} else {
|
|
33360
33352
|
origin = this._origin;
|
|
@@ -35325,8 +35317,11 @@ const Renderer = function (scene, options) {
|
|
|
35325
35317
|
*
|
|
35326
35318
|
* Exit snapshot mode using endSnapshot().
|
|
35327
35319
|
*/
|
|
35328
|
-
this.beginSnapshot = function () {
|
|
35320
|
+
this.beginSnapshot = function (params={}) {
|
|
35329
35321
|
const snapshotBuffer = renderBufferManager.getRenderBuffer("snapshot");
|
|
35322
|
+
if (params.width && params.height) {
|
|
35323
|
+
snapshotBuffer.setSize([params.width, params.height]);
|
|
35324
|
+
}
|
|
35330
35325
|
snapshotBuffer.bind();
|
|
35331
35326
|
snapshotBuffer.clear();
|
|
35332
35327
|
snapshotBound = true;
|
|
@@ -40637,11 +40632,7 @@ class SAO extends Component {
|
|
|
40637
40632
|
|
|
40638
40633
|
super(owner, cfg);
|
|
40639
40634
|
|
|
40640
|
-
|
|
40641
|
-
const isSafari = (ua && ua[1].toLowerCase() === "safari");
|
|
40642
|
-
|
|
40643
|
-
this._supported = (!isSafari) &&
|
|
40644
|
-
WEBGL_INFO.SUPPORTED_EXTENSIONS["OES_standard_derivatives"]; // For computing normals in SAO fragment shader
|
|
40635
|
+
this._supported = WEBGL_INFO.SUPPORTED_EXTENSIONS["OES_standard_derivatives"]; // For computing normals in SAO fragment shader
|
|
40645
40636
|
|
|
40646
40637
|
this.enabled = cfg.enabled;
|
|
40647
40638
|
this.kernelRadius = cfg.kernelRadius;
|
|
@@ -45983,7 +45974,7 @@ function buildFragmentDraw(mesh) {
|
|
|
45983
45974
|
* @author xeolabs / https://github.com/xeolabs
|
|
45984
45975
|
*/
|
|
45985
45976
|
|
|
45986
|
-
const tempVec3a$
|
|
45977
|
+
const tempVec3a$11 = math.vec3();
|
|
45987
45978
|
|
|
45988
45979
|
const ids$2 = new Map$1({});
|
|
45989
45980
|
|
|
@@ -46082,7 +46073,7 @@ DrawRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
46082
46073
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
46083
46074
|
if (active) {
|
|
46084
46075
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
46085
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
46076
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
|
|
46086
46077
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
46087
46078
|
}
|
|
46088
46079
|
}
|
|
@@ -47220,7 +47211,7 @@ function buildFragment$5(mesh) {
|
|
|
47220
47211
|
|
|
47221
47212
|
const ids$1 = new Map$1({});
|
|
47222
47213
|
|
|
47223
|
-
const tempVec3a$
|
|
47214
|
+
const tempVec3a$10 = math.vec3();
|
|
47224
47215
|
|
|
47225
47216
|
/**
|
|
47226
47217
|
* @private
|
|
@@ -47304,7 +47295,7 @@ EmphasisFillRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
|
|
|
47304
47295
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
47305
47296
|
if (active) {
|
|
47306
47297
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
47307
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
47298
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
|
|
47308
47299
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
47309
47300
|
}
|
|
47310
47301
|
}
|
|
@@ -47640,7 +47631,7 @@ function buildFragment$4(mesh) {
|
|
|
47640
47631
|
|
|
47641
47632
|
const ids = new Map$1({});
|
|
47642
47633
|
|
|
47643
|
-
const tempVec3a
|
|
47634
|
+
const tempVec3a$$ = math.vec3();
|
|
47644
47635
|
|
|
47645
47636
|
/**
|
|
47646
47637
|
* @private
|
|
@@ -47723,7 +47714,7 @@ EmphasisEdgesRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
|
|
|
47723
47714
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
47724
47715
|
if (active) {
|
|
47725
47716
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
47726
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a
|
|
47717
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
|
|
47727
47718
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
47728
47719
|
}
|
|
47729
47720
|
}
|
|
@@ -48018,7 +48009,7 @@ function buildFragment$3(mesh) {
|
|
|
48018
48009
|
* @author xeolabs / https://github.com/xeolabs
|
|
48019
48010
|
*/
|
|
48020
48011
|
|
|
48021
|
-
const tempVec3a
|
|
48012
|
+
const tempVec3a$_ = math.vec3();
|
|
48022
48013
|
|
|
48023
48014
|
// No ID, because there is exactly one PickMeshRenderer per scene
|
|
48024
48015
|
|
|
@@ -48102,7 +48093,7 @@ PickMeshRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
48102
48093
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
48103
48094
|
if (active) {
|
|
48104
48095
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
48105
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a
|
|
48096
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
|
|
48106
48097
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
48107
48098
|
}
|
|
48108
48099
|
}
|
|
@@ -48335,7 +48326,7 @@ function buildFragment$2(mesh) {
|
|
|
48335
48326
|
* @author xeolabs / https://github.com/xeolabs
|
|
48336
48327
|
*/
|
|
48337
48328
|
|
|
48338
|
-
const tempVec3a$
|
|
48329
|
+
const tempVec3a$Z = math.vec3();
|
|
48339
48330
|
|
|
48340
48331
|
/**
|
|
48341
48332
|
* @private
|
|
@@ -48427,7 +48418,7 @@ PickTriangleRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
48427
48418
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
48428
48419
|
if (active) {
|
|
48429
48420
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
48430
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
48421
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
|
|
48431
48422
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
48432
48423
|
}
|
|
48433
48424
|
}
|
|
@@ -48664,7 +48655,7 @@ function buildFragment$1(mesh) {
|
|
|
48664
48655
|
* @author xeolabs / https://github.com/xeolabs
|
|
48665
48656
|
*/
|
|
48666
48657
|
|
|
48667
|
-
const tempVec3a$
|
|
48658
|
+
const tempVec3a$Y = math.vec3();
|
|
48668
48659
|
|
|
48669
48660
|
// No ID, because there is exactly one PickMeshRenderer per scene
|
|
48670
48661
|
|
|
@@ -48772,7 +48763,7 @@ OcclusionRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
48772
48763
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
48773
48764
|
if (active) {
|
|
48774
48765
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
48775
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
48766
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Y) : sectionPlane.pos);
|
|
48776
48767
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
48777
48768
|
}
|
|
48778
48769
|
}
|
|
@@ -61374,8 +61365,8 @@ class LineSet extends Component {
|
|
|
61374
61365
|
}
|
|
61375
61366
|
|
|
61376
61367
|
const tempVec3$4 = math.vec3();
|
|
61377
|
-
const tempVec3a$
|
|
61378
|
-
const tempVec3b$
|
|
61368
|
+
const tempVec3a$X = math.vec3();
|
|
61369
|
+
const tempVec3b$9 = math.vec3();
|
|
61379
61370
|
const tempVec3c$6 = math.vec3();
|
|
61380
61371
|
|
|
61381
61372
|
/**
|
|
@@ -62055,8 +62046,8 @@ class BCFViewpointsPlugin extends Plugin {
|
|
|
62055
62046
|
bcfViewpoint.bitmaps.forEach(function (e) {
|
|
62056
62047
|
const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png"
|
|
62057
62048
|
const bitmap_data = e.bitmap_data; // base64
|
|
62058
|
-
let location = xyzObjectToArray(e.location, tempVec3a$
|
|
62059
|
-
let normal = xyzObjectToArray(e.normal, tempVec3b$
|
|
62049
|
+
let location = xyzObjectToArray(e.location, tempVec3a$X);
|
|
62050
|
+
let normal = xyzObjectToArray(e.normal, tempVec3b$9);
|
|
62060
62051
|
let up = xyzObjectToArray(e.up, tempVec3c$6);
|
|
62061
62052
|
let height = e.height || 1;
|
|
62062
62053
|
if (!bitmap_type) {
|
|
@@ -63945,7 +63936,7 @@ class SplineCurve extends Curve {
|
|
|
63945
63936
|
}
|
|
63946
63937
|
}
|
|
63947
63938
|
|
|
63948
|
-
const tempVec3a$
|
|
63939
|
+
const tempVec3a$W = math.vec3();
|
|
63949
63940
|
|
|
63950
63941
|
/**
|
|
63951
63942
|
* @desc Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
|
|
@@ -64077,9 +64068,9 @@ class CameraPath extends Component {
|
|
|
64077
64068
|
t = t / (this._frames[this._frames.length - 1].t - this._frames[0].t);
|
|
64078
64069
|
t = t < 0.0 ? 0.0 : (t > 1.0 ? 1.0 : t);
|
|
64079
64070
|
|
|
64080
|
-
camera.eye = this._eyeCurve.getPoint(t, tempVec3a$
|
|
64081
|
-
camera.look = this._lookCurve.getPoint(t, tempVec3a$
|
|
64082
|
-
camera.up = this._upCurve.getPoint(t, tempVec3a$
|
|
64071
|
+
camera.eye = this._eyeCurve.getPoint(t, tempVec3a$W);
|
|
64072
|
+
camera.look = this._lookCurve.getPoint(t, tempVec3a$W);
|
|
64073
|
+
camera.up = this._upCurve.getPoint(t, tempVec3a$W);
|
|
64083
64074
|
}
|
|
64084
64075
|
|
|
64085
64076
|
/**
|
|
@@ -65118,7 +65109,7 @@ CameraPathAnimation.PLAYING = 2;
|
|
|
65118
65109
|
CameraPathAnimation.PLAYING_TO = 3;
|
|
65119
65110
|
|
|
65120
65111
|
const tempVec3$2 = math.vec3();
|
|
65121
|
-
const tempVec3b$
|
|
65112
|
+
const tempVec3b$8 = math.vec3();
|
|
65122
65113
|
math.vec3();
|
|
65123
65114
|
const zeroVec$1 = math.vec3([0, -1, 0]);
|
|
65124
65115
|
const tempQuat = math.vec4([0, 0, 0, 1]);
|
|
@@ -65546,7 +65537,7 @@ class ImagePlane extends Component {
|
|
|
65546
65537
|
const dist = -math.dotVec3(negDir, tempVec3$2);
|
|
65547
65538
|
|
|
65548
65539
|
math.normalizeVec3(negDir);
|
|
65549
|
-
math.mulVec3Scalar(negDir, dist, tempVec3b$
|
|
65540
|
+
math.mulVec3Scalar(negDir, dist, tempVec3b$8);
|
|
65550
65541
|
math.vec3PairToQuaternion(zeroVec$1, dir, tempQuat);
|
|
65551
65542
|
|
|
65552
65543
|
this._node.quaternion = tempQuat;
|
|
@@ -66712,8 +66703,8 @@ class SpriteMarker extends Marker {
|
|
|
66712
66703
|
}
|
|
66713
66704
|
}
|
|
66714
66705
|
|
|
66715
|
-
const tempVec3a$
|
|
66716
|
-
const tempVec3b$
|
|
66706
|
+
const tempVec3a$V = math.vec3();
|
|
66707
|
+
const tempVec3b$7 = math.vec3();
|
|
66717
66708
|
const tempMat4a = math.mat4();
|
|
66718
66709
|
|
|
66719
66710
|
/**
|
|
@@ -66790,8 +66781,8 @@ function frustumIntersectsAABB3(frustum, aabb) {
|
|
|
66790
66781
|
|
|
66791
66782
|
let ret = Frustum.INSIDE;
|
|
66792
66783
|
|
|
66793
|
-
const min = tempVec3a$
|
|
66794
|
-
const max = tempVec3b$
|
|
66784
|
+
const min = tempVec3a$V;
|
|
66785
|
+
const max = tempVec3b$7;
|
|
66795
66786
|
|
|
66796
66787
|
min[0] = aabb[0];
|
|
66797
66788
|
min[1] = aabb[1];
|
|
@@ -69372,7 +69363,7 @@ const RENDER_PASSES = {
|
|
|
69372
69363
|
};
|
|
69373
69364
|
|
|
69374
69365
|
const tempVec4$7 = math.vec4();
|
|
69375
|
-
const tempVec3a$
|
|
69366
|
+
const tempVec3a$U = math.vec3();
|
|
69376
69367
|
|
|
69377
69368
|
/**
|
|
69378
69369
|
* @private
|
|
@@ -69437,7 +69428,7 @@ class TrianglesBatchingColorRenderer {
|
|
|
69437
69428
|
if (active) {
|
|
69438
69429
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
69439
69430
|
if (origin) {
|
|
69440
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
69431
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
|
|
69441
69432
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
69442
69433
|
} else {
|
|
69443
69434
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -69865,7 +69856,7 @@ class TrianglesBatchingColorRenderer {
|
|
|
69865
69856
|
}
|
|
69866
69857
|
|
|
69867
69858
|
const tempVec4$6 = math.vec4();
|
|
69868
|
-
const tempVec3a$
|
|
69859
|
+
const tempVec3a$T = math.vec3();
|
|
69869
69860
|
|
|
69870
69861
|
/**
|
|
69871
69862
|
* @private
|
|
@@ -69927,7 +69918,7 @@ class TrianglesBatchingFlatColorRenderer {
|
|
|
69927
69918
|
if (active) {
|
|
69928
69919
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
69929
69920
|
if (origin) {
|
|
69930
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
69921
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
|
|
69931
69922
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
69932
69923
|
} else {
|
|
69933
69924
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -70344,7 +70335,7 @@ class TrianglesBatchingFlatColorRenderer {
|
|
|
70344
70335
|
}
|
|
70345
70336
|
|
|
70346
70337
|
const defaultColor$4 = new Float32Array([1, 1, 1]);
|
|
70347
|
-
const tempVec3a$
|
|
70338
|
+
const tempVec3a$S = math.vec3();
|
|
70348
70339
|
|
|
70349
70340
|
/**
|
|
70350
70341
|
* @private
|
|
@@ -70428,7 +70419,7 @@ class TrianglesBatchingSilhouetteRenderer {
|
|
|
70428
70419
|
if (active) {
|
|
70429
70420
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
70430
70421
|
if (origin) {
|
|
70431
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
70422
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
|
|
70432
70423
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
70433
70424
|
} else {
|
|
70434
70425
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -70665,7 +70656,7 @@ class TrianglesBatchingSilhouetteRenderer {
|
|
|
70665
70656
|
}
|
|
70666
70657
|
}
|
|
70667
70658
|
|
|
70668
|
-
const tempVec3a$
|
|
70659
|
+
const tempVec3a$R = math.vec3();
|
|
70669
70660
|
const defaultColor$3 = new Float32Array([0,0,0,1]);
|
|
70670
70661
|
|
|
70671
70662
|
/**
|
|
@@ -70748,7 +70739,7 @@ class TrianglesBatchingEdgesRenderer {
|
|
|
70748
70739
|
if (active) {
|
|
70749
70740
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
70750
70741
|
if (origin) {
|
|
70751
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
70742
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
|
|
70752
70743
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
70753
70744
|
} else {
|
|
70754
70745
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -70976,7 +70967,7 @@ class TrianglesBatchingEdgesRenderer {
|
|
|
70976
70967
|
}
|
|
70977
70968
|
}
|
|
70978
70969
|
|
|
70979
|
-
const tempVec3a$
|
|
70970
|
+
const tempVec3a$Q = math.vec3();
|
|
70980
70971
|
|
|
70981
70972
|
/**
|
|
70982
70973
|
* @private
|
|
@@ -71036,7 +71027,7 @@ class TrianglesBatchingEdgesColorRenderer {
|
|
|
71036
71027
|
if (active) {
|
|
71037
71028
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71038
71029
|
if (origin) {
|
|
71039
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71030
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
|
|
71040
71031
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71041
71032
|
} else {
|
|
71042
71033
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -71264,7 +71255,7 @@ class TrianglesBatchingEdgesColorRenderer {
|
|
|
71264
71255
|
}
|
|
71265
71256
|
}
|
|
71266
71257
|
|
|
71267
|
-
const tempVec3a$
|
|
71258
|
+
const tempVec3a$P = math.vec3();
|
|
71268
71259
|
|
|
71269
71260
|
/**
|
|
71270
71261
|
* @private
|
|
@@ -71330,7 +71321,7 @@ class TrianglesBatchingPickMeshRenderer {
|
|
|
71330
71321
|
if (active) {
|
|
71331
71322
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71332
71323
|
if (origin) {
|
|
71333
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71324
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
|
|
71334
71325
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71335
71326
|
} else {
|
|
71336
71327
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -71560,7 +71551,7 @@ class TrianglesBatchingPickMeshRenderer {
|
|
|
71560
71551
|
}
|
|
71561
71552
|
}
|
|
71562
71553
|
|
|
71563
|
-
const tempVec3a$
|
|
71554
|
+
const tempVec3a$O = math.vec3();
|
|
71564
71555
|
|
|
71565
71556
|
/**
|
|
71566
71557
|
* @private
|
|
@@ -71631,7 +71622,7 @@ class TrianglesBatchingPickDepthRenderer {
|
|
|
71631
71622
|
if (active) {
|
|
71632
71623
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71633
71624
|
if (origin) {
|
|
71634
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71625
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
|
|
71635
71626
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71636
71627
|
} else {
|
|
71637
71628
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -71869,7 +71860,7 @@ class TrianglesBatchingPickDepthRenderer {
|
|
|
71869
71860
|
}
|
|
71870
71861
|
}
|
|
71871
71862
|
|
|
71872
|
-
const tempVec3a$
|
|
71863
|
+
const tempVec3a$N = math.vec3();
|
|
71873
71864
|
|
|
71874
71865
|
/**
|
|
71875
71866
|
* @private
|
|
@@ -71937,7 +71928,7 @@ class TrianglesBatchingPickNormalsRenderer {
|
|
|
71937
71928
|
if (active) {
|
|
71938
71929
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71939
71930
|
if (origin) {
|
|
71940
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71931
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
|
|
71941
71932
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71942
71933
|
} else {
|
|
71943
71934
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72162,7 +72153,7 @@ class TrianglesBatchingPickNormalsRenderer {
|
|
|
72162
72153
|
}
|
|
72163
72154
|
}
|
|
72164
72155
|
|
|
72165
|
-
const tempVec3a$
|
|
72156
|
+
const tempVec3a$M = math.vec3();
|
|
72166
72157
|
|
|
72167
72158
|
/**
|
|
72168
72159
|
* @private
|
|
@@ -72222,7 +72213,7 @@ class TrianglesBatchingOcclusionRenderer {
|
|
|
72222
72213
|
if (active) {
|
|
72223
72214
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72224
72215
|
if (origin) {
|
|
72225
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
72216
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
|
|
72226
72217
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72227
72218
|
} else {
|
|
72228
72219
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72445,7 +72436,7 @@ class TrianglesBatchingOcclusionRenderer {
|
|
|
72445
72436
|
}
|
|
72446
72437
|
}
|
|
72447
72438
|
|
|
72448
|
-
const tempVec3a$
|
|
72439
|
+
const tempVec3a$L = math.vec3();
|
|
72449
72440
|
|
|
72450
72441
|
/**
|
|
72451
72442
|
* @private
|
|
@@ -72505,7 +72496,7 @@ class TrianglesBatchingDepthRenderer {
|
|
|
72505
72496
|
if (active) {
|
|
72506
72497
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72507
72498
|
if (origin) {
|
|
72508
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
72499
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
|
|
72509
72500
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72510
72501
|
} else {
|
|
72511
72502
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72729,7 +72720,7 @@ class TrianglesBatchingDepthRenderer {
|
|
|
72729
72720
|
}
|
|
72730
72721
|
}
|
|
72731
72722
|
|
|
72732
|
-
const tempVec3a$
|
|
72723
|
+
const tempVec3a$K = math.vec3();
|
|
72733
72724
|
|
|
72734
72725
|
/**
|
|
72735
72726
|
* @private
|
|
@@ -72792,7 +72783,7 @@ class TrianglesBatchingNormalsRenderer {
|
|
|
72792
72783
|
if (active) {
|
|
72793
72784
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72794
72785
|
if (origin) {
|
|
72795
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
72786
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
|
|
72796
72787
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72797
72788
|
} else {
|
|
72798
72789
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73032,7 +73023,7 @@ class TrianglesBatchingNormalsRenderer {
|
|
|
73032
73023
|
}
|
|
73033
73024
|
}
|
|
73034
73025
|
|
|
73035
|
-
const tempVec3a$
|
|
73026
|
+
const tempVec3a$J = math.vec3();
|
|
73036
73027
|
|
|
73037
73028
|
/**
|
|
73038
73029
|
* Renders BatchingLayer fragment depths to a shadow map.
|
|
@@ -73101,7 +73092,7 @@ class TrianglesBatchingShadowRenderer {
|
|
|
73101
73092
|
if (active) {
|
|
73102
73093
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73103
73094
|
if (origin) {
|
|
73104
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
73095
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
|
|
73105
73096
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73106
73097
|
} else {
|
|
73107
73098
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73273,7 +73264,7 @@ class TrianglesBatchingShadowRenderer {
|
|
|
73273
73264
|
}
|
|
73274
73265
|
|
|
73275
73266
|
const tempVec4$5 = math.vec4();
|
|
73276
|
-
const tempVec3a$
|
|
73267
|
+
const tempVec3a$I = math.vec3();
|
|
73277
73268
|
|
|
73278
73269
|
// const TEXTURE_DECODE_FUNCS = {};
|
|
73279
73270
|
// TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
|
|
@@ -73346,7 +73337,7 @@ class TrianglesBatchingPBRRenderer {
|
|
|
73346
73337
|
if (active) {
|
|
73347
73338
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73348
73339
|
if (origin) {
|
|
73349
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
73340
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
|
|
73350
73341
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73351
73342
|
} else {
|
|
73352
73343
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74151,7 +74142,7 @@ class TrianglesBatchingPBRRenderer {
|
|
|
74151
74142
|
}
|
|
74152
74143
|
}
|
|
74153
74144
|
|
|
74154
|
-
const tempVec3a$
|
|
74145
|
+
const tempVec3a$H = math.vec3();
|
|
74155
74146
|
|
|
74156
74147
|
/**
|
|
74157
74148
|
* @private
|
|
@@ -74218,7 +74209,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
|
|
|
74218
74209
|
if (active) {
|
|
74219
74210
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74220
74211
|
if (origin) {
|
|
74221
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
74212
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
|
|
74222
74213
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74223
74214
|
} else {
|
|
74224
74215
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74428,7 +74419,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
|
|
|
74428
74419
|
}
|
|
74429
74420
|
|
|
74430
74421
|
const tempVec4$4 = math.vec4();
|
|
74431
|
-
const tempVec3a$
|
|
74422
|
+
const tempVec3a$G = math.vec3();
|
|
74432
74423
|
|
|
74433
74424
|
/**
|
|
74434
74425
|
* @private
|
|
@@ -74493,7 +74484,7 @@ class TrianglesBatchingColorTextureRenderer {
|
|
|
74493
74484
|
if (active) {
|
|
74494
74485
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74495
74486
|
if (origin) {
|
|
74496
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
74487
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$G);
|
|
74497
74488
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74498
74489
|
} else {
|
|
74499
74490
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75499,8 +75490,8 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]);
|
|
|
75499
75490
|
const tempVec4c$7 = math.vec4([0, 0, 0, 1]);
|
|
75500
75491
|
const tempOBB3$2 = math.OBB3();
|
|
75501
75492
|
|
|
75502
|
-
const tempVec3a$
|
|
75503
|
-
const tempVec3b$
|
|
75493
|
+
const tempVec3a$F = math.vec3();
|
|
75494
|
+
const tempVec3b$6 = math.vec3();
|
|
75504
75495
|
const tempVec3c$5 = math.vec3();
|
|
75505
75496
|
const tempVec3d$2 = math.vec3();
|
|
75506
75497
|
const tempVec3e$1 = math.vec3();
|
|
@@ -76679,8 +76670,8 @@ class TrianglesBatchingLayer {
|
|
|
76679
76670
|
const origin = state.origin;
|
|
76680
76671
|
const offset = portion.offset;
|
|
76681
76672
|
|
|
76682
|
-
const rtcRayOrigin = tempVec3a$
|
|
76683
|
-
const rtcRayDir = tempVec3b$
|
|
76673
|
+
const rtcRayOrigin = tempVec3a$F;
|
|
76674
|
+
const rtcRayDir = tempVec3b$6;
|
|
76684
76675
|
|
|
76685
76676
|
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$5) : worldRayOrigin); // World -> RTC
|
|
76686
76677
|
rtcRayDir.set(worldRayDir);
|
|
@@ -76803,7 +76794,7 @@ class TrianglesBatchingLayer {
|
|
|
76803
76794
|
}
|
|
76804
76795
|
|
|
76805
76796
|
const tempVec4$3 = math.vec4();
|
|
76806
|
-
const tempVec3a$
|
|
76797
|
+
const tempVec3a$E = math.vec3();
|
|
76807
76798
|
|
|
76808
76799
|
/**
|
|
76809
76800
|
* @private
|
|
@@ -76869,7 +76860,7 @@ class TrianglesInstancingColorRenderer {
|
|
|
76869
76860
|
if (active) {
|
|
76870
76861
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76871
76862
|
if (origin) {
|
|
76872
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
76863
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
|
|
76873
76864
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76874
76865
|
} else {
|
|
76875
76866
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77346,7 +77337,7 @@ class TrianglesInstancingColorRenderer {
|
|
|
77346
77337
|
}
|
|
77347
77338
|
|
|
77348
77339
|
const tempVec4$2 = math.vec4();
|
|
77349
|
-
const tempVec3a$
|
|
77340
|
+
const tempVec3a$D = math.vec3();
|
|
77350
77341
|
|
|
77351
77342
|
/**
|
|
77352
77343
|
* @private
|
|
@@ -77408,7 +77399,7 @@ class TrianglesInstancingFlatColorRenderer {
|
|
|
77408
77399
|
if (active) {
|
|
77409
77400
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77410
77401
|
if (origin) {
|
|
77411
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
77402
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
|
|
77412
77403
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77413
77404
|
} else {
|
|
77414
77405
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77855,7 +77846,7 @@ class TrianglesInstancingFlatColorRenderer {
|
|
|
77855
77846
|
}
|
|
77856
77847
|
}
|
|
77857
77848
|
|
|
77858
|
-
const tempVec3a$
|
|
77849
|
+
const tempVec3a$C = math.vec3();
|
|
77859
77850
|
|
|
77860
77851
|
/**
|
|
77861
77852
|
* @private
|
|
@@ -77938,7 +77929,7 @@ class TrianglesInstancingSilhouetteRenderer {
|
|
|
77938
77929
|
if (active) {
|
|
77939
77930
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77940
77931
|
if (origin) {
|
|
77941
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
77932
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
|
|
77942
77933
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77943
77934
|
} else {
|
|
77944
77935
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -78210,7 +78201,7 @@ class TrianglesInstancingSilhouetteRenderer {
|
|
|
78210
78201
|
}
|
|
78211
78202
|
}
|
|
78212
78203
|
|
|
78213
|
-
const tempVec3a$
|
|
78204
|
+
const tempVec3a$B = math.vec3();
|
|
78214
78205
|
const defaultColor$2 = new Float32Array([0,0,0,1]);
|
|
78215
78206
|
|
|
78216
78207
|
/**
|
|
@@ -78294,7 +78285,7 @@ class TrianglesInstancingEdgesRenderer {
|
|
|
78294
78285
|
if (active) {
|
|
78295
78286
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
78296
78287
|
if (origin) {
|
|
78297
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
78288
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
|
|
78298
78289
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
78299
78290
|
} else {
|
|
78300
78291
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -78555,7 +78546,7 @@ class TrianglesInstancingEdgesRenderer {
|
|
|
78555
78546
|
}
|
|
78556
78547
|
}
|
|
78557
78548
|
|
|
78558
|
-
const tempVec3a$
|
|
78549
|
+
const tempVec3a$A = math.vec3();
|
|
78559
78550
|
|
|
78560
78551
|
/**
|
|
78561
78552
|
* @private
|
|
@@ -78616,7 +78607,7 @@ class TrianglesInstancingEdgesColorRenderer {
|
|
|
78616
78607
|
if (active) {
|
|
78617
78608
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
78618
78609
|
if (origin) {
|
|
78619
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
78610
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
|
|
78620
78611
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
78621
78612
|
} else {
|
|
78622
78613
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -78882,7 +78873,7 @@ class TrianglesInstancingEdgesColorRenderer {
|
|
|
78882
78873
|
}
|
|
78883
78874
|
}
|
|
78884
78875
|
|
|
78885
|
-
const tempVec3a$
|
|
78876
|
+
const tempVec3a$z = math.vec3();
|
|
78886
78877
|
|
|
78887
78878
|
/**
|
|
78888
78879
|
* @private
|
|
@@ -78985,7 +78976,7 @@ class TrianglesInstancingPickMeshRenderer {
|
|
|
78985
78976
|
if (active) {
|
|
78986
78977
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
78987
78978
|
if (origin) {
|
|
78988
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
78979
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
|
|
78989
78980
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
78990
78981
|
} else {
|
|
78991
78982
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -79220,7 +79211,7 @@ class TrianglesInstancingPickMeshRenderer {
|
|
|
79220
79211
|
}
|
|
79221
79212
|
}
|
|
79222
79213
|
|
|
79223
|
-
const tempVec3a$
|
|
79214
|
+
const tempVec3a$y = math.vec3();
|
|
79224
79215
|
|
|
79225
79216
|
/**
|
|
79226
79217
|
* @private
|
|
@@ -79297,7 +79288,7 @@ class TrianglesInstancingPickDepthRenderer {
|
|
|
79297
79288
|
if (active) {
|
|
79298
79289
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
79299
79290
|
if (origin) {
|
|
79300
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
79291
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
|
|
79301
79292
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
79302
79293
|
} else {
|
|
79303
79294
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -79565,7 +79556,7 @@ class TrianglesInstancingPickDepthRenderer {
|
|
|
79565
79556
|
}
|
|
79566
79557
|
}
|
|
79567
79558
|
|
|
79568
|
-
const tempVec3a$
|
|
79559
|
+
const tempVec3a$x = math.vec3();
|
|
79569
79560
|
|
|
79570
79561
|
/**
|
|
79571
79562
|
* @private
|
|
@@ -79642,7 +79633,7 @@ class TrianglesInstancingPickNormalsRenderer {
|
|
|
79642
79633
|
if (active) {
|
|
79643
79634
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
79644
79635
|
if (origin) {
|
|
79645
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
79636
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
|
|
79646
79637
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
79647
79638
|
} else {
|
|
79648
79639
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -79919,7 +79910,7 @@ class TrianglesInstancingPickNormalsRenderer {
|
|
|
79919
79910
|
}
|
|
79920
79911
|
}
|
|
79921
79912
|
|
|
79922
|
-
const tempVec3a$
|
|
79913
|
+
const tempVec3a$w = math.vec3();
|
|
79923
79914
|
|
|
79924
79915
|
/**
|
|
79925
79916
|
* @private
|
|
@@ -79980,7 +79971,7 @@ class TrianglesInstancingOcclusionRenderer {
|
|
|
79980
79971
|
if (active) {
|
|
79981
79972
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
79982
79973
|
if (origin) {
|
|
79983
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
79974
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
|
|
79984
79975
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
79985
79976
|
} else {
|
|
79986
79977
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80238,7 +80229,7 @@ class TrianglesInstancingOcclusionRenderer {
|
|
|
80238
80229
|
}
|
|
80239
80230
|
}
|
|
80240
80231
|
|
|
80241
|
-
const tempVec3a$
|
|
80232
|
+
const tempVec3a$v = math.vec3();
|
|
80242
80233
|
|
|
80243
80234
|
/**
|
|
80244
80235
|
* @private
|
|
@@ -80299,7 +80290,7 @@ class TrianglesInstancingDepthRenderer {
|
|
|
80299
80290
|
if (active) {
|
|
80300
80291
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
80301
80292
|
if (origin) {
|
|
80302
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
80293
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
|
|
80303
80294
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
80304
80295
|
} else {
|
|
80305
80296
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80549,7 +80540,7 @@ class TrianglesInstancingDepthRenderer {
|
|
|
80549
80540
|
}
|
|
80550
80541
|
}
|
|
80551
80542
|
|
|
80552
|
-
const tempVec3a$
|
|
80543
|
+
const tempVec3a$u = math.vec3();
|
|
80553
80544
|
|
|
80554
80545
|
/**
|
|
80555
80546
|
* @private
|
|
@@ -80613,7 +80604,7 @@ class TrianglesInstancingNormalsRenderer {
|
|
|
80613
80604
|
if (active) {
|
|
80614
80605
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
80615
80606
|
if (origin) {
|
|
80616
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
80607
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
|
|
80617
80608
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
80618
80609
|
} else {
|
|
80619
80610
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80893,7 +80884,7 @@ class TrianglesInstancingNormalsRenderer {
|
|
|
80893
80884
|
}
|
|
80894
80885
|
}
|
|
80895
80886
|
|
|
80896
|
-
const tempVec3a$
|
|
80887
|
+
const tempVec3a$t = math.vec3();
|
|
80897
80888
|
|
|
80898
80889
|
/**
|
|
80899
80890
|
* Renders InstancingLayer fragment depths to a shadow map.
|
|
@@ -80980,7 +80971,7 @@ class TrianglesInstancingShadowRenderer {
|
|
|
80980
80971
|
if (active) {
|
|
80981
80972
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
80982
80973
|
if (origin) {
|
|
80983
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
80974
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
|
|
80984
80975
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
80985
80976
|
} else {
|
|
80986
80977
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -81173,7 +81164,7 @@ class TrianglesInstancingShadowRenderer {
|
|
|
81173
81164
|
}
|
|
81174
81165
|
|
|
81175
81166
|
const tempVec4$1 = math.vec4();
|
|
81176
|
-
const tempVec3a$
|
|
81167
|
+
const tempVec3a$s = math.vec3();
|
|
81177
81168
|
|
|
81178
81169
|
const TEXTURE_DECODE_FUNCS = {};
|
|
81179
81170
|
TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
|
|
@@ -81247,7 +81238,7 @@ class TrianglesInstancingPBRRenderer {
|
|
|
81247
81238
|
if (active) {
|
|
81248
81239
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
81249
81240
|
if (origin) {
|
|
81250
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
81241
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
|
|
81251
81242
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
81252
81243
|
} else {
|
|
81253
81244
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -82083,7 +82074,7 @@ class TrianglesInstancingPBRRenderer {
|
|
|
82083
82074
|
}
|
|
82084
82075
|
}
|
|
82085
82076
|
|
|
82086
|
-
const tempVec3a$
|
|
82077
|
+
const tempVec3a$r = math.vec3();
|
|
82087
82078
|
|
|
82088
82079
|
/**
|
|
82089
82080
|
* @private
|
|
@@ -82158,7 +82149,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
|
|
|
82158
82149
|
if (active) {
|
|
82159
82150
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
82160
82151
|
if (origin) {
|
|
82161
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
82152
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
|
|
82162
82153
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
82163
82154
|
} else {
|
|
82164
82155
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -82398,7 +82389,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
|
|
|
82398
82389
|
}
|
|
82399
82390
|
|
|
82400
82391
|
const tempVec4 = math.vec4();
|
|
82401
|
-
const tempVec3a$
|
|
82392
|
+
const tempVec3a$q = math.vec3();
|
|
82402
82393
|
|
|
82403
82394
|
/**
|
|
82404
82395
|
* @private
|
|
@@ -82463,7 +82454,7 @@ class TrianglesInstancingColorTextureRenderer {
|
|
|
82463
82454
|
if (active) {
|
|
82464
82455
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
82465
82456
|
if (origin) {
|
|
82466
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
82457
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$q);
|
|
82467
82458
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
82468
82459
|
} else {
|
|
82469
82460
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -83274,8 +83265,8 @@ const tempVec4b$9 = math.vec4([0, 0, 0, 1]);
|
|
|
83274
83265
|
const tempVec4c$6 = math.vec4([0, 0, 0, 1]);
|
|
83275
83266
|
const tempVec3fa$2 = new Float32Array(3);
|
|
83276
83267
|
|
|
83277
|
-
const tempVec3a$
|
|
83278
|
-
const tempVec3b$
|
|
83268
|
+
const tempVec3a$p = math.vec3();
|
|
83269
|
+
const tempVec3b$5 = math.vec3();
|
|
83279
83270
|
const tempVec3c$4 = math.vec3();
|
|
83280
83271
|
const tempVec3d$1 = math.vec3();
|
|
83281
83272
|
const tempVec3e = math.vec3();
|
|
@@ -84203,8 +84194,8 @@ class TrianglesInstancingLayer {
|
|
|
84203
84194
|
const origin = state.origin;
|
|
84204
84195
|
const offset = portion.offset;
|
|
84205
84196
|
|
|
84206
|
-
const rtcRayOrigin = tempVec3a$
|
|
84207
|
-
const rtcRayDir = tempVec3b$
|
|
84197
|
+
const rtcRayOrigin = tempVec3a$p;
|
|
84198
|
+
const rtcRayDir = tempVec3b$5;
|
|
84208
84199
|
|
|
84209
84200
|
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$4) : worldRayOrigin); // World -> RTC
|
|
84210
84201
|
rtcRayDir.set(worldRayDir);
|
|
@@ -84337,7 +84328,7 @@ class TrianglesInstancingLayer {
|
|
|
84337
84328
|
}
|
|
84338
84329
|
}
|
|
84339
84330
|
|
|
84340
|
-
const tempVec3a$
|
|
84331
|
+
const tempVec3a$o = math.vec3();
|
|
84341
84332
|
|
|
84342
84333
|
/**
|
|
84343
84334
|
* @private
|
|
@@ -84400,7 +84391,7 @@ class LinesBatchingColorRenderer {
|
|
|
84400
84391
|
if (active) {
|
|
84401
84392
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
84402
84393
|
if (origin) {
|
|
84403
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
84394
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
|
|
84404
84395
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
84405
84396
|
} else {
|
|
84406
84397
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -84620,7 +84611,7 @@ class LinesBatchingColorRenderer {
|
|
|
84620
84611
|
}
|
|
84621
84612
|
|
|
84622
84613
|
const defaultColor$1 = new Float32Array([1, 1, 1]);
|
|
84623
|
-
const tempVec3a$
|
|
84614
|
+
const tempVec3a$n = math.vec3();
|
|
84624
84615
|
|
|
84625
84616
|
/**
|
|
84626
84617
|
* @private
|
|
@@ -84707,7 +84698,7 @@ class LinesBatchingSilhouetteRenderer {
|
|
|
84707
84698
|
if (active) {
|
|
84708
84699
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
84709
84700
|
if (origin) {
|
|
84710
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
84701
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
|
|
84711
84702
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
84712
84703
|
} else {
|
|
84713
84704
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -85804,7 +85795,7 @@ class LinesBatchingLayer {
|
|
|
85804
85795
|
}
|
|
85805
85796
|
}
|
|
85806
85797
|
|
|
85807
|
-
const tempVec3a$
|
|
85798
|
+
const tempVec3a$m = math.vec3();
|
|
85808
85799
|
|
|
85809
85800
|
/**
|
|
85810
85801
|
* @private
|
|
@@ -85867,7 +85858,7 @@ class LinesInstancingColorRenderer {
|
|
|
85867
85858
|
if (active) {
|
|
85868
85859
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
85869
85860
|
if (origin) {
|
|
85870
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
85861
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
|
|
85871
85862
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
85872
85863
|
} else {
|
|
85873
85864
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -86149,7 +86140,7 @@ class LinesInstancingColorRenderer {
|
|
|
86149
86140
|
}
|
|
86150
86141
|
}
|
|
86151
86142
|
|
|
86152
|
-
const tempVec3a$
|
|
86143
|
+
const tempVec3a$l = math.vec3();
|
|
86153
86144
|
|
|
86154
86145
|
/**
|
|
86155
86146
|
* @private
|
|
@@ -86234,7 +86225,7 @@ class LinesInstancingSilhouetteRenderer {
|
|
|
86234
86225
|
if (active) {
|
|
86235
86226
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
86236
86227
|
if (origin) {
|
|
86237
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
86228
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
|
|
86238
86229
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
86239
86230
|
} else {
|
|
86240
86231
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -87216,7 +87207,7 @@ class LinesInstancingLayer {
|
|
|
87216
87207
|
}
|
|
87217
87208
|
}
|
|
87218
87209
|
|
|
87219
|
-
const tempVec3a$
|
|
87210
|
+
const tempVec3a$k = math.vec3();
|
|
87220
87211
|
|
|
87221
87212
|
/**
|
|
87222
87213
|
* @private
|
|
@@ -87277,7 +87268,7 @@ class PointsBatchingColorRenderer {
|
|
|
87277
87268
|
if (active) {
|
|
87278
87269
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
87279
87270
|
if (origin) {
|
|
87280
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
87271
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
|
|
87281
87272
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
87282
87273
|
} else {
|
|
87283
87274
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -87562,7 +87553,7 @@ class PointsBatchingColorRenderer {
|
|
|
87562
87553
|
}
|
|
87563
87554
|
|
|
87564
87555
|
const defaultColor = new Float32Array([1, 1, 1]);
|
|
87565
|
-
const tempVec3a$
|
|
87556
|
+
const tempVec3a$j = math.vec3();
|
|
87566
87557
|
|
|
87567
87558
|
/**
|
|
87568
87559
|
* @private
|
|
@@ -87647,7 +87638,7 @@ class PointsBatchingSilhouetteRenderer {
|
|
|
87647
87638
|
if (active) {
|
|
87648
87639
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
87649
87640
|
if (origin) {
|
|
87650
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
87641
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
|
|
87651
87642
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
87652
87643
|
} else {
|
|
87653
87644
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -87891,7 +87882,7 @@ class PointsBatchingSilhouetteRenderer {
|
|
|
87891
87882
|
}
|
|
87892
87883
|
}
|
|
87893
87884
|
|
|
87894
|
-
const tempVec3a$
|
|
87885
|
+
const tempVec3a$i = math.vec3();
|
|
87895
87886
|
|
|
87896
87887
|
/**
|
|
87897
87888
|
* @private
|
|
@@ -87958,7 +87949,7 @@ class PointsBatchingPickMeshRenderer {
|
|
|
87958
87949
|
if (active) {
|
|
87959
87950
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
87960
87951
|
if (origin) {
|
|
87961
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
87952
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
|
|
87962
87953
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
87963
87954
|
} else {
|
|
87964
87955
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -88203,7 +88194,7 @@ class PointsBatchingPickMeshRenderer {
|
|
|
88203
88194
|
}
|
|
88204
88195
|
}
|
|
88205
88196
|
|
|
88206
|
-
const tempVec3a$
|
|
88197
|
+
const tempVec3a$h = math.vec3();
|
|
88207
88198
|
|
|
88208
88199
|
/**
|
|
88209
88200
|
* @private
|
|
@@ -88275,7 +88266,7 @@ class PointsBatchingPickDepthRenderer {
|
|
|
88275
88266
|
if (active) {
|
|
88276
88267
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
88277
88268
|
if (origin) {
|
|
88278
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
88269
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
|
|
88279
88270
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
88280
88271
|
} else {
|
|
88281
88272
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -88526,7 +88517,7 @@ class PointsBatchingPickDepthRenderer {
|
|
|
88526
88517
|
}
|
|
88527
88518
|
}
|
|
88528
88519
|
|
|
88529
|
-
const tempVec3a$
|
|
88520
|
+
const tempVec3a$g = math.vec3();
|
|
88530
88521
|
|
|
88531
88522
|
/**
|
|
88532
88523
|
* @private
|
|
@@ -88587,7 +88578,7 @@ class PointsBatchingOcclusionRenderer {
|
|
|
88587
88578
|
if (active) {
|
|
88588
88579
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
88589
88580
|
if (origin) {
|
|
88590
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
88581
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g);
|
|
88591
88582
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
88592
88583
|
} else {
|
|
88593
88584
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -88953,8 +88944,8 @@ class PointsBatchingBuffer {
|
|
|
88953
88944
|
}
|
|
88954
88945
|
}
|
|
88955
88946
|
|
|
88956
|
-
const tempVec3a$
|
|
88957
|
-
const tempVec3b$
|
|
88947
|
+
const tempVec3a$f = math.vec4();
|
|
88948
|
+
const tempVec3b$4 = math.vec4();
|
|
88958
88949
|
const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
|
|
88959
88950
|
const tempVec4b$6 = math.vec4([0, 0, 0, 1]);
|
|
88960
88951
|
const tempVec4c$3 = math.vec4([0, 0, 0, 1]);
|
|
@@ -89106,8 +89097,8 @@ class PointsBatchingLayer {
|
|
|
89106
89097
|
|
|
89107
89098
|
const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed);
|
|
89108
89099
|
|
|
89109
|
-
const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$
|
|
89110
|
-
const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$
|
|
89100
|
+
const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$f);
|
|
89101
|
+
const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$4);
|
|
89111
89102
|
|
|
89112
89103
|
worldAABB[0] = min[0];
|
|
89113
89104
|
worldAABB[1] = min[1];
|
|
@@ -89745,7 +89736,7 @@ class PointsBatchingLayer {
|
|
|
89745
89736
|
}
|
|
89746
89737
|
}
|
|
89747
89738
|
|
|
89748
|
-
const tempVec3a$
|
|
89739
|
+
const tempVec3a$e = math.vec3();
|
|
89749
89740
|
|
|
89750
89741
|
/**
|
|
89751
89742
|
* @private
|
|
@@ -89814,7 +89805,7 @@ class PointsInstancingColorRenderer {
|
|
|
89814
89805
|
if (active) {
|
|
89815
89806
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
89816
89807
|
if (origin) {
|
|
89817
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
89808
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
|
|
89818
89809
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
89819
89810
|
} else {
|
|
89820
89811
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -90124,7 +90115,7 @@ class PointsInstancingColorRenderer {
|
|
|
90124
90115
|
}
|
|
90125
90116
|
}
|
|
90126
90117
|
|
|
90127
|
-
const tempVec3a$
|
|
90118
|
+
const tempVec3a$d = math.vec3();
|
|
90128
90119
|
|
|
90129
90120
|
/**
|
|
90130
90121
|
* @private
|
|
@@ -90208,7 +90199,7 @@ class PointsInstancingSilhouetteRenderer {
|
|
|
90208
90199
|
if (active) {
|
|
90209
90200
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
90210
90201
|
if (origin) {
|
|
90211
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
90202
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
|
|
90212
90203
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
90213
90204
|
} else {
|
|
90214
90205
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -90489,7 +90480,7 @@ class PointsInstancingSilhouetteRenderer {
|
|
|
90489
90480
|
}
|
|
90490
90481
|
}
|
|
90491
90482
|
|
|
90492
|
-
const tempVec3a$
|
|
90483
|
+
const tempVec3a$c = math.vec3();
|
|
90493
90484
|
|
|
90494
90485
|
/**
|
|
90495
90486
|
* @private
|
|
@@ -90595,7 +90586,7 @@ class PointsInstancingPickMeshRenderer {
|
|
|
90595
90586
|
if (active) {
|
|
90596
90587
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
90597
90588
|
if (origin) {
|
|
90598
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
90589
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
|
|
90599
90590
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
90600
90591
|
} else {
|
|
90601
90592
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -90846,7 +90837,7 @@ class PointsInstancingPickMeshRenderer {
|
|
|
90846
90837
|
}
|
|
90847
90838
|
}
|
|
90848
90839
|
|
|
90849
|
-
const tempVec3a$
|
|
90840
|
+
const tempVec3a$b = math.vec3();
|
|
90850
90841
|
|
|
90851
90842
|
/**
|
|
90852
90843
|
* @private
|
|
@@ -90924,7 +90915,7 @@ class PointsInstancingPickDepthRenderer {
|
|
|
90924
90915
|
if (active) {
|
|
90925
90916
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
90926
90917
|
if (origin) {
|
|
90927
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
90918
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
|
|
90928
90919
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
90929
90920
|
} else {
|
|
90930
90921
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -91212,7 +91203,7 @@ class PointsInstancingPickDepthRenderer {
|
|
|
91212
91203
|
}
|
|
91213
91204
|
}
|
|
91214
91205
|
|
|
91215
|
-
const tempVec3a$
|
|
91206
|
+
const tempVec3a$a = math.vec3();
|
|
91216
91207
|
|
|
91217
91208
|
/**
|
|
91218
91209
|
* @private
|
|
@@ -91274,7 +91265,7 @@ class PointsInstancingOcclusionRenderer {
|
|
|
91274
91265
|
if (active) {
|
|
91275
91266
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
91276
91267
|
if (origin) {
|
|
91277
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
91268
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
|
|
91278
91269
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
91279
91270
|
} else {
|
|
91280
91271
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -91563,7 +91554,7 @@ class PointsInstancingOcclusionRenderer {
|
|
|
91563
91554
|
}
|
|
91564
91555
|
}
|
|
91565
91556
|
|
|
91566
|
-
const tempVec3a$
|
|
91557
|
+
const tempVec3a$9 = math.vec3();
|
|
91567
91558
|
|
|
91568
91559
|
/**
|
|
91569
91560
|
* @private
|
|
@@ -91625,7 +91616,7 @@ class PointsInstancingDepthRenderer {
|
|
|
91625
91616
|
if (active) {
|
|
91626
91617
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
91627
91618
|
if (origin) {
|
|
91628
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
91619
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
|
|
91629
91620
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
91630
91621
|
} else {
|
|
91631
91622
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -91909,7 +91900,7 @@ class PointsInstancingDepthRenderer {
|
|
|
91909
91900
|
}
|
|
91910
91901
|
}
|
|
91911
91902
|
|
|
91912
|
-
const tempVec3a$
|
|
91903
|
+
const tempVec3a$8 = math.vec3();
|
|
91913
91904
|
|
|
91914
91905
|
/**
|
|
91915
91906
|
* Renders InstancingLayer fragment depths to a shadow map.
|
|
@@ -91996,7 +91987,7 @@ class PointsInstancingShadowRenderer {
|
|
|
91996
91987
|
if (active) {
|
|
91997
91988
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
91998
91989
|
if (origin) {
|
|
91999
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
91990
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$8);
|
|
92000
91991
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
92001
91992
|
} else {
|
|
92002
91993
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -94337,7 +94328,7 @@ function getKTX2TextureTranscoder(viewer) {
|
|
|
94337
94328
|
return transcoder;
|
|
94338
94329
|
}
|
|
94339
94330
|
|
|
94340
|
-
const tempVec3a$
|
|
94331
|
+
const tempVec3a$7 = math.vec3();
|
|
94341
94332
|
const tempMat4$1 = math.mat4();
|
|
94342
94333
|
|
|
94343
94334
|
const defaultScale = math.vec3([1, 1, 1]);
|
|
@@ -96718,7 +96709,7 @@ class VBOSceneModel extends Component {
|
|
|
96718
96709
|
}
|
|
96719
96710
|
|
|
96720
96711
|
const cfgOrigin = cfg.origin || cfg.rtcCenter;
|
|
96721
|
-
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$
|
|
96712
|
+
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$7) : this._origin;
|
|
96722
96713
|
|
|
96723
96714
|
const instancingLayer = this._getInstancingLayer(origin, textureSetId, geometryId);
|
|
96724
96715
|
|
|
@@ -96780,7 +96771,7 @@ class VBOSceneModel extends Component {
|
|
|
96780
96771
|
|
|
96781
96772
|
let indices = cfg.indices;
|
|
96782
96773
|
let edgeIndices = cfg.edgeIndices;
|
|
96783
|
-
let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$
|
|
96774
|
+
let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$7) : this._origin;
|
|
96784
96775
|
let positions = cfg.positions;
|
|
96785
96776
|
|
|
96786
96777
|
if (positions) {
|
|
@@ -97794,8 +97785,8 @@ class TextureTranscoder {
|
|
|
97794
97785
|
const screenPos = math.vec4();
|
|
97795
97786
|
const viewPos = math.vec4();
|
|
97796
97787
|
|
|
97797
|
-
const tempVec3a$
|
|
97798
|
-
const tempVec3b$
|
|
97788
|
+
const tempVec3a$6 = math.vec3();
|
|
97789
|
+
const tempVec3b$3 = math.vec3();
|
|
97799
97790
|
const tempVec3c$3 = math.vec3();
|
|
97800
97791
|
|
|
97801
97792
|
const tempVec4a$4 = math.vec4();
|
|
@@ -97829,7 +97820,7 @@ class PanController {
|
|
|
97829
97820
|
const camera = this._scene.camera;
|
|
97830
97821
|
|
|
97831
97822
|
if (optionalTargetWorldPos) {
|
|
97832
|
-
const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$
|
|
97823
|
+
const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
|
|
97833
97824
|
const eyeWorldPosDist = math.lenVec3(eyeToWorldPosVec);
|
|
97834
97825
|
dolliedThroughSurface = (eyeWorldPosDist < dollyDelta);
|
|
97835
97826
|
}
|
|
@@ -97853,9 +97844,9 @@ class PanController {
|
|
|
97853
97844
|
// suddenly a lot closer than the point we pivoted about on the surface of the last object
|
|
97854
97845
|
// that we click-drag-pivoted on.
|
|
97855
97846
|
|
|
97856
|
-
const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$
|
|
97847
|
+
const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
|
|
97857
97848
|
const lenEyeTargetVec = math.lenVec3(eyeTargetVec);
|
|
97858
|
-
const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$
|
|
97849
|
+
const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$3)), lenEyeTargetVec);
|
|
97859
97850
|
camera.look = [camera.eye[0] + eyeLookVec[0], camera.eye[1] + eyeLookVec[1], camera.eye[2] + eyeLookVec[2]];
|
|
97860
97851
|
}
|
|
97861
97852
|
|
|
@@ -97872,7 +97863,7 @@ class PanController {
|
|
|
97872
97863
|
|
|
97873
97864
|
const worldPos2 = this._unproject(targetCanvasPos, tempVec4b$4);
|
|
97874
97865
|
const offset = math.subVec3(worldPos2, worldPos1, tempVec4c$1);
|
|
97875
|
-
const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$
|
|
97866
|
+
const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6)), -dollyDelta, tempVec3b$3);
|
|
97876
97867
|
const moveVec = math.addVec3(offset, eyeLookMoveVec, tempVec3c$3);
|
|
97877
97868
|
|
|
97878
97869
|
camera.eye = [camera.eye[0] - moveVec[0], camera.eye[1] - moveVec[1], camera.eye[2] - moveVec[2]];
|
|
@@ -97900,8 +97891,8 @@ class PanController {
|
|
|
97900
97891
|
}
|
|
97901
97892
|
}
|
|
97902
97893
|
|
|
97903
|
-
const tempVec3a$
|
|
97904
|
-
const tempVec3b$
|
|
97894
|
+
const tempVec3a$5 = math.vec3();
|
|
97895
|
+
const tempVec3b$2 = math.vec3();
|
|
97905
97896
|
const tempVec3c$2 = math.vec3();
|
|
97906
97897
|
|
|
97907
97898
|
const tempVec4a$3 = math.vec4();
|
|
@@ -98033,10 +98024,10 @@ class PivotController {
|
|
|
98033
98024
|
|
|
98034
98025
|
_cameraLookingDownwards() { // Returns true if angle between camera viewing direction and World-space "up" axis is too small
|
|
98035
98026
|
const camera = this._scene.camera;
|
|
98036
|
-
const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$
|
|
98037
|
-
const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$
|
|
98027
|
+
const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$5));
|
|
98028
|
+
const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$2);
|
|
98038
98029
|
let rightAxisLen = math.sqLenVec3(rightAxis);
|
|
98039
|
-
return (
|
|
98030
|
+
return (rightAxisLen <= 0.0001);
|
|
98040
98031
|
}
|
|
98041
98032
|
|
|
98042
98033
|
/**
|
|
@@ -98074,8 +98065,8 @@ class PivotController {
|
|
|
98074
98065
|
const screenZ = math.dotVec4(D, Pt3) / math.dotVec4(D, Pt4);
|
|
98075
98066
|
const worldPos = tempVec4a$3;
|
|
98076
98067
|
camera.project.unproject(canvasPos, screenZ, tempVec4b$3, tempVec4c, worldPos);
|
|
98077
|
-
const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$
|
|
98078
|
-
const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$
|
|
98068
|
+
const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$5));
|
|
98069
|
+
const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$2), tempVec3c$2);
|
|
98079
98070
|
this.setPivotPos(posOnSphere);
|
|
98080
98071
|
}
|
|
98081
98072
|
|
|
@@ -98097,10 +98088,6 @@ class PivotController {
|
|
|
98097
98088
|
if (!this._pivoting) {
|
|
98098
98089
|
return;
|
|
98099
98090
|
}
|
|
98100
|
-
if (this._cameraLookingDownwards()) {
|
|
98101
|
-
this._pivoting = false;
|
|
98102
|
-
return;
|
|
98103
|
-
}
|
|
98104
98091
|
if (yawInc === 0 && pitchInc === 0) {
|
|
98105
98092
|
return;
|
|
98106
98093
|
}
|
|
@@ -98710,8 +98697,8 @@ class MousePanRotateDollyHandler {
|
|
|
98710
98697
|
}
|
|
98711
98698
|
|
|
98712
98699
|
const center = math.vec3();
|
|
98713
|
-
const tempVec3a$
|
|
98714
|
-
const tempVec3b$
|
|
98700
|
+
const tempVec3a$4 = math.vec3();
|
|
98701
|
+
const tempVec3b$1 = math.vec3();
|
|
98715
98702
|
const tempVec3c$1 = math.vec3();
|
|
98716
98703
|
const tempVec3d = math.vec3();
|
|
98717
98704
|
|
|
@@ -98765,39 +98752,39 @@ class KeyboardAxisViewHandler {
|
|
|
98765
98752
|
|
|
98766
98753
|
if (axisViewRight) {
|
|
98767
98754
|
|
|
98768
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$
|
|
98755
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$4), tempVec3d));
|
|
98769
98756
|
tempCameraTarget.look.set(center);
|
|
98770
98757
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98771
98758
|
|
|
98772
98759
|
} else if (axisViewBack) {
|
|
98773
98760
|
|
|
98774
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$
|
|
98761
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$4), tempVec3d));
|
|
98775
98762
|
tempCameraTarget.look.set(center);
|
|
98776
98763
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98777
98764
|
|
|
98778
98765
|
} else if (axisViewLeft) {
|
|
98779
98766
|
|
|
98780
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$
|
|
98767
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$4), tempVec3d));
|
|
98781
98768
|
tempCameraTarget.look.set(center);
|
|
98782
98769
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98783
98770
|
|
|
98784
98771
|
} else if (axisViewFront) {
|
|
98785
98772
|
|
|
98786
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$
|
|
98773
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$4), tempVec3d));
|
|
98787
98774
|
tempCameraTarget.look.set(center);
|
|
98788
98775
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98789
98776
|
|
|
98790
98777
|
} else if (axisViewTop) {
|
|
98791
98778
|
|
|
98792
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$
|
|
98779
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$4), tempVec3d));
|
|
98793
98780
|
tempCameraTarget.look.set(center);
|
|
98794
|
-
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$
|
|
98781
|
+
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$1), tempVec3c$1));
|
|
98795
98782
|
|
|
98796
98783
|
} else if (axisViewBottom) {
|
|
98797
98784
|
|
|
98798
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$
|
|
98785
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$4), tempVec3d));
|
|
98799
98786
|
tempCameraTarget.look.set(center);
|
|
98800
|
-
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$
|
|
98787
|
+
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$1)));
|
|
98801
98788
|
}
|
|
98802
98789
|
|
|
98803
98790
|
if ((!configs.firstPerson) && configs.followPointer) {
|
|
@@ -99371,8 +99358,6 @@ class KeyboardPanRotateDollyHandler {
|
|
|
99371
99358
|
const SCALE_DOLLY_EACH_FRAME = 1; // Recalculate dolly speed for eye->target distance on each Nth frame
|
|
99372
99359
|
const EPSILON = 0.001;
|
|
99373
99360
|
const tempVec3$1 = math.vec3();
|
|
99374
|
-
const tempVec3a$4 = math.vec3();
|
|
99375
|
-
const tempVec3b$1 = math.vec3();
|
|
99376
99361
|
|
|
99377
99362
|
/**
|
|
99378
99363
|
* Handles camera updates on each "tick" that were scheduled by the various controllers.
|
|
@@ -99392,7 +99377,7 @@ class CameraUpdater {
|
|
|
99392
99377
|
let countDown = SCALE_DOLLY_EACH_FRAME; // Decrements on each tick
|
|
99393
99378
|
let dollyDistFactor = 1.0; // Calculated when countDown is zero
|
|
99394
99379
|
let followPointerWorldPos = null; // Holds the pointer's World position when configs.followPointer is true
|
|
99395
|
-
|
|
99380
|
+
|
|
99396
99381
|
this._onTick = scene.on("tick", () => {
|
|
99397
99382
|
|
|
99398
99383
|
if (!(configs.active && configs.pointerEnabled)) {
|
|
@@ -99453,7 +99438,7 @@ class CameraUpdater {
|
|
|
99453
99438
|
|
|
99454
99439
|
if (pickController.pickResult && pickController.pickResult.worldPos) {
|
|
99455
99440
|
followPointerWorldPos = pickController.pickResult.worldPos;
|
|
99456
|
-
|
|
99441
|
+
|
|
99457
99442
|
} else {
|
|
99458
99443
|
dollyDistFactor = 1.0;
|
|
99459
99444
|
followPointerWorldPos = null;
|
|
@@ -99673,13 +99658,6 @@ class CameraUpdater {
|
|
|
99673
99658
|
});
|
|
99674
99659
|
}
|
|
99675
99660
|
|
|
99676
|
-
isLookingDownwards(look, eye) {
|
|
99677
|
-
const camera = this._scene.camera;
|
|
99678
|
-
const forwardAxis = math.normalizeVec3(math.subVec3(look, eye, tempVec3a$4));
|
|
99679
|
-
const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$1);
|
|
99680
|
-
let rightAxisLen = math.sqLenVec3(rightAxis);
|
|
99681
|
-
return (Math.abs(rightAxisLen) <= 0.1);
|
|
99682
|
-
}
|
|
99683
99661
|
|
|
99684
99662
|
destroy() {
|
|
99685
99663
|
this._scene.off(this._onTick);
|
|
@@ -103066,27 +103044,27 @@ class Viewer {
|
|
|
103066
103044
|
|
|
103067
103045
|
const needFinishSnapshot = (!this._snapshotBegun);
|
|
103068
103046
|
|
|
103069
|
-
if (!this._snapshotBegun) {
|
|
103070
|
-
this.beginSnapshot();
|
|
103071
|
-
}
|
|
103072
|
-
|
|
103073
|
-
if (!params.includeGizmos) {
|
|
103074
|
-
this.sendToPlugins("snapshotStarting"); // Tells plugins to hide things that shouldn't be in snapshot
|
|
103075
|
-
}
|
|
103076
|
-
|
|
103077
103047
|
const resize = (params.width !== undefined && params.height !== undefined);
|
|
103078
103048
|
const canvas = this.scene.canvas.canvas;
|
|
103079
103049
|
const saveWidth = canvas.clientWidth;
|
|
103080
103050
|
const saveHeight = canvas.clientHeight;
|
|
103081
|
-
|
|
103082
|
-
|
|
103051
|
+
canvas.style.width;
|
|
103052
|
+
canvas.style.height;
|
|
103083
103053
|
|
|
103084
103054
|
const width = params.width ? Math.floor(params.width) : canvas.width;
|
|
103085
103055
|
const height = params.height ? Math.floor(params.height) : canvas.height;
|
|
103086
103056
|
|
|
103087
103057
|
if (resize) {
|
|
103088
|
-
canvas.
|
|
103089
|
-
canvas.
|
|
103058
|
+
canvas.width = width;
|
|
103059
|
+
canvas.height = height;
|
|
103060
|
+
}
|
|
103061
|
+
|
|
103062
|
+
if (!this._snapshotBegun) {
|
|
103063
|
+
this.beginSnapshot();
|
|
103064
|
+
}
|
|
103065
|
+
|
|
103066
|
+
if (!params.includeGizmos) {
|
|
103067
|
+
this.sendToPlugins("snapshotStarting"); // Tells plugins to hide things that shouldn't be in snapshot
|
|
103090
103068
|
}
|
|
103091
103069
|
|
|
103092
103070
|
this.scene._renderer.renderSnapshot();
|
|
@@ -103094,8 +103072,6 @@ class Viewer {
|
|
|
103094
103072
|
const imageDataURI = this.scene._renderer.readSnapshot(params);
|
|
103095
103073
|
|
|
103096
103074
|
if (resize) {
|
|
103097
|
-
canvas.style.width = saveCssWidth;
|
|
103098
|
-
canvas.style.height = saveCssHeight;
|
|
103099
103075
|
canvas.width = saveWidth;
|
|
103100
103076
|
canvas.height = saveHeight;
|
|
103101
103077
|
|