@xeokit/xeokit-sdk 2.4.0-alpha-13 → 2.4.0-alpha-14
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 +327 -255
- package/dist/xeokit-sdk.es.js +327 -255
- package/dist/xeokit-sdk.es5.js +508 -481
- 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
|
@@ -7439,7 +7439,6 @@ class Component {
|
|
|
7439
7439
|
throw "Invalid param: owner must be a Component"
|
|
7440
7440
|
}
|
|
7441
7441
|
this._owner = owner;
|
|
7442
|
-
this._renderer = this.scene._renderer;
|
|
7443
7442
|
}
|
|
7444
7443
|
|
|
7445
7444
|
this._dontClear = !!cfg.dontClear; // Prevent Scene#clear from destroying this component
|
|
@@ -8935,7 +8934,7 @@ class VBOSceneModelNode {
|
|
|
8935
8934
|
|
|
8936
8935
|
}
|
|
8937
8936
|
|
|
8938
|
-
const tempVec3a$
|
|
8937
|
+
const tempVec3a$1i = math.vec3();
|
|
8939
8938
|
|
|
8940
8939
|
/**
|
|
8941
8940
|
* Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
|
|
@@ -9015,7 +9014,7 @@ function worldToRTCPos(worldPos, rtcCenter, rtcPos) {
|
|
|
9015
9014
|
*/
|
|
9016
9015
|
function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) {
|
|
9017
9016
|
|
|
9018
|
-
const center = math.getPositionsCenter(worldPositions, tempVec3a$
|
|
9017
|
+
const center = math.getPositionsCenter(worldPositions, tempVec3a$1i);
|
|
9019
9018
|
|
|
9020
9019
|
const rtcCenterX = Math.round(center[0] / cellSize) * cellSize;
|
|
9021
9020
|
const rtcCenterY = Math.round(center[1] / cellSize) * cellSize;
|
|
@@ -9051,7 +9050,7 @@ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize =
|
|
|
9051
9050
|
*/
|
|
9052
9051
|
function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) {
|
|
9053
9052
|
const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
|
|
9054
|
-
const dirNormalized = math.normalizeVec3(dir, tempVec3a$
|
|
9053
|
+
const dirNormalized = math.normalizeVec3(dir, tempVec3a$1i);
|
|
9055
9054
|
math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
|
|
9056
9055
|
return rtcPlanePos;
|
|
9057
9056
|
}
|
|
@@ -11516,12 +11515,12 @@ class Annotation extends Marker {
|
|
|
11516
11515
|
const canvasPos = this.canvasPos;
|
|
11517
11516
|
this._marker.style.left = (Math.floor(left + canvasPos[0]) - 12) + "px";
|
|
11518
11517
|
this._marker.style.top = (Math.floor(top + canvasPos[1]) - 12) + "px";
|
|
11519
|
-
this._marker.style["z-index"] =
|
|
11518
|
+
this._marker.style["z-index"] = cfg._markerZIndex;
|
|
11520
11519
|
const offsetX = 20;
|
|
11521
11520
|
const offsetY = -17;
|
|
11522
11521
|
this._label.style.left = 20 + Math.floor(left + canvasPos[0] + offsetX) + "px";
|
|
11523
11522
|
this._label.style.top = Math.floor(top + canvasPos[1] + offsetY) + "px";
|
|
11524
|
-
this._label.style["z-index"] =
|
|
11523
|
+
this._label.style["z-index"] = cfg._labelZIndex;
|
|
11525
11524
|
}
|
|
11526
11525
|
|
|
11527
11526
|
/**
|
|
@@ -11682,8 +11681,8 @@ class Annotation extends Marker {
|
|
|
11682
11681
|
}
|
|
11683
11682
|
}
|
|
11684
11683
|
|
|
11685
|
-
const tempVec3a$
|
|
11686
|
-
const tempVec3b$
|
|
11684
|
+
const tempVec3a$1h = math.vec3();
|
|
11685
|
+
const tempVec3b$d = math.vec3();
|
|
11687
11686
|
const tempVec3c$9 = math.vec3();
|
|
11688
11687
|
|
|
11689
11688
|
/**
|
|
@@ -12058,6 +12057,8 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12058
12057
|
* @param {String} [cfg.id="Annotations"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
|
|
12059
12058
|
* @param {String} [cfg.markerHTML] HTML text template for Annotation markers. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````markerElementId````.
|
|
12060
12059
|
* @param {String} [cfg.labelHTML] HTML text template for Annotation labels. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````labelElementId````.
|
|
12060
|
+
* @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12061
|
+
* @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12061
12062
|
* @param {HTMLElement} [cfg.container] Container DOM element for markers and labels. Defaults to ````document.body````.
|
|
12062
12063
|
* @param {{String:(String|Number)}} [cfg.values={}] Map of default values to insert into the HTML templates for the marker and label.
|
|
12063
12064
|
* @param {Number} [cfg.surfaceOffset=0.3] The amount by which each {@link Annotation} is offset from the surface of
|
|
@@ -12066,10 +12067,12 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12066
12067
|
constructor(viewer, cfg) {
|
|
12067
12068
|
|
|
12068
12069
|
super("Annotations", viewer);
|
|
12069
|
-
|
|
12070
|
+
const randomZIndex = 90005 + Math.floor(this._viewPos[2]) + 1;
|
|
12070
12071
|
this._labelHTML = cfg.labelHTML || "<div></div>";
|
|
12071
12072
|
this._markerHTML = cfg.markerHTML || "<div></div>";
|
|
12072
12073
|
this._container = cfg.container || document.body;
|
|
12074
|
+
this._markerZIndex = cfg.markerZIndex || randomZIndex;
|
|
12075
|
+
this._labelZIndex = cfg.labelZIndex || randomZIndex;
|
|
12073
12076
|
this._values = cfg.values || {};
|
|
12074
12077
|
|
|
12075
12078
|
/**
|
|
@@ -12145,6 +12148,8 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12145
12148
|
* @param {Number[]} [params.look] Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
|
|
12146
12149
|
* @param {Number[]} [params.up] Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
|
|
12147
12150
|
* @param {String} [params.projection] Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
|
|
12151
|
+
* @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12152
|
+
* @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
|
|
12148
12153
|
* @returns {Annotation} The new {@link Annotation}.
|
|
12149
12154
|
*/
|
|
12150
12155
|
createAnnotation(params) {
|
|
@@ -12160,8 +12165,8 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12160
12165
|
if (!pickResult.worldPos || !pickResult.worldNormal) {
|
|
12161
12166
|
this.error("Param 'pickResult' does not have both worldPos and worldNormal");
|
|
12162
12167
|
} else {
|
|
12163
|
-
const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$
|
|
12164
|
-
const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$
|
|
12168
|
+
const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1h);
|
|
12169
|
+
const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$d);
|
|
12165
12170
|
const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$9);
|
|
12166
12171
|
worldPos = offsetWorldPos;
|
|
12167
12172
|
entity = pickResult.entity;
|
|
@@ -12196,7 +12201,9 @@ class AnnotationsPlugin extends Plugin {
|
|
|
12196
12201
|
markerElement: markerElement,
|
|
12197
12202
|
labelElement: labelElement,
|
|
12198
12203
|
markerHTML: params.markerHTML || this._markerHTML,
|
|
12204
|
+
markerZIndex : params.markerZIndex || this._markerZIndex,
|
|
12199
12205
|
labelHTML: params.labelHTML || this._labelHTML,
|
|
12206
|
+
labelZIndex : params.labelZIndex || this._labelZIndex,
|
|
12200
12207
|
occludable: params.occludable,
|
|
12201
12208
|
values: utils.apply(params.values, utils.apply(this._values, {})),
|
|
12202
12209
|
markerShown: params.markerShown,
|
|
@@ -14357,7 +14364,7 @@ const MARKER_COLOR = math.vec3([1.0, 0.0, 0.0]);
|
|
|
14357
14364
|
const POINT_SIZE = 20;
|
|
14358
14365
|
const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces
|
|
14359
14366
|
|
|
14360
|
-
const tempVec3a$
|
|
14367
|
+
const tempVec3a$1g = math.vec3();
|
|
14361
14368
|
|
|
14362
14369
|
/**
|
|
14363
14370
|
* Manages occlusion testing. Private member of a Renderer.
|
|
@@ -14694,7 +14701,7 @@ class OcclusionTester {
|
|
|
14694
14701
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
14695
14702
|
if (active) {
|
|
14696
14703
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
14697
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
14704
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1g));
|
|
14698
14705
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
14699
14706
|
}
|
|
14700
14707
|
}
|
|
@@ -18699,7 +18706,7 @@ class CustomProjection extends Component {
|
|
|
18699
18706
|
}
|
|
18700
18707
|
|
|
18701
18708
|
const tempVec3$6 = math.vec3();
|
|
18702
|
-
const tempVec3b$
|
|
18709
|
+
const tempVec3b$c = math.vec3();
|
|
18703
18710
|
const tempVec3c$8 = math.vec3();
|
|
18704
18711
|
const tempVec3d$4 = math.vec3();
|
|
18705
18712
|
const tempVec3e$3 = math.vec3();
|
|
@@ -19009,7 +19016,7 @@ class Camera extends Component {
|
|
|
19009
19016
|
orbitYaw(angleInc) {
|
|
19010
19017
|
let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
19011
19018
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
19012
|
-
lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$
|
|
19019
|
+
lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$c);
|
|
19013
19020
|
this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$8); // Set eye position as 'look' plus 'eye' vector
|
|
19014
19021
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4); // Rotate 'up' vector
|
|
19015
19022
|
}
|
|
@@ -19027,7 +19034,7 @@ class Camera extends Component {
|
|
|
19027
19034
|
}
|
|
19028
19035
|
}
|
|
19029
19036
|
let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
19030
|
-
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$
|
|
19037
|
+
const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
|
|
19031
19038
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
19032
19039
|
eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$4);
|
|
19033
19040
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3e$3);
|
|
@@ -19042,7 +19049,7 @@ class Camera extends Component {
|
|
|
19042
19049
|
yaw(angleInc) {
|
|
19043
19050
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
19044
19051
|
math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
|
|
19045
|
-
look2 = math.transformPoint3(tempMat, look2, tempVec3b$
|
|
19052
|
+
look2 = math.transformPoint3(tempMat, look2, tempVec3b$c);
|
|
19046
19053
|
this.look = math.addVec3(look2, this._eye, tempVec3c$8);
|
|
19047
19054
|
if (this._gimbalLock) {
|
|
19048
19055
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4);
|
|
@@ -19062,7 +19069,7 @@ class Camera extends Component {
|
|
|
19062
19069
|
}
|
|
19063
19070
|
}
|
|
19064
19071
|
let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
|
|
19065
|
-
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$
|
|
19072
|
+
const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
|
|
19066
19073
|
math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
|
|
19067
19074
|
this.up = math.transformPoint3(tempMat, this._up, tempVec3f$3);
|
|
19068
19075
|
look2 = math.transformPoint3(tempMat, look2, tempVec3d$4);
|
|
@@ -19079,7 +19086,7 @@ class Camera extends Component {
|
|
|
19079
19086
|
const vec = [0, 0, 0];
|
|
19080
19087
|
let v;
|
|
19081
19088
|
if (pan[0] !== 0) {
|
|
19082
|
-
const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$
|
|
19089
|
+
const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$c));
|
|
19083
19090
|
v = math.mulVec3Scalar(left, pan[0]);
|
|
19084
19091
|
vec[0] += v[0];
|
|
19085
19092
|
vec[1] += v[1];
|
|
@@ -19108,7 +19115,7 @@ class Camera extends Component {
|
|
|
19108
19115
|
*/
|
|
19109
19116
|
zoom(delta) {
|
|
19110
19117
|
const vec = math.subVec3(this._eye, this._look, tempVec3$6);
|
|
19111
|
-
const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$
|
|
19118
|
+
const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$c));
|
|
19112
19119
|
const newLenLook = Math.abs(lenLook + delta);
|
|
19113
19120
|
if (newLenLook < 0.5) {
|
|
19114
19121
|
return;
|
|
@@ -19570,7 +19577,7 @@ class Camera extends Component {
|
|
|
19570
19577
|
}
|
|
19571
19578
|
|
|
19572
19579
|
const tempVec4$9 = math.vec4();
|
|
19573
|
-
const tempVec3a$
|
|
19580
|
+
const tempVec3a$1f = math.vec3();
|
|
19574
19581
|
|
|
19575
19582
|
/**
|
|
19576
19583
|
* @private
|
|
@@ -19657,7 +19664,7 @@ class TrianglesDataTextureColorRenderer {
|
|
|
19657
19664
|
if (active) {
|
|
19658
19665
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
19659
19666
|
if (origin) {
|
|
19660
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
19667
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f);
|
|
19661
19668
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
19662
19669
|
} else {
|
|
19663
19670
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -20184,7 +20191,7 @@ class TrianglesDataTextureColorRenderer {
|
|
|
20184
20191
|
|
|
20185
20192
|
const defaultColor$6 = new Float32Array([1, 1, 1]);
|
|
20186
20193
|
math.vec4();
|
|
20187
|
-
const tempVec3a$
|
|
20194
|
+
const tempVec3a$1e = math.vec3();
|
|
20188
20195
|
|
|
20189
20196
|
/**
|
|
20190
20197
|
* @private
|
|
@@ -20292,7 +20299,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
20292
20299
|
if (active) {
|
|
20293
20300
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
20294
20301
|
if (origin) {
|
|
20295
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
20302
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
|
|
20296
20303
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
20297
20304
|
} else {
|
|
20298
20305
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -20648,7 +20655,7 @@ class TrianglesDataTextureSilhouetteRenderer {
|
|
|
20648
20655
|
}
|
|
20649
20656
|
}
|
|
20650
20657
|
|
|
20651
|
-
const tempVec3a$
|
|
20658
|
+
const tempVec3a$1d = math.vec3();
|
|
20652
20659
|
const defaultColor$5 = new Float32Array([0,0,0,1]);
|
|
20653
20660
|
|
|
20654
20661
|
/**
|
|
@@ -20748,7 +20755,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
20748
20755
|
if (active) {
|
|
20749
20756
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
20750
20757
|
if (origin) {
|
|
20751
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
20758
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
|
|
20752
20759
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
20753
20760
|
} else {
|
|
20754
20761
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -21067,7 +21074,7 @@ class TrianglesDataTextureEdgesRenderer {
|
|
|
21067
21074
|
}
|
|
21068
21075
|
}
|
|
21069
21076
|
|
|
21070
|
-
const tempVec3a$
|
|
21077
|
+
const tempVec3a$1c = math.vec3();
|
|
21071
21078
|
|
|
21072
21079
|
/**
|
|
21073
21080
|
* @private
|
|
@@ -21141,7 +21148,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
21141
21148
|
if (active) {
|
|
21142
21149
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
21143
21150
|
if (origin) {
|
|
21144
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
21151
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
|
|
21145
21152
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
21146
21153
|
} else {
|
|
21147
21154
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -21469,7 +21476,7 @@ class TrianglesDataTextureEdgesColorRenderer {
|
|
|
21469
21476
|
}
|
|
21470
21477
|
}
|
|
21471
21478
|
|
|
21472
|
-
const tempVec3a$
|
|
21479
|
+
const tempVec3a$1b = math.vec3();
|
|
21473
21480
|
|
|
21474
21481
|
/**
|
|
21475
21482
|
* @private
|
|
@@ -21556,7 +21563,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
21556
21563
|
if (active) {
|
|
21557
21564
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
21558
21565
|
if (origin) {
|
|
21559
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
21566
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
|
|
21560
21567
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
21561
21568
|
} else {
|
|
21562
21569
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -21912,7 +21919,7 @@ class TrianglesDataTexturePickMeshRenderer {
|
|
|
21912
21919
|
}
|
|
21913
21920
|
}
|
|
21914
21921
|
|
|
21915
|
-
const tempVec3a$
|
|
21922
|
+
const tempVec3a$1a = math.vec3();
|
|
21916
21923
|
|
|
21917
21924
|
/**
|
|
21918
21925
|
* @private
|
|
@@ -22004,7 +22011,7 @@ class TrianglesDataTexturePickDepthRenderer {
|
|
|
22004
22011
|
if (active) {
|
|
22005
22012
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
22006
22013
|
if (origin) {
|
|
22007
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
22014
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
|
|
22008
22015
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
22009
22016
|
} else {
|
|
22010
22017
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -22363,7 +22370,7 @@ class TrianglesDataTexturePickDepthRenderer {
|
|
|
22363
22370
|
}
|
|
22364
22371
|
}
|
|
22365
22372
|
|
|
22366
|
-
const tempVec3a$
|
|
22373
|
+
const tempVec3a$19 = math.vec3();
|
|
22367
22374
|
|
|
22368
22375
|
/**
|
|
22369
22376
|
* @private
|
|
@@ -22455,7 +22462,7 @@ class TrianglesDataTexturePickNormalsRenderer {
|
|
|
22455
22462
|
if (active) {
|
|
22456
22463
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
22457
22464
|
if (origin) {
|
|
22458
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
22465
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
|
|
22459
22466
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
22460
22467
|
} else {
|
|
22461
22468
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -23019,7 +23026,7 @@ class TrianglesDataTextureOcclusionRenderer {
|
|
|
23019
23026
|
}
|
|
23020
23027
|
|
|
23021
23028
|
math.vec4();
|
|
23022
|
-
const tempVec3a$
|
|
23029
|
+
const tempVec3a$18 = math.vec3();
|
|
23023
23030
|
|
|
23024
23031
|
/**
|
|
23025
23032
|
* @private
|
|
@@ -23104,7 +23111,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
23104
23111
|
if (active) {
|
|
23105
23112
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
23106
23113
|
if (origin) {
|
|
23107
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
23114
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
|
|
23108
23115
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
23109
23116
|
} else {
|
|
23110
23117
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -23475,7 +23482,7 @@ class TrianglesDataTextureDepthRenderer {
|
|
|
23475
23482
|
}
|
|
23476
23483
|
}
|
|
23477
23484
|
|
|
23478
|
-
const tempVec3a$
|
|
23485
|
+
const tempVec3a$17 = math.vec3();
|
|
23479
23486
|
|
|
23480
23487
|
/**
|
|
23481
23488
|
* @private
|
|
@@ -23538,7 +23545,7 @@ class TrianglesDataTextureNormalsRenderer {
|
|
|
23538
23545
|
if (active) {
|
|
23539
23546
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
23540
23547
|
if (origin) {
|
|
23541
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
23548
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
|
|
23542
23549
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
23543
23550
|
} else {
|
|
23544
23551
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -23968,7 +23975,7 @@ class TrianglesDataTextureShadowRenderer {
|
|
|
23968
23975
|
}
|
|
23969
23976
|
|
|
23970
23977
|
const tempVec4$8 = math.vec4();
|
|
23971
|
-
const tempVec3a$
|
|
23978
|
+
const tempVec3a$16 = math.vec3();
|
|
23972
23979
|
|
|
23973
23980
|
const TEXTURE_DECODE_FUNCS$2 = {
|
|
23974
23981
|
"linear": "linearToLinear",
|
|
@@ -24039,7 +24046,7 @@ class TrianglesDataTextureColorQualityRenderer {
|
|
|
24039
24046
|
if (active) {
|
|
24040
24047
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
24041
24048
|
if (origin) {
|
|
24042
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
24049
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
|
|
24043
24050
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
24044
24051
|
} else {
|
|
24045
24052
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -24778,7 +24785,7 @@ class TrianglesDataTextureColorQualityRenderer {
|
|
|
24778
24785
|
}
|
|
24779
24786
|
}
|
|
24780
24787
|
|
|
24781
|
-
const tempVec3a$
|
|
24788
|
+
const tempVec3a$15 = math.vec3();
|
|
24782
24789
|
|
|
24783
24790
|
/**
|
|
24784
24791
|
* @private
|
|
@@ -24892,7 +24899,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
|
|
|
24892
24899
|
if (active) {
|
|
24893
24900
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
24894
24901
|
if (origin) {
|
|
24895
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
24902
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
|
|
24896
24903
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
24897
24904
|
} else {
|
|
24898
24905
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -27611,6 +27618,12 @@ const MAX_DATA_TEXTURE_HEIGHT = (1 << 12);
|
|
|
27611
27618
|
*/
|
|
27612
27619
|
const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
|
|
27613
27620
|
|
|
27621
|
+
/**
|
|
27622
|
+
* Number of maximum allowed per-object flags update per render frame
|
|
27623
|
+
* before switching to batch update mode.
|
|
27624
|
+
*/
|
|
27625
|
+
const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
|
|
27626
|
+
|
|
27614
27627
|
const identityMatrix = math.identityMat4();
|
|
27615
27628
|
math.mat4();
|
|
27616
27629
|
math.mat4();
|
|
@@ -27623,8 +27636,8 @@ const tempUint8Array4 = new Uint8Array (4);
|
|
|
27623
27636
|
|
|
27624
27637
|
const tempFloat32Array3 = new Float32Array (3);
|
|
27625
27638
|
|
|
27626
|
-
const tempVec3a$
|
|
27627
|
-
const tempVec3b$
|
|
27639
|
+
const tempVec3a$14 = math.vec3();
|
|
27640
|
+
const tempVec3b$b = math.vec3();
|
|
27628
27641
|
const tempVec3c$7 = math.vec3();
|
|
27629
27642
|
const tempVec3d$3 = math.vec3();
|
|
27630
27643
|
const tempVec3e$2 = math.vec3();
|
|
@@ -27638,7 +27651,7 @@ let _numberOfLayers = 0;
|
|
|
27638
27651
|
*/
|
|
27639
27652
|
class TrianglesDataTextureLayer {
|
|
27640
27653
|
/**
|
|
27641
|
-
* @param model
|
|
27654
|
+
* @param {DataTextureSceneModel} model
|
|
27642
27655
|
* @param cfg
|
|
27643
27656
|
* @param cfg.layerIndex
|
|
27644
27657
|
* @param cfg.positionsDecodeMatrix
|
|
@@ -27728,6 +27741,12 @@ class TrianglesDataTextureLayer {
|
|
|
27728
27741
|
* @type {*|Float64Array}
|
|
27729
27742
|
*/
|
|
27730
27743
|
this.aabb = math.collapseAABB3();
|
|
27744
|
+
|
|
27745
|
+
/**
|
|
27746
|
+
* The number of updates in the current frame;
|
|
27747
|
+
* @type {number}
|
|
27748
|
+
*/
|
|
27749
|
+
this.numUpdatesInFrame = 0;
|
|
27731
27750
|
}
|
|
27732
27751
|
|
|
27733
27752
|
/**
|
|
@@ -28439,6 +28458,18 @@ class TrianglesDataTextureLayer {
|
|
|
28439
28458
|
|
|
28440
28459
|
this._finalized = true;
|
|
28441
28460
|
}
|
|
28461
|
+
|
|
28462
|
+
attachToRenderingEvent() {
|
|
28463
|
+
const self = this;
|
|
28464
|
+
|
|
28465
|
+
this.model.scene.on ("rendering", function () {
|
|
28466
|
+
if (self._deferredSetFlagsDirty)
|
|
28467
|
+
{
|
|
28468
|
+
self.commitDeferredFlags();
|
|
28469
|
+
}
|
|
28470
|
+
self.numUpdatesInFrame = 0;
|
|
28471
|
+
});
|
|
28472
|
+
}
|
|
28442
28473
|
|
|
28443
28474
|
isEmpty() {
|
|
28444
28475
|
return this._numPortions == 0;
|
|
@@ -28589,6 +28620,8 @@ class TrianglesDataTextureLayer {
|
|
|
28589
28620
|
* In massive "set-flags" scenarios like VFC or LOD mechanisms, the combina-
|
|
28590
28621
|
* tion of `beginDeferredFlags` + `commitDeferredFlags`brings a speed-up of
|
|
28591
28622
|
* up to 80x when e.g. objects are massively (un)culled 🚀.
|
|
28623
|
+
*
|
|
28624
|
+
* @private
|
|
28592
28625
|
*/
|
|
28593
28626
|
beginDeferredFlags ()
|
|
28594
28627
|
{
|
|
@@ -28600,6 +28633,8 @@ class TrianglesDataTextureLayer {
|
|
|
28600
28633
|
*
|
|
28601
28634
|
* Invoking this method will update the colors+flags texture data with new
|
|
28602
28635
|
* flags/flags2 set since the previous invocation of `beginDeferredFlags`.
|
|
28636
|
+
*
|
|
28637
|
+
* @private
|
|
28603
28638
|
*/
|
|
28604
28639
|
commitDeferredFlags ()
|
|
28605
28640
|
{
|
|
@@ -28715,6 +28750,11 @@ class TrianglesDataTextureLayer {
|
|
|
28715
28750
|
this._deferredSetFlagsDirty = true;
|
|
28716
28751
|
return;
|
|
28717
28752
|
}
|
|
28753
|
+
|
|
28754
|
+
if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
|
|
28755
|
+
{
|
|
28756
|
+
this.beginDeferredFlags();
|
|
28757
|
+
}
|
|
28718
28758
|
|
|
28719
28759
|
gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
|
|
28720
28760
|
|
|
@@ -28841,6 +28881,11 @@ class TrianglesDataTextureLayer {
|
|
|
28841
28881
|
return;
|
|
28842
28882
|
}
|
|
28843
28883
|
|
|
28884
|
+
if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
|
|
28885
|
+
{
|
|
28886
|
+
this.beginDeferredFlags();
|
|
28887
|
+
}
|
|
28888
|
+
|
|
28844
28889
|
gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
|
|
28845
28890
|
|
|
28846
28891
|
gl.texSubImage2D(
|
|
@@ -28895,6 +28940,11 @@ class TrianglesDataTextureLayer {
|
|
|
28895
28940
|
this._deferredSetFlagsDirty = true;
|
|
28896
28941
|
return;
|
|
28897
28942
|
}
|
|
28943
|
+
|
|
28944
|
+
if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
|
|
28945
|
+
{
|
|
28946
|
+
this.beginDeferredFlags();
|
|
28947
|
+
}
|
|
28898
28948
|
|
|
28899
28949
|
gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
|
|
28900
28950
|
|
|
@@ -28952,6 +29002,11 @@ class TrianglesDataTextureLayer {
|
|
|
28952
29002
|
this._deferredSetFlagsDirty = true;
|
|
28953
29003
|
return;
|
|
28954
29004
|
}
|
|
29005
|
+
|
|
29006
|
+
if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
|
|
29007
|
+
{
|
|
29008
|
+
this.beginDeferredFlags();
|
|
29009
|
+
}
|
|
28955
29010
|
|
|
28956
29011
|
gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdOffsets._texture);
|
|
28957
29012
|
|
|
@@ -29207,8 +29262,8 @@ class TrianglesDataTextureLayer {
|
|
|
29207
29262
|
const origin = state.origin;
|
|
29208
29263
|
const offset = portion.offset;
|
|
29209
29264
|
|
|
29210
|
-
const rtcRayOrigin = tempVec3a$
|
|
29211
|
-
const rtcRayDir = tempVec3b$
|
|
29265
|
+
const rtcRayOrigin = tempVec3a$14;
|
|
29266
|
+
const rtcRayDir = tempVec3b$b;
|
|
29212
29267
|
|
|
29213
29268
|
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$7) : worldRayOrigin); // World -> RTC
|
|
29214
29269
|
rtcRayDir.set(worldRayDir);
|
|
@@ -29906,10 +29961,8 @@ class LodCullingManager {
|
|
|
29906
29961
|
applyLodCulling (currentFPS)
|
|
29907
29962
|
{
|
|
29908
29963
|
let lodState = this.lodState;
|
|
29909
|
-
|
|
29964
|
+
this.model;
|
|
29910
29965
|
|
|
29911
|
-
model.beginDeferredFlagsInAllLayers ();
|
|
29912
|
-
|
|
29913
29966
|
let retVal = false;
|
|
29914
29967
|
|
|
29915
29968
|
if (currentFPS < lodState.targetFps)
|
|
@@ -29929,8 +29982,6 @@ class LodCullingManager {
|
|
|
29929
29982
|
}
|
|
29930
29983
|
}
|
|
29931
29984
|
|
|
29932
|
-
model.commitDeferredFlagsInAllLayers ();
|
|
29933
|
-
|
|
29934
29985
|
if (retVal) {
|
|
29935
29986
|
console.log ("LOD level = " + lodState.lodLevelIndex);
|
|
29936
29987
|
}
|
|
@@ -29940,10 +29991,8 @@ class LodCullingManager {
|
|
|
29940
29991
|
|
|
29941
29992
|
resetLodCulling ()
|
|
29942
29993
|
{
|
|
29943
|
-
|
|
29994
|
+
this.model;
|
|
29944
29995
|
|
|
29945
|
-
model.beginDeferredFlagsInAllLayers ();
|
|
29946
|
-
|
|
29947
29996
|
let retVal = false;
|
|
29948
29997
|
|
|
29949
29998
|
let decreasedLevel = false;
|
|
@@ -29952,8 +30001,6 @@ class LodCullingManager {
|
|
|
29952
30001
|
retVal |= (decreasedLevel = this._decreaseLODLevelIndex());
|
|
29953
30002
|
} while (decreasedLevel);
|
|
29954
30003
|
|
|
29955
|
-
model.commitDeferredFlagsInAllLayers ();
|
|
29956
|
-
|
|
29957
30004
|
if (retVal) {
|
|
29958
30005
|
console.log ("LOD resetted");
|
|
29959
30006
|
}
|
|
@@ -31671,16 +31718,12 @@ const VISIBILITY_CHECK_ENVOLVES_V = (1 << 14);
|
|
|
31671
31718
|
const internalNodesList = this._internalNodesList;
|
|
31672
31719
|
const lastVisibleFrameOfNodes = this._lastVisibleFrameOfNodes;
|
|
31673
31720
|
|
|
31674
|
-
model.beginDeferredFlagsInAllLayers ();
|
|
31675
|
-
|
|
31676
31721
|
for (let i = 0, len = internalNodesList.length; i < len; i++)
|
|
31677
31722
|
{
|
|
31678
31723
|
if (internalNodesList[i]) {
|
|
31679
31724
|
internalNodesList[i].culledVFC = lastVisibleFrameOfNodes[i] !== cullFrame;
|
|
31680
31725
|
}
|
|
31681
31726
|
}
|
|
31682
|
-
|
|
31683
|
-
model.commitDeferredFlagsInAllLayers ();
|
|
31684
31727
|
}
|
|
31685
31728
|
|
|
31686
31729
|
/**
|
|
@@ -32069,7 +32112,7 @@ class ViewFrustumCullingManager {
|
|
|
32069
32112
|
|
|
32070
32113
|
WEBGL_INFO.SUPPORTED_EXTENSIONS["ANGLE_instanced_arrays"];
|
|
32071
32114
|
|
|
32072
|
-
const tempVec3a$
|
|
32115
|
+
const tempVec3a$13 = math.vec3();
|
|
32073
32116
|
const tempMat4$3 = math.mat4();
|
|
32074
32117
|
|
|
32075
32118
|
const defaultScale$1 = math.vec3([1, 1, 1]);
|
|
@@ -33041,7 +33084,7 @@ class DataTextureSceneModel extends Component {
|
|
|
33041
33084
|
}
|
|
33042
33085
|
|
|
33043
33086
|
const cfgOrigin = cfg.origin || cfg.rtcCenter;
|
|
33044
|
-
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$
|
|
33087
|
+
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$13) : this._origin;
|
|
33045
33088
|
|
|
33046
33089
|
switch (primitive) {
|
|
33047
33090
|
case "triangles":
|
|
@@ -33305,7 +33348,7 @@ class DataTextureSceneModel extends Component {
|
|
|
33305
33348
|
if (!origin) {
|
|
33306
33349
|
origin = cfgOrigin;
|
|
33307
33350
|
} else {
|
|
33308
|
-
origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$
|
|
33351
|
+
origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$13);
|
|
33309
33352
|
}
|
|
33310
33353
|
} else {
|
|
33311
33354
|
origin = this._origin;
|
|
@@ -33497,8 +33540,6 @@ class DataTextureSceneModel extends Component {
|
|
|
33497
33540
|
return;
|
|
33498
33541
|
}
|
|
33499
33542
|
|
|
33500
|
-
this.beginDeferredFlagsInAllLayers ();
|
|
33501
|
-
|
|
33502
33543
|
if (this._vfcManager) {
|
|
33503
33544
|
this._vfcManager.finalize (
|
|
33504
33545
|
function () {
|
|
@@ -33527,9 +33568,7 @@ class DataTextureSceneModel extends Component {
|
|
|
33527
33568
|
node._finalize2();
|
|
33528
33569
|
}
|
|
33529
33570
|
|
|
33530
|
-
|
|
33531
33571
|
// Sort layers to reduce WebGL shader switching when rendering them
|
|
33532
|
-
|
|
33533
33572
|
this._layerList.sort((a, b) => {
|
|
33534
33573
|
if (a.sortId < b.sortId) {
|
|
33535
33574
|
return -1;
|
|
@@ -33545,8 +33584,6 @@ class DataTextureSceneModel extends Component {
|
|
|
33545
33584
|
layer.layerIndex = i;
|
|
33546
33585
|
}
|
|
33547
33586
|
|
|
33548
|
-
this.commitDeferredFlagsInAllLayers ();
|
|
33549
|
-
|
|
33550
33587
|
this.glRedraw();
|
|
33551
33588
|
|
|
33552
33589
|
this.scene._aabbDirty = true;
|
|
@@ -33561,6 +33598,11 @@ class DataTextureSceneModel extends Component {
|
|
|
33561
33598
|
this._targetLodFps
|
|
33562
33599
|
);
|
|
33563
33600
|
}
|
|
33601
|
+
|
|
33602
|
+
for (let i = 0, len = this._layerList.length; i < len; i++) {
|
|
33603
|
+
const layer = this._layerList[i];
|
|
33604
|
+
layer.attachToRenderingEvent();
|
|
33605
|
+
}
|
|
33564
33606
|
}
|
|
33565
33607
|
|
|
33566
33608
|
_rebuildAABB() {
|
|
@@ -33603,33 +33645,6 @@ class DataTextureSceneModel extends Component {
|
|
|
33603
33645
|
}
|
|
33604
33646
|
}
|
|
33605
33647
|
|
|
33606
|
-
/**
|
|
33607
|
-
* This will start a "set-flags transaction" in all Layers of this Model.
|
|
33608
|
-
*/
|
|
33609
|
-
beginDeferredFlagsInAllLayers ()
|
|
33610
|
-
{
|
|
33611
|
-
for (let i = 0, len = this._layerList.length; i < len; i++)
|
|
33612
|
-
{
|
|
33613
|
-
const layer = this._layerList[i];
|
|
33614
|
-
|
|
33615
|
-
layer.beginDeferredFlags ();
|
|
33616
|
-
}
|
|
33617
|
-
}
|
|
33618
|
-
|
|
33619
|
-
/**
|
|
33620
|
-
* This will commit any previously started "set-flags transaction" in all
|
|
33621
|
-
* Layers of this Model.
|
|
33622
|
-
*/
|
|
33623
|
-
commitDeferredFlagsInAllLayers ()
|
|
33624
|
-
{
|
|
33625
|
-
for (let i = 0, len = this._layerList.length; i < len; i++)
|
|
33626
|
-
{
|
|
33627
|
-
const layer = this._layerList[i];
|
|
33628
|
-
|
|
33629
|
-
layer.commitDeferredFlags ();
|
|
33630
|
-
}
|
|
33631
|
-
}
|
|
33632
|
-
|
|
33633
33648
|
/** @private */
|
|
33634
33649
|
_getActiveSectionPlanesForLayer(layer) {
|
|
33635
33650
|
|
|
@@ -45962,7 +45977,7 @@ function buildFragmentDraw(mesh) {
|
|
|
45962
45977
|
* @author xeolabs / https://github.com/xeolabs
|
|
45963
45978
|
*/
|
|
45964
45979
|
|
|
45965
|
-
const tempVec3a$
|
|
45980
|
+
const tempVec3a$12 = math.vec3();
|
|
45966
45981
|
|
|
45967
45982
|
const ids$2 = new Map$1({});
|
|
45968
45983
|
|
|
@@ -46061,7 +46076,7 @@ DrawRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
46061
46076
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
46062
46077
|
if (active) {
|
|
46063
46078
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
46064
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
46079
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$12) : sectionPlane.pos);
|
|
46065
46080
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
46066
46081
|
}
|
|
46067
46082
|
}
|
|
@@ -47199,7 +47214,7 @@ function buildFragment$5(mesh) {
|
|
|
47199
47214
|
|
|
47200
47215
|
const ids$1 = new Map$1({});
|
|
47201
47216
|
|
|
47202
|
-
const tempVec3a$
|
|
47217
|
+
const tempVec3a$11 = math.vec3();
|
|
47203
47218
|
|
|
47204
47219
|
/**
|
|
47205
47220
|
* @private
|
|
@@ -47283,7 +47298,7 @@ EmphasisFillRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
|
|
|
47283
47298
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
47284
47299
|
if (active) {
|
|
47285
47300
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
47286
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
47301
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
|
|
47287
47302
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
47288
47303
|
}
|
|
47289
47304
|
}
|
|
@@ -47619,7 +47634,7 @@ function buildFragment$4(mesh) {
|
|
|
47619
47634
|
|
|
47620
47635
|
const ids = new Map$1({});
|
|
47621
47636
|
|
|
47622
|
-
const tempVec3a
|
|
47637
|
+
const tempVec3a$10 = math.vec3();
|
|
47623
47638
|
|
|
47624
47639
|
/**
|
|
47625
47640
|
* @private
|
|
@@ -47702,7 +47717,7 @@ EmphasisEdgesRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
|
|
|
47702
47717
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
47703
47718
|
if (active) {
|
|
47704
47719
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
47705
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a
|
|
47720
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
|
|
47706
47721
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
47707
47722
|
}
|
|
47708
47723
|
}
|
|
@@ -47997,7 +48012,7 @@ function buildFragment$3(mesh) {
|
|
|
47997
48012
|
* @author xeolabs / https://github.com/xeolabs
|
|
47998
48013
|
*/
|
|
47999
48014
|
|
|
48000
|
-
const tempVec3a
|
|
48015
|
+
const tempVec3a$$ = math.vec3();
|
|
48001
48016
|
|
|
48002
48017
|
// No ID, because there is exactly one PickMeshRenderer per scene
|
|
48003
48018
|
|
|
@@ -48081,7 +48096,7 @@ PickMeshRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
48081
48096
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
48082
48097
|
if (active) {
|
|
48083
48098
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
48084
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a
|
|
48099
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
|
|
48085
48100
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
48086
48101
|
}
|
|
48087
48102
|
}
|
|
@@ -48314,7 +48329,7 @@ function buildFragment$2(mesh) {
|
|
|
48314
48329
|
* @author xeolabs / https://github.com/xeolabs
|
|
48315
48330
|
*/
|
|
48316
48331
|
|
|
48317
|
-
const tempVec3a$
|
|
48332
|
+
const tempVec3a$_ = math.vec3();
|
|
48318
48333
|
|
|
48319
48334
|
/**
|
|
48320
48335
|
* @private
|
|
@@ -48406,7 +48421,7 @@ PickTriangleRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
48406
48421
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
48407
48422
|
if (active) {
|
|
48408
48423
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
48409
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
48424
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
|
|
48410
48425
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
48411
48426
|
}
|
|
48412
48427
|
}
|
|
@@ -48643,7 +48658,7 @@ function buildFragment$1(mesh) {
|
|
|
48643
48658
|
* @author xeolabs / https://github.com/xeolabs
|
|
48644
48659
|
*/
|
|
48645
48660
|
|
|
48646
|
-
const tempVec3a$
|
|
48661
|
+
const tempVec3a$Z = math.vec3();
|
|
48647
48662
|
|
|
48648
48663
|
// No ID, because there is exactly one PickMeshRenderer per scene
|
|
48649
48664
|
|
|
@@ -48751,7 +48766,7 @@ OcclusionRenderer.prototype.drawMesh = function (frameCtx, mesh) {
|
|
|
48751
48766
|
gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
|
|
48752
48767
|
if (active) {
|
|
48753
48768
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
48754
|
-
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
48769
|
+
gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
|
|
48755
48770
|
gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
|
|
48756
48771
|
}
|
|
48757
48772
|
}
|
|
@@ -61353,8 +61368,8 @@ class LineSet extends Component {
|
|
|
61353
61368
|
}
|
|
61354
61369
|
|
|
61355
61370
|
const tempVec3$4 = math.vec3();
|
|
61356
|
-
const tempVec3a$
|
|
61357
|
-
const tempVec3b$
|
|
61371
|
+
const tempVec3a$Y = math.vec3();
|
|
61372
|
+
const tempVec3b$a = math.vec3();
|
|
61358
61373
|
const tempVec3c$6 = math.vec3();
|
|
61359
61374
|
|
|
61360
61375
|
/**
|
|
@@ -62034,8 +62049,8 @@ class BCFViewpointsPlugin extends Plugin {
|
|
|
62034
62049
|
bcfViewpoint.bitmaps.forEach(function (e) {
|
|
62035
62050
|
const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png"
|
|
62036
62051
|
const bitmap_data = e.bitmap_data; // base64
|
|
62037
|
-
let location = xyzObjectToArray(e.location, tempVec3a$
|
|
62038
|
-
let normal = xyzObjectToArray(e.normal, tempVec3b$
|
|
62052
|
+
let location = xyzObjectToArray(e.location, tempVec3a$Y);
|
|
62053
|
+
let normal = xyzObjectToArray(e.normal, tempVec3b$a);
|
|
62039
62054
|
let up = xyzObjectToArray(e.up, tempVec3c$6);
|
|
62040
62055
|
let height = e.height || 1;
|
|
62041
62056
|
if (!bitmap_type) {
|
|
@@ -63924,7 +63939,7 @@ class SplineCurve extends Curve {
|
|
|
63924
63939
|
}
|
|
63925
63940
|
}
|
|
63926
63941
|
|
|
63927
|
-
const tempVec3a$
|
|
63942
|
+
const tempVec3a$X = math.vec3();
|
|
63928
63943
|
|
|
63929
63944
|
/**
|
|
63930
63945
|
* @desc Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
|
|
@@ -64056,9 +64071,9 @@ class CameraPath extends Component {
|
|
|
64056
64071
|
t = t / (this._frames[this._frames.length - 1].t - this._frames[0].t);
|
|
64057
64072
|
t = t < 0.0 ? 0.0 : (t > 1.0 ? 1.0 : t);
|
|
64058
64073
|
|
|
64059
|
-
camera.eye = this._eyeCurve.getPoint(t, tempVec3a$
|
|
64060
|
-
camera.look = this._lookCurve.getPoint(t, tempVec3a$
|
|
64061
|
-
camera.up = this._upCurve.getPoint(t, tempVec3a$
|
|
64074
|
+
camera.eye = this._eyeCurve.getPoint(t, tempVec3a$X);
|
|
64075
|
+
camera.look = this._lookCurve.getPoint(t, tempVec3a$X);
|
|
64076
|
+
camera.up = this._upCurve.getPoint(t, tempVec3a$X);
|
|
64062
64077
|
}
|
|
64063
64078
|
|
|
64064
64079
|
/**
|
|
@@ -65097,7 +65112,7 @@ CameraPathAnimation.PLAYING = 2;
|
|
|
65097
65112
|
CameraPathAnimation.PLAYING_TO = 3;
|
|
65098
65113
|
|
|
65099
65114
|
const tempVec3$2 = math.vec3();
|
|
65100
|
-
const tempVec3b$
|
|
65115
|
+
const tempVec3b$9 = math.vec3();
|
|
65101
65116
|
math.vec3();
|
|
65102
65117
|
const zeroVec$1 = math.vec3([0, -1, 0]);
|
|
65103
65118
|
const tempQuat = math.vec4([0, 0, 0, 1]);
|
|
@@ -65525,7 +65540,7 @@ class ImagePlane extends Component {
|
|
|
65525
65540
|
const dist = -math.dotVec3(negDir, tempVec3$2);
|
|
65526
65541
|
|
|
65527
65542
|
math.normalizeVec3(negDir);
|
|
65528
|
-
math.mulVec3Scalar(negDir, dist, tempVec3b$
|
|
65543
|
+
math.mulVec3Scalar(negDir, dist, tempVec3b$9);
|
|
65529
65544
|
math.vec3PairToQuaternion(zeroVec$1, dir, tempQuat);
|
|
65530
65545
|
|
|
65531
65546
|
this._node.quaternion = tempQuat;
|
|
@@ -66691,8 +66706,8 @@ class SpriteMarker extends Marker {
|
|
|
66691
66706
|
}
|
|
66692
66707
|
}
|
|
66693
66708
|
|
|
66694
|
-
const tempVec3a$
|
|
66695
|
-
const tempVec3b$
|
|
66709
|
+
const tempVec3a$W = math.vec3();
|
|
66710
|
+
const tempVec3b$8 = math.vec3();
|
|
66696
66711
|
const tempMat4a = math.mat4();
|
|
66697
66712
|
|
|
66698
66713
|
/**
|
|
@@ -66769,8 +66784,8 @@ function frustumIntersectsAABB3(frustum, aabb) {
|
|
|
66769
66784
|
|
|
66770
66785
|
let ret = Frustum.INSIDE;
|
|
66771
66786
|
|
|
66772
|
-
const min = tempVec3a$
|
|
66773
|
-
const max = tempVec3b$
|
|
66787
|
+
const min = tempVec3a$W;
|
|
66788
|
+
const max = tempVec3b$8;
|
|
66774
66789
|
|
|
66775
66790
|
min[0] = aabb[0];
|
|
66776
66791
|
min[1] = aabb[1];
|
|
@@ -69351,7 +69366,7 @@ const RENDER_PASSES = {
|
|
|
69351
69366
|
};
|
|
69352
69367
|
|
|
69353
69368
|
const tempVec4$7 = math.vec4();
|
|
69354
|
-
const tempVec3a$
|
|
69369
|
+
const tempVec3a$V = math.vec3();
|
|
69355
69370
|
|
|
69356
69371
|
/**
|
|
69357
69372
|
* @private
|
|
@@ -69416,7 +69431,7 @@ class TrianglesBatchingColorRenderer {
|
|
|
69416
69431
|
if (active) {
|
|
69417
69432
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
69418
69433
|
if (origin) {
|
|
69419
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
69434
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$V);
|
|
69420
69435
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
69421
69436
|
} else {
|
|
69422
69437
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -69844,7 +69859,7 @@ class TrianglesBatchingColorRenderer {
|
|
|
69844
69859
|
}
|
|
69845
69860
|
|
|
69846
69861
|
const tempVec4$6 = math.vec4();
|
|
69847
|
-
const tempVec3a$
|
|
69862
|
+
const tempVec3a$U = math.vec3();
|
|
69848
69863
|
|
|
69849
69864
|
/**
|
|
69850
69865
|
* @private
|
|
@@ -69906,7 +69921,7 @@ class TrianglesBatchingFlatColorRenderer {
|
|
|
69906
69921
|
if (active) {
|
|
69907
69922
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
69908
69923
|
if (origin) {
|
|
69909
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
69924
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
|
|
69910
69925
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
69911
69926
|
} else {
|
|
69912
69927
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -70323,7 +70338,7 @@ class TrianglesBatchingFlatColorRenderer {
|
|
|
70323
70338
|
}
|
|
70324
70339
|
|
|
70325
70340
|
const defaultColor$4 = new Float32Array([1, 1, 1]);
|
|
70326
|
-
const tempVec3a$
|
|
70341
|
+
const tempVec3a$T = math.vec3();
|
|
70327
70342
|
|
|
70328
70343
|
/**
|
|
70329
70344
|
* @private
|
|
@@ -70407,7 +70422,7 @@ class TrianglesBatchingSilhouetteRenderer {
|
|
|
70407
70422
|
if (active) {
|
|
70408
70423
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
70409
70424
|
if (origin) {
|
|
70410
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
70425
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
|
|
70411
70426
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
70412
70427
|
} else {
|
|
70413
70428
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -70644,7 +70659,7 @@ class TrianglesBatchingSilhouetteRenderer {
|
|
|
70644
70659
|
}
|
|
70645
70660
|
}
|
|
70646
70661
|
|
|
70647
|
-
const tempVec3a$
|
|
70662
|
+
const tempVec3a$S = math.vec3();
|
|
70648
70663
|
const defaultColor$3 = new Float32Array([0,0,0,1]);
|
|
70649
70664
|
|
|
70650
70665
|
/**
|
|
@@ -70727,7 +70742,7 @@ class TrianglesBatchingEdgesRenderer {
|
|
|
70727
70742
|
if (active) {
|
|
70728
70743
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
70729
70744
|
if (origin) {
|
|
70730
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
70745
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
|
|
70731
70746
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
70732
70747
|
} else {
|
|
70733
70748
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -70955,7 +70970,7 @@ class TrianglesBatchingEdgesRenderer {
|
|
|
70955
70970
|
}
|
|
70956
70971
|
}
|
|
70957
70972
|
|
|
70958
|
-
const tempVec3a$
|
|
70973
|
+
const tempVec3a$R = math.vec3();
|
|
70959
70974
|
|
|
70960
70975
|
/**
|
|
70961
70976
|
* @private
|
|
@@ -71015,7 +71030,7 @@ class TrianglesBatchingEdgesColorRenderer {
|
|
|
71015
71030
|
if (active) {
|
|
71016
71031
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71017
71032
|
if (origin) {
|
|
71018
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71033
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
|
|
71019
71034
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71020
71035
|
} else {
|
|
71021
71036
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -71243,7 +71258,7 @@ class TrianglesBatchingEdgesColorRenderer {
|
|
|
71243
71258
|
}
|
|
71244
71259
|
}
|
|
71245
71260
|
|
|
71246
|
-
const tempVec3a$
|
|
71261
|
+
const tempVec3a$Q = math.vec3();
|
|
71247
71262
|
|
|
71248
71263
|
/**
|
|
71249
71264
|
* @private
|
|
@@ -71309,7 +71324,7 @@ class TrianglesBatchingPickMeshRenderer {
|
|
|
71309
71324
|
if (active) {
|
|
71310
71325
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71311
71326
|
if (origin) {
|
|
71312
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71327
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
|
|
71313
71328
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71314
71329
|
} else {
|
|
71315
71330
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -71539,7 +71554,7 @@ class TrianglesBatchingPickMeshRenderer {
|
|
|
71539
71554
|
}
|
|
71540
71555
|
}
|
|
71541
71556
|
|
|
71542
|
-
const tempVec3a$
|
|
71557
|
+
const tempVec3a$P = math.vec3();
|
|
71543
71558
|
|
|
71544
71559
|
/**
|
|
71545
71560
|
* @private
|
|
@@ -71610,7 +71625,7 @@ class TrianglesBatchingPickDepthRenderer {
|
|
|
71610
71625
|
if (active) {
|
|
71611
71626
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71612
71627
|
if (origin) {
|
|
71613
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71628
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
|
|
71614
71629
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71615
71630
|
} else {
|
|
71616
71631
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -71848,7 +71863,7 @@ class TrianglesBatchingPickDepthRenderer {
|
|
|
71848
71863
|
}
|
|
71849
71864
|
}
|
|
71850
71865
|
|
|
71851
|
-
const tempVec3a$
|
|
71866
|
+
const tempVec3a$O = math.vec3();
|
|
71852
71867
|
|
|
71853
71868
|
/**
|
|
71854
71869
|
* @private
|
|
@@ -71916,7 +71931,7 @@ class TrianglesBatchingPickNormalsRenderer {
|
|
|
71916
71931
|
if (active) {
|
|
71917
71932
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
71918
71933
|
if (origin) {
|
|
71919
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
71934
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
|
|
71920
71935
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
71921
71936
|
} else {
|
|
71922
71937
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72141,7 +72156,7 @@ class TrianglesBatchingPickNormalsRenderer {
|
|
|
72141
72156
|
}
|
|
72142
72157
|
}
|
|
72143
72158
|
|
|
72144
|
-
const tempVec3a$
|
|
72159
|
+
const tempVec3a$N = math.vec3();
|
|
72145
72160
|
|
|
72146
72161
|
/**
|
|
72147
72162
|
* @private
|
|
@@ -72201,7 +72216,7 @@ class TrianglesBatchingOcclusionRenderer {
|
|
|
72201
72216
|
if (active) {
|
|
72202
72217
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72203
72218
|
if (origin) {
|
|
72204
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
72219
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
|
|
72205
72220
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72206
72221
|
} else {
|
|
72207
72222
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72424,7 +72439,7 @@ class TrianglesBatchingOcclusionRenderer {
|
|
|
72424
72439
|
}
|
|
72425
72440
|
}
|
|
72426
72441
|
|
|
72427
|
-
const tempVec3a$
|
|
72442
|
+
const tempVec3a$M = math.vec3();
|
|
72428
72443
|
|
|
72429
72444
|
/**
|
|
72430
72445
|
* @private
|
|
@@ -72484,7 +72499,7 @@ class TrianglesBatchingDepthRenderer {
|
|
|
72484
72499
|
if (active) {
|
|
72485
72500
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72486
72501
|
if (origin) {
|
|
72487
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
72502
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
|
|
72488
72503
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72489
72504
|
} else {
|
|
72490
72505
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -72708,7 +72723,7 @@ class TrianglesBatchingDepthRenderer {
|
|
|
72708
72723
|
}
|
|
72709
72724
|
}
|
|
72710
72725
|
|
|
72711
|
-
const tempVec3a$
|
|
72726
|
+
const tempVec3a$L = math.vec3();
|
|
72712
72727
|
|
|
72713
72728
|
/**
|
|
72714
72729
|
* @private
|
|
@@ -72771,7 +72786,7 @@ class TrianglesBatchingNormalsRenderer {
|
|
|
72771
72786
|
if (active) {
|
|
72772
72787
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
72773
72788
|
if (origin) {
|
|
72774
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
72789
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
|
|
72775
72790
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
72776
72791
|
} else {
|
|
72777
72792
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73011,7 +73026,7 @@ class TrianglesBatchingNormalsRenderer {
|
|
|
73011
73026
|
}
|
|
73012
73027
|
}
|
|
73013
73028
|
|
|
73014
|
-
const tempVec3a$
|
|
73029
|
+
const tempVec3a$K = math.vec3();
|
|
73015
73030
|
|
|
73016
73031
|
/**
|
|
73017
73032
|
* Renders BatchingLayer fragment depths to a shadow map.
|
|
@@ -73080,7 +73095,7 @@ class TrianglesBatchingShadowRenderer {
|
|
|
73080
73095
|
if (active) {
|
|
73081
73096
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73082
73097
|
if (origin) {
|
|
73083
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
73098
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
|
|
73084
73099
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73085
73100
|
} else {
|
|
73086
73101
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -73252,7 +73267,7 @@ class TrianglesBatchingShadowRenderer {
|
|
|
73252
73267
|
}
|
|
73253
73268
|
|
|
73254
73269
|
const tempVec4$5 = math.vec4();
|
|
73255
|
-
const tempVec3a$
|
|
73270
|
+
const tempVec3a$J = math.vec3();
|
|
73256
73271
|
|
|
73257
73272
|
// const TEXTURE_DECODE_FUNCS = {};
|
|
73258
73273
|
// TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
|
|
@@ -73325,7 +73340,7 @@ class TrianglesBatchingPBRRenderer {
|
|
|
73325
73340
|
if (active) {
|
|
73326
73341
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
73327
73342
|
if (origin) {
|
|
73328
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
73343
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
|
|
73329
73344
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
73330
73345
|
} else {
|
|
73331
73346
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74130,7 +74145,7 @@ class TrianglesBatchingPBRRenderer {
|
|
|
74130
74145
|
}
|
|
74131
74146
|
}
|
|
74132
74147
|
|
|
74133
|
-
const tempVec3a$
|
|
74148
|
+
const tempVec3a$I = math.vec3();
|
|
74134
74149
|
|
|
74135
74150
|
/**
|
|
74136
74151
|
* @private
|
|
@@ -74197,7 +74212,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
|
|
|
74197
74212
|
if (active) {
|
|
74198
74213
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74199
74214
|
if (origin) {
|
|
74200
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
74215
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
|
|
74201
74216
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74202
74217
|
} else {
|
|
74203
74218
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -74407,7 +74422,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
|
|
|
74407
74422
|
}
|
|
74408
74423
|
|
|
74409
74424
|
const tempVec4$4 = math.vec4();
|
|
74410
|
-
const tempVec3a$
|
|
74425
|
+
const tempVec3a$H = math.vec3();
|
|
74411
74426
|
|
|
74412
74427
|
/**
|
|
74413
74428
|
* @private
|
|
@@ -74472,7 +74487,7 @@ class TrianglesBatchingColorTextureRenderer {
|
|
|
74472
74487
|
if (active) {
|
|
74473
74488
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
74474
74489
|
if (origin) {
|
|
74475
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
74490
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
|
|
74476
74491
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
74477
74492
|
} else {
|
|
74478
74493
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -75478,8 +75493,8 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]);
|
|
|
75478
75493
|
const tempVec4c$7 = math.vec4([0, 0, 0, 1]);
|
|
75479
75494
|
const tempOBB3$2 = math.OBB3();
|
|
75480
75495
|
|
|
75481
|
-
const tempVec3a$
|
|
75482
|
-
const tempVec3b$
|
|
75496
|
+
const tempVec3a$G = math.vec3();
|
|
75497
|
+
const tempVec3b$7 = math.vec3();
|
|
75483
75498
|
const tempVec3c$5 = math.vec3();
|
|
75484
75499
|
const tempVec3d$2 = math.vec3();
|
|
75485
75500
|
const tempVec3e$1 = math.vec3();
|
|
@@ -76658,8 +76673,8 @@ class TrianglesBatchingLayer {
|
|
|
76658
76673
|
const origin = state.origin;
|
|
76659
76674
|
const offset = portion.offset;
|
|
76660
76675
|
|
|
76661
|
-
const rtcRayOrigin = tempVec3a$
|
|
76662
|
-
const rtcRayDir = tempVec3b$
|
|
76676
|
+
const rtcRayOrigin = tempVec3a$G;
|
|
76677
|
+
const rtcRayDir = tempVec3b$7;
|
|
76663
76678
|
|
|
76664
76679
|
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$5) : worldRayOrigin); // World -> RTC
|
|
76665
76680
|
rtcRayDir.set(worldRayDir);
|
|
@@ -76782,7 +76797,7 @@ class TrianglesBatchingLayer {
|
|
|
76782
76797
|
}
|
|
76783
76798
|
|
|
76784
76799
|
const tempVec4$3 = math.vec4();
|
|
76785
|
-
const tempVec3a$
|
|
76800
|
+
const tempVec3a$F = math.vec3();
|
|
76786
76801
|
|
|
76787
76802
|
/**
|
|
76788
76803
|
* @private
|
|
@@ -76848,7 +76863,7 @@ class TrianglesInstancingColorRenderer {
|
|
|
76848
76863
|
if (active) {
|
|
76849
76864
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
76850
76865
|
if (origin) {
|
|
76851
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
76866
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$F);
|
|
76852
76867
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
76853
76868
|
} else {
|
|
76854
76869
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77325,7 +77340,7 @@ class TrianglesInstancingColorRenderer {
|
|
|
77325
77340
|
}
|
|
77326
77341
|
|
|
77327
77342
|
const tempVec4$2 = math.vec4();
|
|
77328
|
-
const tempVec3a$
|
|
77343
|
+
const tempVec3a$E = math.vec3();
|
|
77329
77344
|
|
|
77330
77345
|
/**
|
|
77331
77346
|
* @private
|
|
@@ -77387,7 +77402,7 @@ class TrianglesInstancingFlatColorRenderer {
|
|
|
77387
77402
|
if (active) {
|
|
77388
77403
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77389
77404
|
if (origin) {
|
|
77390
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
77405
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
|
|
77391
77406
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77392
77407
|
} else {
|
|
77393
77408
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -77834,7 +77849,7 @@ class TrianglesInstancingFlatColorRenderer {
|
|
|
77834
77849
|
}
|
|
77835
77850
|
}
|
|
77836
77851
|
|
|
77837
|
-
const tempVec3a$
|
|
77852
|
+
const tempVec3a$D = math.vec3();
|
|
77838
77853
|
|
|
77839
77854
|
/**
|
|
77840
77855
|
* @private
|
|
@@ -77917,7 +77932,7 @@ class TrianglesInstancingSilhouetteRenderer {
|
|
|
77917
77932
|
if (active) {
|
|
77918
77933
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
77919
77934
|
if (origin) {
|
|
77920
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
77935
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
|
|
77921
77936
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
77922
77937
|
} else {
|
|
77923
77938
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -78189,7 +78204,7 @@ class TrianglesInstancingSilhouetteRenderer {
|
|
|
78189
78204
|
}
|
|
78190
78205
|
}
|
|
78191
78206
|
|
|
78192
|
-
const tempVec3a$
|
|
78207
|
+
const tempVec3a$C = math.vec3();
|
|
78193
78208
|
const defaultColor$2 = new Float32Array([0,0,0,1]);
|
|
78194
78209
|
|
|
78195
78210
|
/**
|
|
@@ -78273,7 +78288,7 @@ class TrianglesInstancingEdgesRenderer {
|
|
|
78273
78288
|
if (active) {
|
|
78274
78289
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
78275
78290
|
if (origin) {
|
|
78276
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
78291
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
|
|
78277
78292
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
78278
78293
|
} else {
|
|
78279
78294
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -78534,7 +78549,7 @@ class TrianglesInstancingEdgesRenderer {
|
|
|
78534
78549
|
}
|
|
78535
78550
|
}
|
|
78536
78551
|
|
|
78537
|
-
const tempVec3a$
|
|
78552
|
+
const tempVec3a$B = math.vec3();
|
|
78538
78553
|
|
|
78539
78554
|
/**
|
|
78540
78555
|
* @private
|
|
@@ -78595,7 +78610,7 @@ class TrianglesInstancingEdgesColorRenderer {
|
|
|
78595
78610
|
if (active) {
|
|
78596
78611
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
78597
78612
|
if (origin) {
|
|
78598
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
78613
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
|
|
78599
78614
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
78600
78615
|
} else {
|
|
78601
78616
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -78861,7 +78876,7 @@ class TrianglesInstancingEdgesColorRenderer {
|
|
|
78861
78876
|
}
|
|
78862
78877
|
}
|
|
78863
78878
|
|
|
78864
|
-
const tempVec3a$
|
|
78879
|
+
const tempVec3a$A = math.vec3();
|
|
78865
78880
|
|
|
78866
78881
|
/**
|
|
78867
78882
|
* @private
|
|
@@ -78964,7 +78979,7 @@ class TrianglesInstancingPickMeshRenderer {
|
|
|
78964
78979
|
if (active) {
|
|
78965
78980
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
78966
78981
|
if (origin) {
|
|
78967
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
78982
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
|
|
78968
78983
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
78969
78984
|
} else {
|
|
78970
78985
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -79199,7 +79214,7 @@ class TrianglesInstancingPickMeshRenderer {
|
|
|
79199
79214
|
}
|
|
79200
79215
|
}
|
|
79201
79216
|
|
|
79202
|
-
const tempVec3a$
|
|
79217
|
+
const tempVec3a$z = math.vec3();
|
|
79203
79218
|
|
|
79204
79219
|
/**
|
|
79205
79220
|
* @private
|
|
@@ -79276,7 +79291,7 @@ class TrianglesInstancingPickDepthRenderer {
|
|
|
79276
79291
|
if (active) {
|
|
79277
79292
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
79278
79293
|
if (origin) {
|
|
79279
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
79294
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
|
|
79280
79295
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
79281
79296
|
} else {
|
|
79282
79297
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -79544,7 +79559,7 @@ class TrianglesInstancingPickDepthRenderer {
|
|
|
79544
79559
|
}
|
|
79545
79560
|
}
|
|
79546
79561
|
|
|
79547
|
-
const tempVec3a$
|
|
79562
|
+
const tempVec3a$y = math.vec3();
|
|
79548
79563
|
|
|
79549
79564
|
/**
|
|
79550
79565
|
* @private
|
|
@@ -79621,7 +79636,7 @@ class TrianglesInstancingPickNormalsRenderer {
|
|
|
79621
79636
|
if (active) {
|
|
79622
79637
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
79623
79638
|
if (origin) {
|
|
79624
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
79639
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
|
|
79625
79640
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
79626
79641
|
} else {
|
|
79627
79642
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -79898,7 +79913,7 @@ class TrianglesInstancingPickNormalsRenderer {
|
|
|
79898
79913
|
}
|
|
79899
79914
|
}
|
|
79900
79915
|
|
|
79901
|
-
const tempVec3a$
|
|
79916
|
+
const tempVec3a$x = math.vec3();
|
|
79902
79917
|
|
|
79903
79918
|
/**
|
|
79904
79919
|
* @private
|
|
@@ -79959,7 +79974,7 @@ class TrianglesInstancingOcclusionRenderer {
|
|
|
79959
79974
|
if (active) {
|
|
79960
79975
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
79961
79976
|
if (origin) {
|
|
79962
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
79977
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
|
|
79963
79978
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
79964
79979
|
} else {
|
|
79965
79980
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80217,7 +80232,7 @@ class TrianglesInstancingOcclusionRenderer {
|
|
|
80217
80232
|
}
|
|
80218
80233
|
}
|
|
80219
80234
|
|
|
80220
|
-
const tempVec3a$
|
|
80235
|
+
const tempVec3a$w = math.vec3();
|
|
80221
80236
|
|
|
80222
80237
|
/**
|
|
80223
80238
|
* @private
|
|
@@ -80278,7 +80293,7 @@ class TrianglesInstancingDepthRenderer {
|
|
|
80278
80293
|
if (active) {
|
|
80279
80294
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
80280
80295
|
if (origin) {
|
|
80281
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
80296
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
|
|
80282
80297
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
80283
80298
|
} else {
|
|
80284
80299
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80528,7 +80543,7 @@ class TrianglesInstancingDepthRenderer {
|
|
|
80528
80543
|
}
|
|
80529
80544
|
}
|
|
80530
80545
|
|
|
80531
|
-
const tempVec3a$
|
|
80546
|
+
const tempVec3a$v = math.vec3();
|
|
80532
80547
|
|
|
80533
80548
|
/**
|
|
80534
80549
|
* @private
|
|
@@ -80592,7 +80607,7 @@ class TrianglesInstancingNormalsRenderer {
|
|
|
80592
80607
|
if (active) {
|
|
80593
80608
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
80594
80609
|
if (origin) {
|
|
80595
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
80610
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
|
|
80596
80611
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
80597
80612
|
} else {
|
|
80598
80613
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -80872,7 +80887,7 @@ class TrianglesInstancingNormalsRenderer {
|
|
|
80872
80887
|
}
|
|
80873
80888
|
}
|
|
80874
80889
|
|
|
80875
|
-
const tempVec3a$
|
|
80890
|
+
const tempVec3a$u = math.vec3();
|
|
80876
80891
|
|
|
80877
80892
|
/**
|
|
80878
80893
|
* Renders InstancingLayer fragment depths to a shadow map.
|
|
@@ -80959,7 +80974,7 @@ class TrianglesInstancingShadowRenderer {
|
|
|
80959
80974
|
if (active) {
|
|
80960
80975
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
80961
80976
|
if (origin) {
|
|
80962
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
80977
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
|
|
80963
80978
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
80964
80979
|
} else {
|
|
80965
80980
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -81152,7 +81167,7 @@ class TrianglesInstancingShadowRenderer {
|
|
|
81152
81167
|
}
|
|
81153
81168
|
|
|
81154
81169
|
const tempVec4$1 = math.vec4();
|
|
81155
|
-
const tempVec3a$
|
|
81170
|
+
const tempVec3a$t = math.vec3();
|
|
81156
81171
|
|
|
81157
81172
|
const TEXTURE_DECODE_FUNCS = {};
|
|
81158
81173
|
TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
|
|
@@ -81226,7 +81241,7 @@ class TrianglesInstancingPBRRenderer {
|
|
|
81226
81241
|
if (active) {
|
|
81227
81242
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
81228
81243
|
if (origin) {
|
|
81229
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
81244
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
|
|
81230
81245
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
81231
81246
|
} else {
|
|
81232
81247
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -82062,7 +82077,7 @@ class TrianglesInstancingPBRRenderer {
|
|
|
82062
82077
|
}
|
|
82063
82078
|
}
|
|
82064
82079
|
|
|
82065
|
-
const tempVec3a$
|
|
82080
|
+
const tempVec3a$s = math.vec3();
|
|
82066
82081
|
|
|
82067
82082
|
/**
|
|
82068
82083
|
* @private
|
|
@@ -82137,7 +82152,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
|
|
|
82137
82152
|
if (active) {
|
|
82138
82153
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
82139
82154
|
if (origin) {
|
|
82140
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
82155
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
|
|
82141
82156
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
82142
82157
|
} else {
|
|
82143
82158
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -82377,7 +82392,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
|
|
|
82377
82392
|
}
|
|
82378
82393
|
|
|
82379
82394
|
const tempVec4 = math.vec4();
|
|
82380
|
-
const tempVec3a$
|
|
82395
|
+
const tempVec3a$r = math.vec3();
|
|
82381
82396
|
|
|
82382
82397
|
/**
|
|
82383
82398
|
* @private
|
|
@@ -82442,7 +82457,7 @@ class TrianglesInstancingColorTextureRenderer {
|
|
|
82442
82457
|
if (active) {
|
|
82443
82458
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
82444
82459
|
if (origin) {
|
|
82445
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
82460
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
|
|
82446
82461
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
82447
82462
|
} else {
|
|
82448
82463
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -83253,8 +83268,8 @@ const tempVec4b$9 = math.vec4([0, 0, 0, 1]);
|
|
|
83253
83268
|
const tempVec4c$6 = math.vec4([0, 0, 0, 1]);
|
|
83254
83269
|
const tempVec3fa$2 = new Float32Array(3);
|
|
83255
83270
|
|
|
83256
|
-
const tempVec3a$
|
|
83257
|
-
const tempVec3b$
|
|
83271
|
+
const tempVec3a$q = math.vec3();
|
|
83272
|
+
const tempVec3b$6 = math.vec3();
|
|
83258
83273
|
const tempVec3c$4 = math.vec3();
|
|
83259
83274
|
const tempVec3d$1 = math.vec3();
|
|
83260
83275
|
const tempVec3e = math.vec3();
|
|
@@ -84182,8 +84197,8 @@ class TrianglesInstancingLayer {
|
|
|
84182
84197
|
const origin = state.origin;
|
|
84183
84198
|
const offset = portion.offset;
|
|
84184
84199
|
|
|
84185
|
-
const rtcRayOrigin = tempVec3a$
|
|
84186
|
-
const rtcRayDir = tempVec3b$
|
|
84200
|
+
const rtcRayOrigin = tempVec3a$q;
|
|
84201
|
+
const rtcRayDir = tempVec3b$6;
|
|
84187
84202
|
|
|
84188
84203
|
rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$4) : worldRayOrigin); // World -> RTC
|
|
84189
84204
|
rtcRayDir.set(worldRayDir);
|
|
@@ -84316,7 +84331,7 @@ class TrianglesInstancingLayer {
|
|
|
84316
84331
|
}
|
|
84317
84332
|
}
|
|
84318
84333
|
|
|
84319
|
-
const tempVec3a$
|
|
84334
|
+
const tempVec3a$p = math.vec3();
|
|
84320
84335
|
|
|
84321
84336
|
/**
|
|
84322
84337
|
* @private
|
|
@@ -84379,7 +84394,7 @@ class LinesBatchingColorRenderer {
|
|
|
84379
84394
|
if (active) {
|
|
84380
84395
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
84381
84396
|
if (origin) {
|
|
84382
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
84397
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$p);
|
|
84383
84398
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
84384
84399
|
} else {
|
|
84385
84400
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -84599,7 +84614,7 @@ class LinesBatchingColorRenderer {
|
|
|
84599
84614
|
}
|
|
84600
84615
|
|
|
84601
84616
|
const defaultColor$1 = new Float32Array([1, 1, 1]);
|
|
84602
|
-
const tempVec3a$
|
|
84617
|
+
const tempVec3a$o = math.vec3();
|
|
84603
84618
|
|
|
84604
84619
|
/**
|
|
84605
84620
|
* @private
|
|
@@ -84686,7 +84701,7 @@ class LinesBatchingSilhouetteRenderer {
|
|
|
84686
84701
|
if (active) {
|
|
84687
84702
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
84688
84703
|
if (origin) {
|
|
84689
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
84704
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
|
|
84690
84705
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
84691
84706
|
} else {
|
|
84692
84707
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -85783,7 +85798,7 @@ class LinesBatchingLayer {
|
|
|
85783
85798
|
}
|
|
85784
85799
|
}
|
|
85785
85800
|
|
|
85786
|
-
const tempVec3a$
|
|
85801
|
+
const tempVec3a$n = math.vec3();
|
|
85787
85802
|
|
|
85788
85803
|
/**
|
|
85789
85804
|
* @private
|
|
@@ -85846,7 +85861,7 @@ class LinesInstancingColorRenderer {
|
|
|
85846
85861
|
if (active) {
|
|
85847
85862
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
85848
85863
|
if (origin) {
|
|
85849
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
85864
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
|
|
85850
85865
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
85851
85866
|
} else {
|
|
85852
85867
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -86128,7 +86143,7 @@ class LinesInstancingColorRenderer {
|
|
|
86128
86143
|
}
|
|
86129
86144
|
}
|
|
86130
86145
|
|
|
86131
|
-
const tempVec3a$
|
|
86146
|
+
const tempVec3a$m = math.vec3();
|
|
86132
86147
|
|
|
86133
86148
|
/**
|
|
86134
86149
|
* @private
|
|
@@ -86213,7 +86228,7 @@ class LinesInstancingSilhouetteRenderer {
|
|
|
86213
86228
|
if (active) {
|
|
86214
86229
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
86215
86230
|
if (origin) {
|
|
86216
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
86231
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
|
|
86217
86232
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
86218
86233
|
} else {
|
|
86219
86234
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -87195,7 +87210,7 @@ class LinesInstancingLayer {
|
|
|
87195
87210
|
}
|
|
87196
87211
|
}
|
|
87197
87212
|
|
|
87198
|
-
const tempVec3a$
|
|
87213
|
+
const tempVec3a$l = math.vec3();
|
|
87199
87214
|
|
|
87200
87215
|
/**
|
|
87201
87216
|
* @private
|
|
@@ -87256,7 +87271,7 @@ class PointsBatchingColorRenderer {
|
|
|
87256
87271
|
if (active) {
|
|
87257
87272
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
87258
87273
|
if (origin) {
|
|
87259
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
87274
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
|
|
87260
87275
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
87261
87276
|
} else {
|
|
87262
87277
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -87541,7 +87556,7 @@ class PointsBatchingColorRenderer {
|
|
|
87541
87556
|
}
|
|
87542
87557
|
|
|
87543
87558
|
const defaultColor = new Float32Array([1, 1, 1]);
|
|
87544
|
-
const tempVec3a$
|
|
87559
|
+
const tempVec3a$k = math.vec3();
|
|
87545
87560
|
|
|
87546
87561
|
/**
|
|
87547
87562
|
* @private
|
|
@@ -87626,7 +87641,7 @@ class PointsBatchingSilhouetteRenderer {
|
|
|
87626
87641
|
if (active) {
|
|
87627
87642
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
87628
87643
|
if (origin) {
|
|
87629
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
87644
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
|
|
87630
87645
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
87631
87646
|
} else {
|
|
87632
87647
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -87870,7 +87885,7 @@ class PointsBatchingSilhouetteRenderer {
|
|
|
87870
87885
|
}
|
|
87871
87886
|
}
|
|
87872
87887
|
|
|
87873
|
-
const tempVec3a$
|
|
87888
|
+
const tempVec3a$j = math.vec3();
|
|
87874
87889
|
|
|
87875
87890
|
/**
|
|
87876
87891
|
* @private
|
|
@@ -87937,7 +87952,7 @@ class PointsBatchingPickMeshRenderer {
|
|
|
87937
87952
|
if (active) {
|
|
87938
87953
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
87939
87954
|
if (origin) {
|
|
87940
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
87955
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
|
|
87941
87956
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
87942
87957
|
} else {
|
|
87943
87958
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -88182,7 +88197,7 @@ class PointsBatchingPickMeshRenderer {
|
|
|
88182
88197
|
}
|
|
88183
88198
|
}
|
|
88184
88199
|
|
|
88185
|
-
const tempVec3a$
|
|
88200
|
+
const tempVec3a$i = math.vec3();
|
|
88186
88201
|
|
|
88187
88202
|
/**
|
|
88188
88203
|
* @private
|
|
@@ -88254,7 +88269,7 @@ class PointsBatchingPickDepthRenderer {
|
|
|
88254
88269
|
if (active) {
|
|
88255
88270
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
88256
88271
|
if (origin) {
|
|
88257
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
88272
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
|
|
88258
88273
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
88259
88274
|
} else {
|
|
88260
88275
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -88505,7 +88520,7 @@ class PointsBatchingPickDepthRenderer {
|
|
|
88505
88520
|
}
|
|
88506
88521
|
}
|
|
88507
88522
|
|
|
88508
|
-
const tempVec3a$
|
|
88523
|
+
const tempVec3a$h = math.vec3();
|
|
88509
88524
|
|
|
88510
88525
|
/**
|
|
88511
88526
|
* @private
|
|
@@ -88566,7 +88581,7 @@ class PointsBatchingOcclusionRenderer {
|
|
|
88566
88581
|
if (active) {
|
|
88567
88582
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
88568
88583
|
if (origin) {
|
|
88569
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
88584
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
|
|
88570
88585
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
88571
88586
|
} else {
|
|
88572
88587
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -88932,8 +88947,8 @@ class PointsBatchingBuffer {
|
|
|
88932
88947
|
}
|
|
88933
88948
|
}
|
|
88934
88949
|
|
|
88935
|
-
const tempVec3a$
|
|
88936
|
-
const tempVec3b$
|
|
88950
|
+
const tempVec3a$g = math.vec4();
|
|
88951
|
+
const tempVec3b$5 = math.vec4();
|
|
88937
88952
|
const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
|
|
88938
88953
|
const tempVec4b$6 = math.vec4([0, 0, 0, 1]);
|
|
88939
88954
|
const tempVec4c$3 = math.vec4([0, 0, 0, 1]);
|
|
@@ -89085,8 +89100,8 @@ class PointsBatchingLayer {
|
|
|
89085
89100
|
|
|
89086
89101
|
const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed);
|
|
89087
89102
|
|
|
89088
|
-
const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$
|
|
89089
|
-
const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$
|
|
89103
|
+
const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$g);
|
|
89104
|
+
const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$5);
|
|
89090
89105
|
|
|
89091
89106
|
worldAABB[0] = min[0];
|
|
89092
89107
|
worldAABB[1] = min[1];
|
|
@@ -89724,7 +89739,7 @@ class PointsBatchingLayer {
|
|
|
89724
89739
|
}
|
|
89725
89740
|
}
|
|
89726
89741
|
|
|
89727
|
-
const tempVec3a$
|
|
89742
|
+
const tempVec3a$f = math.vec3();
|
|
89728
89743
|
|
|
89729
89744
|
/**
|
|
89730
89745
|
* @private
|
|
@@ -89793,7 +89808,7 @@ class PointsInstancingColorRenderer {
|
|
|
89793
89808
|
if (active) {
|
|
89794
89809
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
89795
89810
|
if (origin) {
|
|
89796
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
89811
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f);
|
|
89797
89812
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
89798
89813
|
} else {
|
|
89799
89814
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -90103,7 +90118,7 @@ class PointsInstancingColorRenderer {
|
|
|
90103
90118
|
}
|
|
90104
90119
|
}
|
|
90105
90120
|
|
|
90106
|
-
const tempVec3a$
|
|
90121
|
+
const tempVec3a$e = math.vec3();
|
|
90107
90122
|
|
|
90108
90123
|
/**
|
|
90109
90124
|
* @private
|
|
@@ -90187,7 +90202,7 @@ class PointsInstancingSilhouetteRenderer {
|
|
|
90187
90202
|
if (active) {
|
|
90188
90203
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
90189
90204
|
if (origin) {
|
|
90190
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
90205
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
|
|
90191
90206
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
90192
90207
|
} else {
|
|
90193
90208
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -90468,7 +90483,7 @@ class PointsInstancingSilhouetteRenderer {
|
|
|
90468
90483
|
}
|
|
90469
90484
|
}
|
|
90470
90485
|
|
|
90471
|
-
const tempVec3a$
|
|
90486
|
+
const tempVec3a$d = math.vec3();
|
|
90472
90487
|
|
|
90473
90488
|
/**
|
|
90474
90489
|
* @private
|
|
@@ -90574,7 +90589,7 @@ class PointsInstancingPickMeshRenderer {
|
|
|
90574
90589
|
if (active) {
|
|
90575
90590
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
90576
90591
|
if (origin) {
|
|
90577
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
90592
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
|
|
90578
90593
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
90579
90594
|
} else {
|
|
90580
90595
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -90825,7 +90840,7 @@ class PointsInstancingPickMeshRenderer {
|
|
|
90825
90840
|
}
|
|
90826
90841
|
}
|
|
90827
90842
|
|
|
90828
|
-
const tempVec3a$
|
|
90843
|
+
const tempVec3a$c = math.vec3();
|
|
90829
90844
|
|
|
90830
90845
|
/**
|
|
90831
90846
|
* @private
|
|
@@ -90903,7 +90918,7 @@ class PointsInstancingPickDepthRenderer {
|
|
|
90903
90918
|
if (active) {
|
|
90904
90919
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
90905
90920
|
if (origin) {
|
|
90906
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
90921
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
|
|
90907
90922
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
90908
90923
|
} else {
|
|
90909
90924
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -91191,7 +91206,7 @@ class PointsInstancingPickDepthRenderer {
|
|
|
91191
91206
|
}
|
|
91192
91207
|
}
|
|
91193
91208
|
|
|
91194
|
-
const tempVec3a$
|
|
91209
|
+
const tempVec3a$b = math.vec3();
|
|
91195
91210
|
|
|
91196
91211
|
/**
|
|
91197
91212
|
* @private
|
|
@@ -91253,7 +91268,7 @@ class PointsInstancingOcclusionRenderer {
|
|
|
91253
91268
|
if (active) {
|
|
91254
91269
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
91255
91270
|
if (origin) {
|
|
91256
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
91271
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
|
|
91257
91272
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
91258
91273
|
} else {
|
|
91259
91274
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -91542,7 +91557,7 @@ class PointsInstancingOcclusionRenderer {
|
|
|
91542
91557
|
}
|
|
91543
91558
|
}
|
|
91544
91559
|
|
|
91545
|
-
const tempVec3a$
|
|
91560
|
+
const tempVec3a$a = math.vec3();
|
|
91546
91561
|
|
|
91547
91562
|
/**
|
|
91548
91563
|
* @private
|
|
@@ -91604,7 +91619,7 @@ class PointsInstancingDepthRenderer {
|
|
|
91604
91619
|
if (active) {
|
|
91605
91620
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
91606
91621
|
if (origin) {
|
|
91607
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
91622
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
|
|
91608
91623
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
91609
91624
|
} else {
|
|
91610
91625
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -91888,7 +91903,7 @@ class PointsInstancingDepthRenderer {
|
|
|
91888
91903
|
}
|
|
91889
91904
|
}
|
|
91890
91905
|
|
|
91891
|
-
const tempVec3a$
|
|
91906
|
+
const tempVec3a$9 = math.vec3();
|
|
91892
91907
|
|
|
91893
91908
|
/**
|
|
91894
91909
|
* Renders InstancingLayer fragment depths to a shadow map.
|
|
@@ -91975,7 +91990,7 @@ class PointsInstancingShadowRenderer {
|
|
|
91975
91990
|
if (active) {
|
|
91976
91991
|
const sectionPlane = sectionPlanes[sectionPlaneIndex];
|
|
91977
91992
|
if (origin) {
|
|
91978
|
-
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$
|
|
91993
|
+
const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
|
|
91979
91994
|
gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
|
|
91980
91995
|
} else {
|
|
91981
91996
|
gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
|
|
@@ -94316,7 +94331,7 @@ function getKTX2TextureTranscoder(viewer) {
|
|
|
94316
94331
|
return transcoder;
|
|
94317
94332
|
}
|
|
94318
94333
|
|
|
94319
|
-
const tempVec3a$
|
|
94334
|
+
const tempVec3a$8 = math.vec3();
|
|
94320
94335
|
const tempMat4$1 = math.mat4();
|
|
94321
94336
|
|
|
94322
94337
|
const defaultScale = math.vec3([1, 1, 1]);
|
|
@@ -96697,7 +96712,7 @@ class VBOSceneModel extends Component {
|
|
|
96697
96712
|
}
|
|
96698
96713
|
|
|
96699
96714
|
const cfgOrigin = cfg.origin || cfg.rtcCenter;
|
|
96700
|
-
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$
|
|
96715
|
+
const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$8) : this._origin;
|
|
96701
96716
|
|
|
96702
96717
|
const instancingLayer = this._getInstancingLayer(origin, textureSetId, geometryId);
|
|
96703
96718
|
|
|
@@ -96759,7 +96774,7 @@ class VBOSceneModel extends Component {
|
|
|
96759
96774
|
|
|
96760
96775
|
let indices = cfg.indices;
|
|
96761
96776
|
let edgeIndices = cfg.edgeIndices;
|
|
96762
|
-
let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$
|
|
96777
|
+
let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$8) : this._origin;
|
|
96763
96778
|
let positions = cfg.positions;
|
|
96764
96779
|
|
|
96765
96780
|
if (positions) {
|
|
@@ -97773,8 +97788,8 @@ class TextureTranscoder {
|
|
|
97773
97788
|
const screenPos = math.vec4();
|
|
97774
97789
|
const viewPos = math.vec4();
|
|
97775
97790
|
|
|
97776
|
-
const tempVec3a$
|
|
97777
|
-
const tempVec3b$
|
|
97791
|
+
const tempVec3a$7 = math.vec3();
|
|
97792
|
+
const tempVec3b$4 = math.vec3();
|
|
97778
97793
|
const tempVec3c$3 = math.vec3();
|
|
97779
97794
|
|
|
97780
97795
|
const tempVec4a$4 = math.vec4();
|
|
@@ -97808,7 +97823,7 @@ class PanController {
|
|
|
97808
97823
|
const camera = this._scene.camera;
|
|
97809
97824
|
|
|
97810
97825
|
if (optionalTargetWorldPos) {
|
|
97811
|
-
const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$
|
|
97826
|
+
const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
|
|
97812
97827
|
const eyeWorldPosDist = math.lenVec3(eyeToWorldPosVec);
|
|
97813
97828
|
dolliedThroughSurface = (eyeWorldPosDist < dollyDelta);
|
|
97814
97829
|
}
|
|
@@ -97832,9 +97847,9 @@ class PanController {
|
|
|
97832
97847
|
// suddenly a lot closer than the point we pivoted about on the surface of the last object
|
|
97833
97848
|
// that we click-drag-pivoted on.
|
|
97834
97849
|
|
|
97835
|
-
const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$
|
|
97850
|
+
const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
|
|
97836
97851
|
const lenEyeTargetVec = math.lenVec3(eyeTargetVec);
|
|
97837
|
-
const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$
|
|
97852
|
+
const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$4)), lenEyeTargetVec);
|
|
97838
97853
|
camera.look = [camera.eye[0] + eyeLookVec[0], camera.eye[1] + eyeLookVec[1], camera.eye[2] + eyeLookVec[2]];
|
|
97839
97854
|
}
|
|
97840
97855
|
|
|
@@ -97851,7 +97866,7 @@ class PanController {
|
|
|
97851
97866
|
|
|
97852
97867
|
const worldPos2 = this._unproject(targetCanvasPos, tempVec4b$4);
|
|
97853
97868
|
const offset = math.subVec3(worldPos2, worldPos1, tempVec4c$1);
|
|
97854
|
-
const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$
|
|
97869
|
+
const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$7)), -dollyDelta, tempVec3b$4);
|
|
97855
97870
|
const moveVec = math.addVec3(offset, eyeLookMoveVec, tempVec3c$3);
|
|
97856
97871
|
|
|
97857
97872
|
camera.eye = [camera.eye[0] - moveVec[0], camera.eye[1] - moveVec[1], camera.eye[2] - moveVec[2]];
|
|
@@ -97879,8 +97894,8 @@ class PanController {
|
|
|
97879
97894
|
}
|
|
97880
97895
|
}
|
|
97881
97896
|
|
|
97882
|
-
const tempVec3a$
|
|
97883
|
-
const tempVec3b$
|
|
97897
|
+
const tempVec3a$6 = math.vec3();
|
|
97898
|
+
const tempVec3b$3 = math.vec3();
|
|
97884
97899
|
const tempVec3c$2 = math.vec3();
|
|
97885
97900
|
|
|
97886
97901
|
const tempVec4a$3 = math.vec4();
|
|
@@ -98012,10 +98027,10 @@ class PivotController {
|
|
|
98012
98027
|
|
|
98013
98028
|
_cameraLookingDownwards() { // Returns true if angle between camera viewing direction and World-space "up" axis is too small
|
|
98014
98029
|
const camera = this._scene.camera;
|
|
98015
|
-
const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$
|
|
98016
|
-
const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$
|
|
98030
|
+
const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6));
|
|
98031
|
+
const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$3);
|
|
98017
98032
|
let rightAxisLen = math.sqLenVec3(rightAxis);
|
|
98018
|
-
return (rightAxisLen <= 0.
|
|
98033
|
+
return (Math.abs(rightAxisLen) <= 0.1);
|
|
98019
98034
|
}
|
|
98020
98035
|
|
|
98021
98036
|
/**
|
|
@@ -98053,8 +98068,8 @@ class PivotController {
|
|
|
98053
98068
|
const screenZ = math.dotVec4(D, Pt3) / math.dotVec4(D, Pt4);
|
|
98054
98069
|
const worldPos = tempVec4a$3;
|
|
98055
98070
|
camera.project.unproject(canvasPos, screenZ, tempVec4b$3, tempVec4c, worldPos);
|
|
98056
|
-
const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$
|
|
98057
|
-
const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$
|
|
98071
|
+
const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$6));
|
|
98072
|
+
const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$3), tempVec3c$2);
|
|
98058
98073
|
this.setPivotPos(posOnSphere);
|
|
98059
98074
|
}
|
|
98060
98075
|
|
|
@@ -98076,6 +98091,10 @@ class PivotController {
|
|
|
98076
98091
|
if (!this._pivoting) {
|
|
98077
98092
|
return;
|
|
98078
98093
|
}
|
|
98094
|
+
if (this._cameraLookingDownwards()) {
|
|
98095
|
+
this._pivoting = false;
|
|
98096
|
+
return;
|
|
98097
|
+
}
|
|
98079
98098
|
if (yawInc === 0 && pitchInc === 0) {
|
|
98080
98099
|
return;
|
|
98081
98100
|
}
|
|
@@ -98685,8 +98704,8 @@ class MousePanRotateDollyHandler {
|
|
|
98685
98704
|
}
|
|
98686
98705
|
|
|
98687
98706
|
const center = math.vec3();
|
|
98688
|
-
const tempVec3a$
|
|
98689
|
-
const tempVec3b$
|
|
98707
|
+
const tempVec3a$5 = math.vec3();
|
|
98708
|
+
const tempVec3b$2 = math.vec3();
|
|
98690
98709
|
const tempVec3c$1 = math.vec3();
|
|
98691
98710
|
const tempVec3d = math.vec3();
|
|
98692
98711
|
|
|
@@ -98740,39 +98759,39 @@ class KeyboardAxisViewHandler {
|
|
|
98740
98759
|
|
|
98741
98760
|
if (axisViewRight) {
|
|
98742
98761
|
|
|
98743
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$
|
|
98762
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$5), tempVec3d));
|
|
98744
98763
|
tempCameraTarget.look.set(center);
|
|
98745
98764
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98746
98765
|
|
|
98747
98766
|
} else if (axisViewBack) {
|
|
98748
98767
|
|
|
98749
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$
|
|
98768
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$5), tempVec3d));
|
|
98750
98769
|
tempCameraTarget.look.set(center);
|
|
98751
98770
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98752
98771
|
|
|
98753
98772
|
} else if (axisViewLeft) {
|
|
98754
98773
|
|
|
98755
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$
|
|
98774
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$5), tempVec3d));
|
|
98756
98775
|
tempCameraTarget.look.set(center);
|
|
98757
98776
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98758
98777
|
|
|
98759
98778
|
} else if (axisViewFront) {
|
|
98760
98779
|
|
|
98761
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$
|
|
98780
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$5), tempVec3d));
|
|
98762
98781
|
tempCameraTarget.look.set(center);
|
|
98763
98782
|
tempCameraTarget.up.set(camera.worldUp);
|
|
98764
98783
|
|
|
98765
98784
|
} else if (axisViewTop) {
|
|
98766
98785
|
|
|
98767
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$
|
|
98786
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$5), tempVec3d));
|
|
98768
98787
|
tempCameraTarget.look.set(center);
|
|
98769
|
-
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$
|
|
98788
|
+
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$2), tempVec3c$1));
|
|
98770
98789
|
|
|
98771
98790
|
} else if (axisViewBottom) {
|
|
98772
98791
|
|
|
98773
|
-
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$
|
|
98792
|
+
tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$5), tempVec3d));
|
|
98774
98793
|
tempCameraTarget.look.set(center);
|
|
98775
|
-
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$
|
|
98794
|
+
tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$2)));
|
|
98776
98795
|
}
|
|
98777
98796
|
|
|
98778
98797
|
if ((!configs.firstPerson) && configs.followPointer) {
|
|
@@ -99346,6 +99365,8 @@ class KeyboardPanRotateDollyHandler {
|
|
|
99346
99365
|
const SCALE_DOLLY_EACH_FRAME = 1; // Recalculate dolly speed for eye->target distance on each Nth frame
|
|
99347
99366
|
const EPSILON = 0.001;
|
|
99348
99367
|
const tempVec3$1 = math.vec3();
|
|
99368
|
+
const tempVec3a$4 = math.vec3();
|
|
99369
|
+
const tempVec3b$1 = math.vec3();
|
|
99349
99370
|
|
|
99350
99371
|
/**
|
|
99351
99372
|
* Handles camera updates on each "tick" that were scheduled by the various controllers.
|
|
@@ -99365,7 +99386,7 @@ class CameraUpdater {
|
|
|
99365
99386
|
let countDown = SCALE_DOLLY_EACH_FRAME; // Decrements on each tick
|
|
99366
99387
|
let dollyDistFactor = 1.0; // Calculated when countDown is zero
|
|
99367
99388
|
let followPointerWorldPos = null; // Holds the pointer's World position when configs.followPointer is true
|
|
99368
|
-
|
|
99389
|
+
|
|
99369
99390
|
this._onTick = scene.on("tick", () => {
|
|
99370
99391
|
|
|
99371
99392
|
if (!(configs.active && configs.pointerEnabled)) {
|
|
@@ -99426,7 +99447,7 @@ class CameraUpdater {
|
|
|
99426
99447
|
|
|
99427
99448
|
if (pickController.pickResult && pickController.pickResult.worldPos) {
|
|
99428
99449
|
followPointerWorldPos = pickController.pickResult.worldPos;
|
|
99429
|
-
|
|
99450
|
+
|
|
99430
99451
|
} else {
|
|
99431
99452
|
dollyDistFactor = 1.0;
|
|
99432
99453
|
followPointerWorldPos = null;
|
|
@@ -99646,6 +99667,13 @@ class CameraUpdater {
|
|
|
99646
99667
|
});
|
|
99647
99668
|
}
|
|
99648
99669
|
|
|
99670
|
+
isLookingDownwards(look, eye) {
|
|
99671
|
+
const camera = this._scene.camera;
|
|
99672
|
+
const forwardAxis = math.normalizeVec3(math.subVec3(look, eye, tempVec3a$4));
|
|
99673
|
+
const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$1);
|
|
99674
|
+
let rightAxisLen = math.sqLenVec3(rightAxis);
|
|
99675
|
+
return (Math.abs(rightAxisLen) <= 0.1);
|
|
99676
|
+
}
|
|
99649
99677
|
|
|
99650
99678
|
destroy() {
|
|
99651
99679
|
this._scene.off(this._onTick);
|
|
@@ -113375,6 +113403,8 @@ class NavCubePlugin extends Plugin {
|
|
|
113375
113403
|
* @param {Boolean} [cfg.fitVisible=false] Sets whether the axis, corner and edge-aligned views will fit the
|
|
113376
113404
|
* view to the entire {@link Scene} or just to visible object-{@link Entity}s. Entitys are visible objects when {@link Entity#isObject} and {@link Entity#visible} are both ````true````.
|
|
113377
113405
|
* @param {Boolean} [cfg.synchProjection=false] Sets whether the NavCube switches between perspective and orthographic projections in synchrony with the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
|
|
113406
|
+
* @param {Boolean} [cfg.isProjectNorth] sets whether the NavCube switches between true north and project north - using the project north offset angle.
|
|
113407
|
+
* @param {number} [cfg.projectNorthOffsetAngle] sets the NavCube project north offset angle - when the {@link isProjectNorth} is true.
|
|
113378
113408
|
*/
|
|
113379
113409
|
constructor(viewer, cfg = {}) {
|
|
113380
113410
|
|
|
@@ -113420,6 +113450,9 @@ class NavCubePlugin extends Plugin {
|
|
|
113420
113450
|
|
|
113421
113451
|
var self = this;
|
|
113422
113452
|
|
|
113453
|
+
this.setIsProjectNorth(cfg.isProjectNorth);
|
|
113454
|
+
this.setProjectNorthOffsetAngle(cfg.projectNorthOffsetAngle);
|
|
113455
|
+
|
|
113423
113456
|
this._synchCamera = (function () {
|
|
113424
113457
|
var matrix = math.rotationMat4c(-90 * math.DEGTORAD, 1, 0, 0);
|
|
113425
113458
|
var eyeLookVec = math.vec3();
|
|
@@ -113441,6 +113474,9 @@ class NavCubePlugin extends Plugin {
|
|
|
113441
113474
|
self._navCubeCamera.eye = eyeLookVec;
|
|
113442
113475
|
self._navCubeCamera.up = up;
|
|
113443
113476
|
}
|
|
113477
|
+
if (self._isProjectNorth && self._projectNorthOffsetAngle) {
|
|
113478
|
+
self._navCubeCamera.orbitYaw(self._projectNorthOffsetAngle);
|
|
113479
|
+
}
|
|
113444
113480
|
};
|
|
113445
113481
|
}());
|
|
113446
113482
|
|
|
@@ -113910,6 +113946,42 @@ class NavCubePlugin extends Plugin {
|
|
|
113910
113946
|
return this._synchProjection;
|
|
113911
113947
|
}
|
|
113912
113948
|
|
|
113949
|
+
/**
|
|
113950
|
+
* Sets whether the NavCube switches between project north and true north
|
|
113951
|
+
*
|
|
113952
|
+
* @param {Boolean} isProjectNorth Set ````true```` to use project north offset
|
|
113953
|
+
*/
|
|
113954
|
+
setIsProjectNorth(isProjectNorth = false) {
|
|
113955
|
+
this._isProjectNorth = isProjectNorth;
|
|
113956
|
+
}
|
|
113957
|
+
|
|
113958
|
+
/**
|
|
113959
|
+
* Gets whether the NavCube switches between project north and true north
|
|
113960
|
+
*
|
|
113961
|
+
* @return {Boolean} isProjectNorth when ````true```` - use project north offset
|
|
113962
|
+
*/
|
|
113963
|
+
getIsProjectNorth() {
|
|
113964
|
+
return this._isProjectNorth;
|
|
113965
|
+
}
|
|
113966
|
+
|
|
113967
|
+
/**
|
|
113968
|
+
* Sets the NavCube project north offset angle (used when {@link isProjectNorth} is ````true````
|
|
113969
|
+
*
|
|
113970
|
+
* @param {number} projectNorthOffsetAngle Set the vector offset for project north
|
|
113971
|
+
*/
|
|
113972
|
+
setProjectNorthOffsetAngle(projectNorthOffsetAngle) {
|
|
113973
|
+
this._projectNorthOffsetAngle = projectNorthOffsetAngle;
|
|
113974
|
+
}
|
|
113975
|
+
|
|
113976
|
+
/**
|
|
113977
|
+
* Gets the offset angle between project north and true north
|
|
113978
|
+
*
|
|
113979
|
+
* @return {number} projectNorthOffsetAngle
|
|
113980
|
+
*/
|
|
113981
|
+
getProjectNorthOffsetAngle() {
|
|
113982
|
+
return this._projectNorthOffsetAngle;
|
|
113983
|
+
}
|
|
113984
|
+
|
|
113913
113985
|
/**
|
|
113914
113986
|
* Destroys this NavCubePlugin.
|
|
113915
113987
|
*
|