|
@@ -295,15 +295,14 @@ export class PointerTracker implements Tracker
|
295
|
295
|
|
296
|
296
|
// determine the position delta
|
297
|
297
|
const deltaPosition = !previous ? Vector2.Zero() :
|
298
|
|
- new Vector2(position.x, position.y)._subtract(previous.position);
|
|
298
|
+ position._clone()._subtract(previous.position);
|
299
|
299
|
|
300
|
300
|
// determine the initial position
|
301
|
301
|
const initialPosition = previous ? previous.initialPosition :
|
302
|
|
- Object.freeze(new Vector2(position.x, position.y));
|
|
302
|
+ Object.freeze(position._clone());
|
303
|
303
|
|
304
|
304
|
// determine the velocity
|
305
|
|
- const velocity = new Vector2(deltaPosition.x, deltaPosition.y)
|
306
|
|
- ._scale(inverseDeltaTime);
|
|
305
|
+ const velocity = deltaPosition._clone()._scale(inverseDeltaTime);
|
307
|
306
|
|
308
|
307
|
// determine whether or not this is the primary pointer for this type
|
309
|
308
|
const isPrimary = event.isPrimary;
|