@xeokit/xeokit-sdk 2.2.5-beta → 2.2.5-beta-1

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.
@@ -65119,41 +65119,37 @@ class PerformanceModel extends Component {
65119
65119
 
65120
65120
  let needNewBatchingLayers = false;
65121
65121
 
65122
- let origin = null;
65122
+ const origin = math.vec3(this._origin);
65123
65123
 
65124
+ const cfgOrigin = cfg.origin || cfg.rtcCenter;
65125
+ if (cfgOrigin) {
65126
+ math.addVec3(origin, cfgOrigin, origin);
65127
+ }
65128
+
65129
+ let rtcOrigin = null;
65124
65130
  if (!cfg.positionsDecodeMatrix) { // TODO: Assumes we never quantize double-precision coordinates
65125
65131
  const rtcCenter = math.vec3();
65126
65132
  const rtcPositions = [];
65127
65133
  const rtcNeeded = worldToRTCPositions(positions, rtcPositions, rtcCenter);
65128
65134
  if (rtcNeeded) {
65129
65135
  positions = rtcPositions;
65130
- origin = math.addVec3(this._origin, rtcCenter, rtcCenter);
65136
+ rtcOrigin = rtcCenter;
65131
65137
  }
65132
65138
  }
65133
-
65134
- const cfgOrigin = cfg.origin || cfg.rtcCenter;
65135
- if (cfgOrigin) {
65136
- if (!origin) {
65137
- origin = cfgOrigin;
65138
- } else {
65139
- origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$9);
65140
- }
65141
- } else {
65142
- origin = this._origin;
65139
+ if (rtcOrigin) {
65140
+ math.addVec3(origin, rtcOrigin, origin);
65143
65141
  }
65144
65142
 
65145
- if (origin) {
65146
- if (!this._lastOrigin) {
65143
+ if (!this._lastOrigin) {
65144
+ needNewBatchingLayers = true;
65145
+ this._lastOrigin = math.vec3(origin);
65146
+ } else {
65147
+ if (!math.compareVec3(this._lastOrigin, origin)) {
65147
65148
  needNewBatchingLayers = true;
65148
- this._lastOrigin = math.vec3(origin);
65149
- } else {
65150
- if (!math.compareVec3(this._lastOrigin, origin)) {
65151
- needNewBatchingLayers = true;
65152
- this._lastOrigin.set(origin);
65153
- }
65149
+ this._lastOrigin.set(origin);
65154
65150
  }
65155
65151
  }
65156
-
65152
+
65157
65153
  if (cfg.positionsDecodeMatrix) {
65158
65154
  if (!this._lastDecodeMatrix) {
65159
65155
  needNewBatchingLayers = true;
@@ -65115,41 +65115,37 @@ class PerformanceModel extends Component {
65115
65115
 
65116
65116
  let needNewBatchingLayers = false;
65117
65117
 
65118
- let origin = null;
65118
+ const origin = math.vec3(this._origin);
65119
65119
 
65120
+ const cfgOrigin = cfg.origin || cfg.rtcCenter;
65121
+ if (cfgOrigin) {
65122
+ math.addVec3(origin, cfgOrigin, origin);
65123
+ }
65124
+
65125
+ let rtcOrigin = null;
65120
65126
  if (!cfg.positionsDecodeMatrix) { // TODO: Assumes we never quantize double-precision coordinates
65121
65127
  const rtcCenter = math.vec3();
65122
65128
  const rtcPositions = [];
65123
65129
  const rtcNeeded = worldToRTCPositions(positions, rtcPositions, rtcCenter);
65124
65130
  if (rtcNeeded) {
65125
65131
  positions = rtcPositions;
65126
- origin = math.addVec3(this._origin, rtcCenter, rtcCenter);
65132
+ rtcOrigin = rtcCenter;
65127
65133
  }
65128
65134
  }
65129
-
65130
- const cfgOrigin = cfg.origin || cfg.rtcCenter;
65131
- if (cfgOrigin) {
65132
- if (!origin) {
65133
- origin = cfgOrigin;
65134
- } else {
65135
- origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$9);
65136
- }
65137
- } else {
65138
- origin = this._origin;
65135
+ if (rtcOrigin) {
65136
+ math.addVec3(origin, rtcOrigin, origin);
65139
65137
  }
65140
65138
 
65141
- if (origin) {
65142
- if (!this._lastOrigin) {
65139
+ if (!this._lastOrigin) {
65140
+ needNewBatchingLayers = true;
65141
+ this._lastOrigin = math.vec3(origin);
65142
+ } else {
65143
+ if (!math.compareVec3(this._lastOrigin, origin)) {
65143
65144
  needNewBatchingLayers = true;
65144
- this._lastOrigin = math.vec3(origin);
65145
- } else {
65146
- if (!math.compareVec3(this._lastOrigin, origin)) {
65147
- needNewBatchingLayers = true;
65148
- this._lastOrigin.set(origin);
65149
- }
65145
+ this._lastOrigin.set(origin);
65150
65146
  }
65151
65147
  }
65152
-
65148
+
65153
65149
  if (cfg.positionsDecodeMatrix) {
65154
65150
  if (!this._lastDecodeMatrix) {
65155
65151
  needNewBatchingLayers = true;