three-render-objects 1.28.4 → 1.28.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // Version 1.28.4 three-render-objects - https://github.com/vasturiano/three-render-objects
1
+ // Version 1.28.5 three-render-objects - https://github.com/vasturiano/three-render-objects
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('three')) :
4
4
  typeof define === 'function' && define.amd ? define(['three'], factory) :
@@ -1100,6 +1100,7 @@
1100
1100
 
1101
1101
  const lastPosition = new three$1.Vector3();
1102
1102
  const lastQuaternion = new three$1.Quaternion();
1103
+ const lastTargetPosition = new three$1.Vector3();
1103
1104
 
1104
1105
  const twoPI = 2 * Math.PI;
1105
1106
 
@@ -1213,12 +1214,15 @@
1213
1214
 
1214
1215
  if ( zoomChanged ||
1215
1216
  lastPosition.distanceToSquared( scope.object.position ) > EPS ||
1216
- 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) {
1217
+ 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ||
1218
+ lastTargetPosition.distanceToSquared( scope.target ) > 0 ) {
1217
1219
 
1218
1220
  scope.dispatchEvent( _changeEvent$1 );
1219
1221
 
1220
1222
  lastPosition.copy( scope.object.position );
1221
1223
  lastQuaternion.copy( scope.object.quaternion );
1224
+ lastTargetPosition.copy( scope.target );
1225
+
1222
1226
  zoomChanged = false;
1223
1227
 
1224
1228
  return true;
@@ -2477,6 +2481,8 @@
2477
2481
 
2478
2482
  const CopyShader = {
2479
2483
 
2484
+ name: 'CopyShader',
2485
+
2480
2486
  uniforms: {
2481
2487
 
2482
2488
  'tDiffuse': { value: null },
@@ -2609,6 +2615,7 @@
2609
2615
 
2610
2616
  this.material = new three$1.ShaderMaterial( {
2611
2617
 
2618
+ name: ( shader.name !== undefined ) ? shader.name : 'unspecified',
2612
2619
  defines: Object.assign( {}, shader.defines ),
2613
2620
  uniforms: this.uniforms,
2614
2621
  vertexShader: shader.vertexShader,
@@ -2770,7 +2777,7 @@
2770
2777
  this._width = size.width;
2771
2778
  this._height = size.height;
2772
2779
 
2773
- renderTarget = new three$1.WebGLRenderTarget( this._width * this._pixelRatio, this._height * this._pixelRatio );
2780
+ renderTarget = new three$1.WebGLRenderTarget( this._width * this._pixelRatio, this._height * this._pixelRatio, { type: three$1.HalfFloatType } );
2774
2781
  renderTarget.texture.name = 'EffectComposer.rt1';
2775
2782
 
2776
2783
  } else {
@@ -4615,18 +4622,6 @@
4615
4622
  };
4616
4623
  return Tween;
4617
4624
  }());
4618
-
4619
- var VERSION = '20.0.3';
4620
-
4621
- /**
4622
- * Tween.js - Licensed under the MIT license
4623
- * https://github.com/tweenjs/tween.js
4624
- * ----------------------------------------------
4625
- *
4626
- * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
4627
- * Thank you all, you're awesome!
4628
- */
4629
- var nextId = Sequence.nextId;
4630
4625
  /**
4631
4626
  * Controlling groups of tweens
4632
4627
  *
@@ -4638,29 +4633,14 @@
4638
4633
  // Modules and CommonJS, without build hacks, and so as not to break the
4639
4634
  // existing API.
4640
4635
  // https://github.com/rollup/rollup/issues/1961#issuecomment-423037881
4641
- var getAll = TWEEN.getAll.bind(TWEEN);
4642
- var removeAll = TWEEN.removeAll.bind(TWEEN);
4643
- var add = TWEEN.add.bind(TWEEN);
4644
- var remove = TWEEN.remove.bind(TWEEN);
4636
+ TWEEN.getAll.bind(TWEEN);
4637
+ TWEEN.removeAll.bind(TWEEN);
4638
+ TWEEN.add.bind(TWEEN);
4639
+ TWEEN.remove.bind(TWEEN);
4645
4640
  var update = TWEEN.update.bind(TWEEN);
4646
- var exports$1 = {
4647
- Easing: Easing,
4648
- Group: Group,
4649
- Interpolation: Interpolation,
4650
- now: now$2,
4651
- Sequence: Sequence,
4652
- nextId: nextId,
4653
- Tween: Tween,
4654
- VERSION: VERSION,
4655
- getAll: getAll,
4656
- removeAll: removeAll,
4657
- add: add,
4658
- remove: remove,
4659
- update: update,
4660
- };
4661
4641
 
4662
4642
  var index$1 = (function (p) {
4663
- return p instanceof Function ? p // fn
4643
+ return typeof p === 'function' ? p // fn
4664
4644
  : typeof p === 'string' ? function (obj) {
4665
4645
  return obj[p];
4666
4646
  } // property name
@@ -5502,7 +5482,7 @@
5502
5482
  state.hoverObj = topObject;
5503
5483
  }
5504
5484
  }
5505
- exports$1.update(); // update camera animation tweens
5485
+ update(); // update camera animation tweens
5506
5486
  }
5507
5487
 
5508
5488
  return this;
@@ -5534,10 +5514,10 @@
5534
5514
  } else {
5535
5515
  var camPos = Object.assign({}, camera.position);
5536
5516
  var camLookAt = getLookAt();
5537
- new exports$1.Tween(camPos).to(finalPos, transitionDuration).easing(exports$1.Easing.Quadratic.Out).onUpdate(setCameraPos).start();
5517
+ new Tween(camPos).to(finalPos, transitionDuration).easing(Easing.Quadratic.Out).onUpdate(setCameraPos).start();
5538
5518
 
5539
5519
  // Face direction in 1/3rd of time
5540
- new exports$1.Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(exports$1.Easing.Quadratic.Out).onUpdate(setLookAt).start();
5520
+ new Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(Easing.Quadratic.Out).onUpdate(setLookAt).start();
5541
5521
  }
5542
5522
  return this;
5543
5523
  }