|
@@ -4239,7 +4239,7 @@
|
|
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
- var transitions$1 = {
|
|
|
|
|
|
+ var transitions = {
|
|
globalDone: null,
|
|
globalDone: null,
|
|
funcs: [],
|
|
funcs: [],
|
|
counter: 0,
|
|
counter: 0,
|
|
@@ -5258,15 +5258,15 @@
|
|
}
|
|
}
|
|
isFlying() {
|
|
isFlying() {
|
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
- var a = transitions$1.getById(this.FlyTransition).length > 0;
|
|
|
|
- var b = transitions$1.getById(this.LookTransition).length > 0;
|
|
|
|
|
|
+ var a = transitions.getById(this.FlyTransition).length > 0;
|
|
|
|
+ var b = transitions.getById(this.LookTransition).length > 0;
|
|
return type == 'pos' ? a : type == 'rotate' ? b : a || b;
|
|
return type == 'pos' ? a : type == 'rotate' ? b : a || b;
|
|
}
|
|
}
|
|
cancelFlying() {
|
|
cancelFlying() {
|
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
|
|
var dealCancel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
var dealCancel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
//外界只能通过这个来cancel
|
|
//外界只能通过这个来cancel
|
|
- type == 'pos' ? transitions$1.cancelById(this.FlyTransition, dealCancel) : type == 'rotate' ? transitions$1.cancelById(this.LookTransition, dealCancel) : (transitions$1.cancelById(this.FlyTransition, dealCancel), transitions$1.cancelById(this.LookTransition, dealCancel));
|
|
|
|
|
|
+ type == 'pos' ? transitions.cancelById(this.FlyTransition, dealCancel) : type == 'rotate' ? transitions.cancelById(this.LookTransition, dealCancel) : (transitions.cancelById(this.FlyTransition, dealCancel), transitions.cancelById(this.LookTransition, dealCancel));
|
|
//console.log('cancelFlying ' , this.sid, type)
|
|
//console.log('cancelFlying ' , this.sid, type)
|
|
}
|
|
}
|
|
setView() {
|
|
setView() {
|
|
@@ -5357,7 +5357,7 @@
|
|
var posChange = !this.position.equals(endPosition);
|
|
var posChange = !this.position.equals(endPosition);
|
|
if (posChange) {
|
|
if (posChange) {
|
|
posWaitDone = true;
|
|
posWaitDone = true;
|
|
- transitions$1.start(lerp.vector(this.position, endPosition, (pos, progress, delta) => {
|
|
|
|
|
|
+ transitions.start(lerp.vector(this.position, endPosition, (pos, progress, delta) => {
|
|
info.onUpdate && info.onUpdate(progress, delta);
|
|
info.onUpdate && info.onUpdate(progress, delta);
|
|
}), info.duration, posDone, 0, info.Easing ? easing[info.Easing] : easing.easeInOutSine, null, this.FlyTransition, () => {
|
|
}), info.duration, posDone, 0, info.Easing ? easing[info.Easing] : easing.easeInOutSine, null, this.FlyTransition, () => {
|
|
//中途取消
|
|
//中途取消
|
|
@@ -5375,7 +5375,7 @@
|
|
}
|
|
}
|
|
if (endQuaternion || endYaw != void 0) {
|
|
if (endQuaternion || endYaw != void 0) {
|
|
rotWaitDone = true;
|
|
rotWaitDone = true;
|
|
- transitions$1.start((progress, delta) => {
|
|
|
|
|
|
+ transitions.start((progress, delta) => {
|
|
if (endYaw != void 0) {
|
|
if (endYaw != void 0) {
|
|
this.yaw = startYaw * (1 - progress) + endYaw * progress;
|
|
this.yaw = startYaw * (1 - progress) + endYaw * progress;
|
|
this.pitch = startPitch * (1 - progress) + endPitch * progress;
|
|
this.pitch = startPitch * (1 - progress) + endPitch * progress;
|
|
@@ -5469,7 +5469,7 @@
|
|
|
|
|
|
var startZoom = camera.zoom;
|
|
var startZoom = camera.zoom;
|
|
var pointerPos = new Vector3(pointer.x, pointer.y, 0.5);
|
|
var pointerPos = new Vector3(pointer.x, pointer.y, 0.5);
|
|
- transitions$1.start(progress => {
|
|
|
|
|
|
+ transitions.start(progress => {
|
|
var oldPos = pointerPos.clone().unproject(camera);
|
|
var oldPos = pointerPos.clone().unproject(camera);
|
|
this.zoom = camera.zoom = endZoom * progress + startZoom * (1 - progress);
|
|
this.zoom = camera.zoom = endZoom * progress + startZoom * (1 - progress);
|
|
camera.updateProjectionMatrix();
|
|
camera.updateProjectionMatrix();
|
|
@@ -27075,7 +27075,7 @@
|
|
hoverOn() {
|
|
hoverOn() {
|
|
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
//console.log("hoverOn " + this.id )
|
|
//console.log("hoverOn " + this.id )
|
|
- transitions$1.start(lerp.property(this.marker.material, "opacity", markerOpacitys.hovered, () => {
|
|
|
|
|
|
+ transitions.start(lerp.property(this.marker.material, "opacity", markerOpacitys.hovered, () => {
|
|
viewer.dispatchEvent('content_changed');
|
|
viewer.dispatchEvent('content_changed');
|
|
}), this.marker.visible ? 250 : 0);
|
|
}), this.marker.visible ? 250 : 0);
|
|
if (!e.byMap) this.dispatchEvent({
|
|
if (!e.byMap) this.dispatchEvent({
|
|
@@ -27091,7 +27091,7 @@
|
|
hoverOff() {
|
|
hoverOff() {
|
|
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
//console.log("hoverOff " + this.id )
|
|
//console.log("hoverOff " + this.id )
|
|
- transitions$1.start(lerp.property(this.marker.material, "opacity", markerOpacitys.default, () => {
|
|
|
|
|
|
+ transitions.start(lerp.property(this.marker.material, "opacity", markerOpacitys.default, () => {
|
|
viewer.dispatchEvent('content_changed');
|
|
viewer.dispatchEvent('content_changed');
|
|
}), this.marker.visible ? 250 : 0);
|
|
}), this.marker.visible ? 250 : 0);
|
|
if (!e.byMap) this.dispatchEvent({
|
|
if (!e.byMap) this.dispatchEvent({
|
|
@@ -32163,7 +32163,7 @@
|
|
var level = currentLevel * (1 - progress) + aimLevel * progress;
|
|
var level = currentLevel * (1 - progress) + aimLevel * progress;
|
|
this.zoomTo(level, !0);
|
|
this.zoomTo(level, !0);
|
|
};
|
|
};
|
|
- transitions$1.start(fun, dur, null, null, 0, easing['easeInOutQuad']);
|
|
|
|
|
|
+ transitions.start(fun, dur, null, null, 0, easing['easeInOutQuad']);
|
|
}
|
|
}
|
|
updateZoomPano() {
|
|
updateZoomPano() {
|
|
if (!this.panoRenderer.zoomPanoRenderingDisabled && Potree.settings.displayMode == 'showPanos') {
|
|
if (!this.panoRenderer.zoomPanoRenderingDisabled && Potree.settings.displayMode == 'showPanos') {
|
|
@@ -79916,9 +79916,9 @@
|
|
useDurSlice: data.useDurSlice,
|
|
useDurSlice: data.useDurSlice,
|
|
points: curAni
|
|
points: curAni
|
|
};
|
|
};
|
|
- var ani = createAnimation(data_);
|
|
|
|
|
|
+ var ani = this.createAnimation(data_);
|
|
sections.push(ani);
|
|
sections.push(ani);
|
|
- ani.originIndexStart = data.indexOf(curAni[0]);
|
|
|
|
|
|
+ ani.originIndexStart = data.points.indexOf(curAni[0]);
|
|
ani.addEventListener('updateCurrentIndex', e => {
|
|
ani.addEventListener('updateCurrentIndex', e => {
|
|
emitIndex(e.currentIndex);
|
|
emitIndex(e.currentIndex);
|
|
});
|
|
});
|
|
@@ -79927,11 +79927,13 @@
|
|
};
|
|
};
|
|
data.points.forEach((e, i) => {
|
|
data.points.forEach((e, i) => {
|
|
//切分为若干个animation,中间是漫游点的衔接
|
|
//切分为若干个animation,中间是漫游点的衔接
|
|
- if (e.inPano) {
|
|
|
|
|
|
+ if (e.panoId != void 0) {
|
|
|
|
+ //暂定,有panoId的都是全景图模式
|
|
var pano = e.model.panos.find(a => a.originID == e.panoId);
|
|
var pano = e.model.panos.find(a => a.originID == e.panoId);
|
|
if (pano) {
|
|
if (pano) {
|
|
addAnimation(); //如果前面是动画,先截断
|
|
addAnimation(); //如果前面是动画,先截断
|
|
e.pano = pano;
|
|
e.pano = pano;
|
|
|
|
+ e.rotInModel = new Quaternion().fromArray(e.rotInModel);
|
|
e.quaternion = Potree.Utils.datasetRotTransform({
|
|
e.quaternion = Potree.Utils.datasetRotTransform({
|
|
fromDataset: true,
|
|
fromDataset: true,
|
|
quaternion: e.rotInModel,
|
|
quaternion: e.rotInModel,
|
|
@@ -79965,7 +79967,7 @@
|
|
if (ani instanceof CameraAnimation$1) {
|
|
if (ani instanceof CameraAnimation$1) {
|
|
currentIndex = ani.originIndexStart + indexInAni;
|
|
currentIndex = ani.originIndexStart + indexInAni;
|
|
} else {
|
|
} else {
|
|
- currentIndex = data.indexOf(ani);
|
|
|
|
|
|
+ currentIndex = Math.max(0, data.points.indexOf(ani) - 1);
|
|
}
|
|
}
|
|
event_.dispatchEvent({
|
|
event_.dispatchEvent({
|
|
type: 'updateCurrentIndex',
|
|
type: 'updateCurrentIndex',
|
|
@@ -79993,36 +79995,38 @@
|
|
});
|
|
});
|
|
ani.play();
|
|
ani.play();
|
|
} else {
|
|
} else {
|
|
|
|
+ var pano = ani.pano;
|
|
var last = sections[index - 1],
|
|
var last = sections[index - 1],
|
|
duration,
|
|
duration,
|
|
quaternion = ani.quaternion;
|
|
quaternion = ani.quaternion;
|
|
if (last) {
|
|
if (last) {
|
|
- var pano = ani.pano;
|
|
|
|
if (last instanceof CameraAnimation$1) {
|
|
if (last instanceof CameraAnimation$1) {
|
|
duration = last.durations[last.durations.length - 1]; //最后一个时间
|
|
duration = last.durations[last.durations.length - 1]; //最后一个时间
|
|
} else {
|
|
} else {
|
|
duration = last.time;
|
|
duration = last.time;
|
|
}
|
|
}
|
|
duration *= 1000;
|
|
duration *= 1000;
|
|
- viewer.images360.flyToPano({
|
|
|
|
- pano,
|
|
|
|
- quaternion,
|
|
|
|
- duration,
|
|
|
|
- callback: () => {
|
|
|
|
- if (ani.displayMode == 'showPanos' && potree.settings.displayMode != 'showPanos') {
|
|
|
|
- //刚加载完就飞走吗?
|
|
|
|
- potree.settings.displayMode = 'showPanos';
|
|
|
|
- viewer.images360.addEventListener('endChangeMode', () => {
|
|
|
|
- currentPlay != void 0 && playNext(index + 1);
|
|
|
|
- }, {
|
|
|
|
- once: true
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
|
|
+ } else {
|
|
|
|
+ duration = 600; //起始
|
|
|
|
+ }
|
|
|
|
+ viewer.images360.flyToPano({
|
|
|
|
+ pano,
|
|
|
|
+ quaternion,
|
|
|
|
+ duration,
|
|
|
|
+ callback: () => {
|
|
|
|
+ if ( /* ani.displayMode == 'showPanos' && */Potree.settings.displayMode != 'showPanos') {
|
|
|
|
+ //刚加载完就飞走吗?
|
|
|
|
+ Potree.settings.displayMode = 'showPanos';
|
|
|
|
+ viewer.images360.addEventListener('endChangeMode', () => {
|
|
currentPlay != void 0 && playNext(index + 1);
|
|
currentPlay != void 0 && playNext(index + 1);
|
|
- }
|
|
|
|
|
|
+ }, {
|
|
|
|
+ once: true
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ currentPlay != void 0 && playNext(index + 1);
|
|
}
|
|
}
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
};
|
|
};
|
|
playNext(0);
|
|
playNext(0);
|
|
@@ -80038,7 +80042,7 @@
|
|
view.cancelFlying('rotate');
|
|
view.cancelFlying('rotate');
|
|
} else {
|
|
} else {
|
|
//加快结束
|
|
//加快结束
|
|
- var o = transitions.getById(view.FlyTransition);
|
|
|
|
|
|
+ var o = transitions.getById(view.FlyTransition)[0];
|
|
var restDur = o.duration - o.current;
|
|
var restDur = o.duration - o.current;
|
|
var hopeStopTime = 300; //希望最多等待时间
|
|
var hopeStopTime = 300; //希望最多等待时间
|
|
if (restDur > hopeStopTime) {
|
|
if (restDur > hopeStopTime) {
|
|
@@ -80054,7 +80058,7 @@
|
|
remove() {
|
|
remove() {
|
|
sections.forEach(ani => {
|
|
sections.forEach(ani => {
|
|
if (ani instanceof CameraAnimation$1) {
|
|
if (ani instanceof CameraAnimation$1) {
|
|
- this.removeAnimation(ani);
|
|
|
|
|
|
+ CamAniEditor.removeAnimation(ani);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -83100,7 +83104,7 @@
|
|
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500;
|
|
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500;
|
|
if (this.hidden) return;
|
|
if (this.hidden) return;
|
|
this.hidden = !0;
|
|
this.hidden = !0;
|
|
- transitions$1.start(lerp.property(this.material, "opacity", 0, () => {
|
|
|
|
|
|
+ transitions.start(lerp.property(this.material, "opacity", 0, () => {
|
|
//progress
|
|
//progress
|
|
this.dispatchEvent({
|
|
this.dispatchEvent({
|
|
type: 'update'
|
|
type: 'update'
|
|
@@ -83125,7 +83129,7 @@
|
|
//console.log("show Reticule")
|
|
//console.log("show Reticule")
|
|
this.hidden = !1;
|
|
this.hidden = !1;
|
|
if (this.material.opacity <= 0) {
|
|
if (this.material.opacity <= 0) {
|
|
- transitions$1.start(lerp.property(this.material, "opacity", defaultOpacity, () => {
|
|
|
|
|
|
+ transitions.start(lerp.property(this.material, "opacity", defaultOpacity, () => {
|
|
//progress
|
|
//progress
|
|
this.dispatchEvent({
|
|
this.dispatchEvent({
|
|
type: 'update'
|
|
type: 'update'
|
|
@@ -88971,7 +88975,7 @@
|
|
update(delta, timestamp) {
|
|
update(delta, timestamp) {
|
|
viewer.addTimeMark('update', 'start');
|
|
viewer.addTimeMark('update', 'start');
|
|
TWEEN.update(timestamp);
|
|
TWEEN.update(timestamp);
|
|
- transitions$1.update(delta); //写在开头,因为这时候最为固定,计时准确
|
|
|
|
|
|
+ transitions.update(delta); //写在开头,因为这时候最为固定,计时准确
|
|
|
|
|
|
this.dispatchEvent({
|
|
this.dispatchEvent({
|
|
type: 'update_start',
|
|
type: 'update_start',
|
|
@@ -91767,11 +91771,11 @@
|
|
this.addEventListener('global_mousedown', startPlay);
|
|
this.addEventListener('global_mousedown', startPlay);
|
|
}
|
|
}
|
|
Potree.settings.zoom.enabled = false;
|
|
Potree.settings.zoom.enabled = false;
|
|
- transitions$1.start(lerp.property(plane.material, "opacity", 1), e.toPano.duration * 0.4, () => {}, 0, easing['easeInOutQuad']);
|
|
|
|
|
|
+ transitions.start(lerp.property(plane.material, "opacity", 1), e.toPano.duration * 0.4, () => {}, 0, easing['easeInOutQuad']);
|
|
}, e.toPano.duration * 0.6); //时间上不能和消失的重叠 延迟
|
|
}, e.toPano.duration * 0.6); //时间上不能和消失的重叠 延迟
|
|
} else {
|
|
} else {
|
|
//消失
|
|
//消失
|
|
- transitions$1.start(lerp.property(plane.material, "opacity", 0), e.toPano.duration * 0.4, () => {
|
|
|
|
|
|
+ transitions.start(lerp.property(plane.material, "opacity", 0), e.toPano.duration * 0.4, () => {
|
|
if (!info) {
|
|
if (!info) {
|
|
plane.visible = false;
|
|
plane.visible = false;
|
|
video.pause();
|
|
video.pause();
|