|
@@ -277,13 +277,14 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
// This method does not support objects having non-uniformly-scaled parent(s)
|
|
// This method does not support objects having non-uniformly-scaled parent(s)
|
|
|
|
|
|
- if ( _quaternion === undefined ) _quaternion = new Quaternion();
|
|
|
|
|
|
+ if ( _position === undefined ) {
|
|
|
|
|
|
- if ( _m1 === undefined ) _m1 = new Matrix4();
|
|
|
|
-
|
|
|
|
- if ( _target === undefined ) _target = new Vector3();
|
|
|
|
|
|
+ _q1 = new Quaternion();
|
|
|
|
+ _m1 = new Matrix4();
|
|
|
|
+ _target = new Vector3();
|
|
|
|
+ _position = new Vector3();
|
|
|
|
|
|
- if ( _position === undefined ) _position = new Vector3();
|
|
|
|
|
|
+ }
|
|
|
|
|
|
if ( x.isVector3 ) {
|
|
if ( x.isVector3 ) {
|
|
|
|
|
|
@@ -474,9 +475,12 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
getWorldQuaternion: function ( target ) {
|
|
getWorldQuaternion: function ( target ) {
|
|
|
|
|
|
- if ( _position === undefined ) _position = new Vector3();
|
|
|
|
|
|
+ if ( _scale === undefined ) {
|
|
|
|
|
|
- if ( _scale === undefined ) _scale = new Vector3();
|
|
|
|
|
|
+ _position = new Vector3();
|
|
|
|
+ _scale = new Vector3();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
if ( target === undefined ) {
|
|
if ( target === undefined ) {
|
|
|
|
|
|
@@ -495,9 +499,12 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
|
|
|
getWorldScale: function ( target ) {
|
|
getWorldScale: function ( target ) {
|
|
|
|
|
|
- if ( _position === undefined ) _position = new Vector3();
|
|
|
|
|
|
+ if ( _quaternion === undefined ) {
|
|
|
|
+
|
|
|
|
+ _position = new Vector3();
|
|
|
|
+ _quaternion = new Quaternion();
|
|
|
|
|
|
- if ( _quaternion === undefined ) _quaternion = new Quaternion();
|
|
|
|
|
|
+ }
|
|
|
|
|
|
if ( target === undefined ) {
|
|
if ( target === undefined ) {
|
|
|
|
|