|
@@ -76798,16 +76798,20 @@
|
|
|
if (e.intersect) {
|
|
|
var object = e.intersect.object || e.intersect.pointcloud;
|
|
|
var objects = this.getAllObjects();
|
|
|
+ var posInModel = Potree.Utils.datasetPosTransform({
|
|
|
+ toDataset: true,
|
|
|
+ position: e.intersect.location.clone(),
|
|
|
+ object
|
|
|
+ });
|
|
|
if (objects.includes(object) && this.selected != object) {
|
|
|
- var posInModel = Potree.Utils.datasetPosTransform({
|
|
|
- toDataset: true,
|
|
|
- position: e.intersect.location.clone(),
|
|
|
- object
|
|
|
- });
|
|
|
this.selectModel(object, posInModel);
|
|
|
} else {
|
|
|
//if(!viewer.inputHandler.selection[0]){//正在平移和旋转,不允许取消
|
|
|
- this.selectModel(null);
|
|
|
+ if (this.selected == object && this.transformControls.mode == 'translate') {
|
|
|
+ this.selectModel(object, posInModel); //update click pos
|
|
|
+ } else {
|
|
|
+ this.selectModel(null);
|
|
|
+ }
|
|
|
//}
|
|
|
}
|
|
|
} else {
|
|
@@ -77056,6 +77060,13 @@
|
|
|
model = this.selected;
|
|
|
state = false;
|
|
|
}
|
|
|
+ if (!by2d && model) {
|
|
|
+ model.dispatchEvent({
|
|
|
+ type: 'changeSelect',
|
|
|
+ selected: state,
|
|
|
+ clickPos: state
|
|
|
+ });
|
|
|
+ }
|
|
|
if (state) {
|
|
|
if (this.selected) {
|
|
|
if (this.selected == model) return;else {
|
|
@@ -77079,13 +77090,6 @@
|
|
|
this.transformControls.detach(); //viewer.transformObject(null);
|
|
|
//console.log('selectModel', null)
|
|
|
}
|
|
|
- if (!by2d && model) {
|
|
|
- model.dispatchEvent({
|
|
|
- type: 'changeSelect',
|
|
|
- selected: state,
|
|
|
- clickPos: state
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
updateBoxHelper(model) {
|
|
|
var size = new Vector3();
|
|
@@ -79873,7 +79877,7 @@
|
|
|
createMulAnimation(data) {
|
|
|
//新版,包含漫游点
|
|
|
var event_ = new EventDispatcher();
|
|
|
- var sections = []; //分段
|
|
|
+ var sections = []; //分段, 分成animation和漫游点
|
|
|
var aniIndex = 0;
|
|
|
var curAni,
|
|
|
addAnimation = () => {
|
|
@@ -79899,7 +79903,7 @@
|
|
|
data.points.forEach((e, i) => {
|
|
|
//切分为若干个animation,中间是漫游点的衔接
|
|
|
if (e.panoId != void 0) {
|
|
|
- //暂定,有panoId的都是全景图模式
|
|
|
+ //暂定:有panoId的都是全景图模式
|
|
|
var pano = e.model.panos.find(a => a.originID == e.panoId);
|
|
|
if (pano) {
|
|
|
addAnimation(); //如果前面是动画,先截断
|
|
@@ -79986,7 +79990,7 @@
|
|
|
duration,
|
|
|
callback: () => {
|
|
|
var next = () => {
|
|
|
- var stayTime = (!sections[index - 1] || sections[index + 1] instanceof CameraAnimation$1) && sections[index + 1] && sections[index + 1] instanceof CameraAnimation$1 ? 1000 : 300; //前后都是点云模式的话停留久一点。最好在页面上能设置
|
|
|
+ var stayTime = (!sections[index - 1] || sections[index - 1] instanceof CameraAnimation$1) && sections[index + 1] && sections[index + 1] instanceof CameraAnimation$1 ? 1000 : 300; //前后都是点云模式的话停留久一点。最好在页面上能设置
|
|
|
console.log('stayTime', stayTime);
|
|
|
setTimeout(() => {
|
|
|
currentPlay != void 0 && playNext(index + 1);
|