@kimap/indoor-positioning-sdk-vue2 3.1.1 → 3.1.2
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 +1 -1
- package/src/KimapCore.browser.js +8 -2
package/package.json
CHANGED
package/src/KimapCore.browser.js
CHANGED
|
@@ -829,7 +829,10 @@
|
|
|
829
829
|
|
|
830
830
|
this.customDOMs[config.id] = {
|
|
831
831
|
element: el,
|
|
832
|
-
|
|
832
|
+
// 兼容 THREE.Vector3 和普通 {x,y,z} 对象
|
|
833
|
+
position: config.position.clone
|
|
834
|
+
? config.position.clone()
|
|
835
|
+
: new THREE.Vector3(config.position.x, config.position.y, config.position.z),
|
|
833
836
|
offset: config.offset || { x: 0, y: 0 }
|
|
834
837
|
};
|
|
835
838
|
|
|
@@ -918,7 +921,10 @@
|
|
|
918
921
|
};
|
|
919
922
|
|
|
920
923
|
KimapSDK.prototype.worldToScreen = function(position) {
|
|
921
|
-
|
|
924
|
+
// 兼容 THREE.Vector3 和普通 {x,y,z} 对象
|
|
925
|
+
var vector = position.clone
|
|
926
|
+
? position.clone()
|
|
927
|
+
: new THREE.Vector3(position.x, position.y, position.z);
|
|
922
928
|
vector.project(this.core.camera);
|
|
923
929
|
|
|
924
930
|
var rect = this.core.renderer.domElement.getBoundingClientRect();
|