@kimap/indoor-positioning-sdk-vue2 5.8.2 → 5.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimap/indoor-positioning-sdk-vue2",
3
- "version": "5.8.2",
3
+ "version": "5.8.3",
4
4
  "description": "Vue2自包含室内定位SDK - 完全兼容Webpack3+Babel6 | Vue2 Self-Contained Indoor Positioning SDK",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -421,7 +421,8 @@ 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
- // 逐层累积高度:计算该楼层在 ALL 模式下的世界 Y 偏移
424
+ // 逐层累积高度:ALL 模式时,每层 = 前几层高度 + floorHeight 间隙
425
+ // 这样 ALL 有间隙,单层模式时把 group.position.y = -floorY 就贴地了
425
426
  var floorY = 0;
426
427
  for (var i = 0; i < floorIndex; i++) {
427
428
  var prevGroup = self.floorGroups[i];
@@ -431,14 +432,17 @@ SceneCore.prototype._processLoadedModelToGroup = function(object, materials, col
431
432
  }
432
433
  }
433
434
 
435
+ // 加固定间隙高度(除第一个楼层外)
436
+ var totalFloorY = floorY + floorIndex * self.floorHeight;
437
+
434
438
  // 所有楼层的 object 底部(box.min.y)对齐到本地 Y=0,统一基准
435
439
  object.position.set(-box.min.x, -box.min.y, -box.min.z);
436
440
 
437
- // ALL 模式时 floorGroup.position.y 持有累积偏移(含间隙)
438
- floorGroup.position.y = floorY;
441
+ // ALL 模式时 floorGroup.position.y 持有含间隙的累积偏移
442
+ floorGroup.position.y = totalFloorY;
439
443
 
440
- // 记录每个楼层的原始世界 Y 偏移(单层模式时用于将选中层拽回 Y=0)
441
- self.floorOriginalY[floorIndex] = floorY;
444
+ // 记录含间隙的总世界 Y 偏移(单层模式 showSingleFloor 用 group.y = -originalY 拽回 Y=0)
445
+ self.floorOriginalY[floorIndex] = totalFloorY;
442
446
 
443
447
  // 为该楼层创建独立的文字组
444
448
  var textGroup = new THREE.Group();