|
@@ -378,7 +378,7 @@ export class PointerTracker implements Tracker
|
378
|
378
|
const velocity = deltaPosition._clone()._scale(inverseDeltaTime);
|
379
|
379
|
|
380
|
380
|
// determine the elapsed time since the tracking began
|
381
|
|
- const elapsedTime = previous ? previous.elapsedTime + deltaTime : 0;
|
|
381
|
+ const duration = previous ? previous.duration + deltaTime : 0;
|
382
|
382
|
|
383
|
383
|
// determine how much this pointer has moved since its tracking began
|
384
|
384
|
const totalDistance = previous ? previous.totalDistance + deltaPosition.length() : 0;
|
|
@@ -391,7 +391,7 @@ export class PointerTracker implements Tracker
|
391
|
391
|
|
392
|
392
|
// we create new trackable instances on each frame;
|
393
|
393
|
// these will be exported and consumed by the user
|
394
|
|
- this._newPointers.set(id, { id, phase, position, deltaPosition, initialPosition, velocity, elapsedTime, totalDistance, isPrimary, kind });
|
|
394
|
+ this._newPointers.set(id, { id, phase, position, deltaPosition, initialPosition, velocity, duration, totalDistance, isPrimary, kind });
|
395
|
395
|
|
396
|
396
|
}
|
397
|
397
|
|
|
@@ -480,10 +480,10 @@ export class PointerTracker implements Tracker
|
480
|
480
|
{
|
481
|
481
|
this._activePointers.forEach((trackable, id) => {
|
482
|
482
|
if(trackable.phase == 'stationary') {
|
483
|
|
- (trackable as any).elapsedTime += deltaTime;
|
|
483
|
+ (trackable as any).duration += deltaTime;
|
484
|
484
|
/*
|
485
|
485
|
this._activePointers.set(id, Object.assign({}, trackable, {
|
486
|
|
- elapsedTime: trackable.elapsedTime + deltaTime
|
|
486
|
+ duration: trackable.duration + deltaTime
|
487
|
487
|
}));
|
488
|
488
|
*/
|
489
|
489
|
}
|