|
@@ -106,7 +106,7 @@ Viewer.prototype.hasChanged = function () {//判断画面是否改变了,改
|
|
|
|
|
|
if (!this.previousState) {
|
|
if (!this.previousState) {
|
|
copy()
|
|
copy()
|
|
- return { cameraChanged: !0, changeSlightly: !1 };
|
|
|
|
|
|
+ return { cameraChanged: !0/* , changeSlightly: !1 */ };
|
|
}
|
|
}
|
|
var cameraChanged =
|
|
var cameraChanged =
|
|
!this.camera.projectionMatrix.equals(this.previousState.projectionMatrix) ||
|
|
!this.camera.projectionMatrix.equals(this.previousState.projectionMatrix) ||
|
|
@@ -115,14 +115,14 @@ Viewer.prototype.hasChanged = function () {//判断画面是否改变了,改
|
|
|
|
|
|
|
|
|
|
//var changed = cameraChanged //|| !this.mouse.equals(this.previousState.mouse)
|
|
//var changed = cameraChanged //|| !this.mouse.equals(this.previousState.mouse)
|
|
- let changeSlightly
|
|
|
|
|
|
+ /* let changeSlightly
|
|
if (cameraChanged) {
|
|
if (cameraChanged) {
|
|
changeSlightly = math.closeTo(this.camera.position, this.previousState.position, 1e-2) &&
|
|
changeSlightly = math.closeTo(this.camera.position, this.previousState.position, 1e-2) &&
|
|
math.closeTo(this.camera.quaternion, this.previousState.quaternion, 1e-3)
|
|
math.closeTo(this.camera.quaternion, this.previousState.quaternion, 1e-3)
|
|
- }
|
|
|
|
|
|
+ } */
|
|
copy()
|
|
copy()
|
|
|
|
|
|
- return { cameraChanged, changeSlightly };
|
|
|
|
|
|
+ return { cameraChanged/* , changeSlightly */};
|
|
}
|
|
}
|
|
|
|
|
|
Viewer.prototype.setSize = function () {
|
|
Viewer.prototype.setSize = function () {
|
|
@@ -167,7 +167,7 @@ Viewer.prototype.animate = function () {
|
|
|
|
|
|
let changed = this.hasChanged()
|
|
let changed = this.hasChanged()
|
|
if (changed.cameraChanged) {
|
|
if (changed.cameraChanged) {
|
|
- this.dispatchEvent({ type: 'view.changed', changeSlightly: changed.changeSlightly })
|
|
|
|
|
|
+ this.dispatchEvent({ type: 'view.changed'/* , changeSlightly: changed.changeSlightly */ })
|
|
delayNeedUpdated = true
|
|
delayNeedUpdated = true
|
|
|
|
|
|
if( !transitions.funcs.some(function (e) { return e.name === 'cameraFly' })){
|
|
if( !transitions.funcs.some(function (e) { return e.name === 'cameraFly' })){
|