Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
pchen66 committed Jun 12, 2019
1 parent 1bcbea3 commit f829b72
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 70 deletions.
34 changes: 22 additions & 12 deletions build/panolens.js
Original file line number Diff line number Diff line change
Expand Up @@ -4905,9 +4905,11 @@

} else {

if ( !video.querySelectorAll( 'source' ).length || !video.src ) {
if ( video.querySelectorAll( 'source' ).length === 0 ) {

video.src = this.src;
const source = document.createElement( 'source' );
source.src = this.src;
video.appendChild( source );

}

Expand Down Expand Up @@ -5202,7 +5204,6 @@

const { material: { map } } = this;

this.resetVideo();
this.pauseVideo();

this.removeEventListener( 'leave', this.pauseVideo.bind( this ) );
Expand Down Expand Up @@ -7384,8 +7385,6 @@
*/
function Viewer ( options ) {

THREE.EventDispatcher.call( this );

let container;

options = options || {};
Expand Down Expand Up @@ -7595,7 +7594,7 @@

if ( arguments.length > 1 ) {

for ( var i = 0; i < arguments.length; i ++ ) {
for ( let i = 0; i < arguments.length; i ++ ) {

this.add( arguments[ i ] );

Expand Down Expand Up @@ -8459,7 +8458,7 @@
duration = duration !== undefined ? duration : 1000;
easing = easing || Tween.Easing.Exponential.Out;

var scope, ha, va, chv, cvv, hv, vv, vptc, ov, nv;
let scope, ha, va, chv, cvv, hv, vv, vptc, ov, nv;

scope = this;

Expand Down Expand Up @@ -8532,7 +8531,7 @@

if ( isUnderScalePlaceHolder ) {

var invertXVector = new THREE.Vector3( -1, 1, 1 );
const invertXVector = new THREE.Vector3( -1, 1, 1 );

this.tweenControlCenter( object.getWorldPosition( new THREE.Vector3() ).multiply( invertXVector ), duration, easing );

Expand Down Expand Up @@ -8994,7 +8993,7 @@

let intersect;

for ( var i = 0; i < intersects.length; i++ ) {
for ( let i = 0; i < intersects.length; i++ ) {

if ( intersects[i].distance >= 0 && intersects[i].object && !intersects[i].object.passThrough ) {

Expand Down Expand Up @@ -9276,21 +9275,32 @@
*/
dispose: function () {

this.tweenLeftAnimation.stop();
this.tweenUpAnimation.stop();

// Unregister dom event listeners
this.unregisterEventListeners();

// recursive disposal on 3d objects
function recursiveDispose ( object ) {

for ( var i = object.children.length - 1; i >= 0; i-- ) {
for ( let i = object.children.length - 1; i >= 0; i-- ) {

recursiveDispose( object.children[i] );
object.remove( object.children[i] );

}

object.dispose();
object = null;
if ( object instanceof Panorama || object instanceof Infospot ) {

object.dispose();
object = null;

} else if ( object.dispatchEvent ){

object.dispatchEvent( 'dispose' );

}

}

Expand Down
Loading

0 comments on commit f829b72

Please sign in to comment.