@@ -188,18 +188,14 @@ XrInputSource.prototype.update = function (frame) {
188
188
} ;
189
189
190
190
XrInputSource . prototype . _updateTransforms = function ( ) {
191
- var dirty ;
192
-
193
191
if ( this . _dirtyLocal ) {
194
- dirty = true ;
195
192
this . _dirtyLocal = false ;
196
193
this . _localTransform . setTRS ( this . _localPosition , this . _localRotation , Vec3 . ONE ) ;
197
194
}
198
195
199
196
var parent = this . _manager . camera . parent ;
200
197
if ( parent ) {
201
- dirty = dirty || parent . _dirtyLocal || parent . _dirtyWorld ;
202
- if ( dirty ) this . _worldTransform . mul2 ( parent . getWorldTransform ( ) , this . _localTransform ) ;
198
+ this . _worldTransform . mul2 ( parent . getWorldTransform ( ) , this . _localTransform ) ;
203
199
} else {
204
200
this . _worldTransform . copy ( this . _localTransform ) ;
205
201
}
@@ -211,18 +207,14 @@ XrInputSource.prototype._updateRayTransforms = function () {
211
207
212
208
var parent = this . _manager . camera . parent ;
213
209
if ( parent ) {
214
- dirty = dirty || parent . _dirtyLocal || parent . _dirtyWorld ;
215
-
216
- if ( dirty ) {
217
- var parentTransform = this . _manager . camera . parent . getWorldTransform ( ) ;
210
+ var parentTransform = this . _manager . camera . parent . getWorldTransform ( ) ;
218
211
219
- parentTransform . getTranslation ( this . _position ) ;
220
- this . _rotation . setFromMat4 ( parentTransform ) ;
212
+ parentTransform . getTranslation ( this . _position ) ;
213
+ this . _rotation . setFromMat4 ( parentTransform ) ;
221
214
222
- this . _rotation . transformVector ( this . _rayLocal . origin , this . _ray . origin ) ;
223
- this . _ray . origin . add ( this . _position ) ;
224
- this . _rotation . transformVector ( this . _rayLocal . direction , this . _ray . direction ) ;
225
- }
215
+ this . _rotation . transformVector ( this . _rayLocal . origin , this . _ray . origin ) ;
216
+ this . _ray . origin . add ( this . _position ) ;
217
+ this . _rotation . transformVector ( this . _rayLocal . direction , this . _ray . direction ) ;
226
218
} else if ( dirty ) {
227
219
this . _ray . origin . copy ( this . _rayLocal . origin ) ;
228
220
this . _ray . direction . copy ( this . _rayLocal . direction ) ;
0 commit comments