|
@@ -346,6 +346,20 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
|
|
|
|
|
|
let sdk = {
|
|
|
sceneBus, mapBus,
|
|
|
+
|
|
|
+
|
|
|
+ canTurnToPanoMode(pos) {
|
|
|
+ pos = pos ? new THREE.Vector3().copy(pos) : viewer.images360.position
|
|
|
+
|
|
|
+ let pano = viewer.images360.findNearestPano(pos)
|
|
|
+ if (pano && pano.position.distanceTo(pos) < Potree.config.panoFieldRadius) {
|
|
|
+ return {pano.pointcloud.result_}
|
|
|
+ }
|
|
|
+ //poschange后会调用这个,如果返回false会变为点云模式,且不会自动变回原先的模式
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
getPositionByScreen(pos2d, hopeModelId) {//通过屏幕坐标获取真实坐标 . hopeModelId: 如果指定了模型,优先返回hopeModelId上的intersect
|
|
|
//console.log('getPositionByScreen',hopeModelId)
|
|
|
hopeModelId = null
|
|
@@ -667,6 +681,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
|
|
|
let model
|
|
|
let done = (model_) => {
|
|
|
model = model_
|
|
|
+ model.result_ = result
|
|
|
if (!props.isFirstLoad) {
|
|
|
model.visible = false//先不显示,防止卡顿
|
|
|
}
|