@@ -126,24 +126,20 @@ THREE.Matrix4.prototype = {
126126
127127 } ( ) ,
128128
129- setRotationFromEuler : function ( v , order ) {
129+ makeRotationFromEuler : function ( rotation ) {
130130
131- console . warn ( 'DEPRECATED: Matrix4\'s .setRotationFromEuler() has been deprecated in favor of makeRotationFromEuler. Please update your code.' ) ;
132-
133- return this . makeRotationFromEuler ( v , order ) ;
134-
135- } ,
136-
137- makeRotationFromEuler : function ( v , order ) {
131+ if ( typeof rotation [ 'order' ] === undefined ) {
132+ console . error ( 'ERROR: Matrix\'s .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order. Please update your code.' ) ;
133+ }
138134
139135 var te = this . elements ;
140136
141- var x = v . x , y = v . y , z = v . z ;
137+ var x = rotation . x , y = rotation . y , z = rotation . z ;
142138 var a = Math . cos ( x ) , b = Math . sin ( x ) ;
143139 var c = Math . cos ( y ) , d = Math . sin ( y ) ;
144140 var e = Math . cos ( z ) , f = Math . sin ( z ) ;
145141
146- if ( order === undefined || order === 'XYZ' ) {
142+ if ( rotation . order === undefined || rotation . order === 'XYZ' ) {
147143
148144 var ae = a * e , af = a * f , be = b * e , bf = b * f ;
149145
@@ -159,7 +155,7 @@ THREE.Matrix4.prototype = {
159155 te [ 6 ] = be + af * d ;
160156 te [ 10 ] = a * c ;
161157
162- } else if ( order === 'YXZ' ) {
158+ } else if ( rotation . order === 'YXZ' ) {
163159
164160 var ce = c * e , cf = c * f , de = d * e , df = d * f ;
165161
@@ -175,7 +171,7 @@ THREE.Matrix4.prototype = {
175171 te [ 6 ] = df + ce * b ;
176172 te [ 10 ] = a * c ;
177173
178- } else if ( order === 'ZXY' ) {
174+ } else if ( rotation . order === 'ZXY' ) {
179175
180176 var ce = c * e , cf = c * f , de = d * e , df = d * f ;
181177
@@ -191,7 +187,7 @@ THREE.Matrix4.prototype = {
191187 te [ 6 ] = b ;
192188 te [ 10 ] = a * c ;
193189
194- } else if ( order === 'ZYX' ) {
190+ } else if ( rotation . order === 'ZYX' ) {
195191
196192 var ae = a * e , af = a * f , be = b * e , bf = b * f ;
197193
@@ -207,7 +203,7 @@ THREE.Matrix4.prototype = {
207203 te [ 6 ] = b * c ;
208204 te [ 10 ] = a * c ;
209205
210- } else if ( order === 'YZX' ) {
206+ } else if ( rotation . order === 'YZX' ) {
211207
212208 var ac = a * c , ad = a * d , bc = b * c , bd = b * d ;
213209
@@ -223,7 +219,7 @@ THREE.Matrix4.prototype = {
223219 te [ 6 ] = ad * f + bc ;
224220 te [ 10 ] = ac - bd * f ;
225221
226- } else if ( order === 'XZY' ) {
222+ } else if ( rotation . order === 'XZY' ) {
227223
228224 var ac = a * c , ad = a * d , bc = b * c , bd = b * d ;
229225
@@ -843,9 +839,13 @@ THREE.Matrix4.prototype = {
843839
844840 } ,
845841
846- makeFromPositionEulerScale : function ( position , rotation , eulerOrder , scale ) {
842+ makeFromPositionEulerScale : function ( position , rotation , scale ) {
843+
844+ if ( typeof rotation [ 'order' ] === undefined ) {
845+ console . error ( 'ERROR: Matrix4\'s .makeFromPositionEulerScale() now expects a Euler rotation rather than a Vector3 and order. Please update your code.' ) ;
846+ }
847847
848- this . makeRotationFromEuler ( rotation , eulerOrder ) ;
848+ this . makeRotationFromEuler ( rotation ) ;
849849 this . scale ( scale ) ;
850850 this . setPosition ( position ) ;
851851
0 commit comments