@kimap/indoor-positioning-sdk-vue2 5.7.6 → 5.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimap/indoor-positioning-sdk-vue2",
3
- "version": "5.7.6",
3
+ "version": "5.7.7",
4
4
  "description": "Vue2自包含室内定位SDK - 完全兼容Webpack3+Babel6 | Vue2 Self-Contained Indoor Positioning SDK",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -421,7 +421,7 @@ SceneCore.prototype._processLoadedModelToGroup = function(object, materials, col
421
421
  var box = new THREE.Box3().setFromObject(object);
422
422
  var boxHeight = box.max.y - box.min.y;
423
423
 
424
- // 逐层累积高度:每个楼层的地面 = 前几个楼层的总高度
424
+ // 逐层累积高度:计算该楼层在 ALL 模式下的世界 Y 偏移
425
425
  var floorY = 0;
426
426
  for (var i = 0; i < floorIndex; i++) {
427
427
  var prevGroup = self.floorGroups[i];
@@ -431,11 +431,13 @@ SceneCore.prototype._processLoadedModelToGroup = function(object, materials, col
431
431
  }
432
432
  }
433
433
 
434
- // 修正当前楼层的 Y 偏移:使用 box.max.y(顶面高度)作为该楼层占据的高度基准,
435
- // 这样每个楼层的地面(min.y)都对齐到正确的世界高度
436
- object.position.set(-box.min.x, floorY - box.min.y, -box.min.z);
434
+ // 所有楼层的 object 底部(box.min.y)对齐到本地 Y=0,统一基准
435
+ object.position.set(-box.min.x, -box.min.y, -box.min.z);
437
436
 
438
- // 记录每个楼层的原始世界 Y 偏移(ALL 模式时使用)
437
+ // ALL 模式时 floorGroup.position.y 持有累积偏移(含间隙)
438
+ floorGroup.position.y = floorY;
439
+
440
+ // 记录每个楼层的原始世界 Y 偏移(单层模式时用于将选中层拽回 Y=0)
439
441
  self.floorOriginalY[floorIndex] = floorY;
440
442
 
441
443
  // 复用 backup 的材质处理策略,不改渲染风格