Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 315x 45x | import { InteractionVelocity, Point3 } from '@reflex/shared-types';
const point = (x: number, y = 40): Point3 => ({ x, y, z: -0.5, isValid: true, isFiltered: false });
export const predictionSnapshot = (frame = 3): InteractionVelocity => ({
touchId: 42,
frameId: frame,
lastMeasuredFrameId: frame,
timestampSeconds: frame / 10,
lastMeasuredTimestampSeconds: frame / 10,
predictionTimestampSeconds: (frame / 10) + 0.05,
predictionHorizonSeconds: 0.05,
confidence: 7.5,
sampleCount: 3,
isPredicted: false,
isPublished: true,
suppressionReason: '',
useSecondDerivation: true,
width: 320,
height: 240,
measuredPosition: point(100),
smoothedPosition: point(95),
matchingPosition: point(98),
firstDerivation: point(5, 0),
secondDerivation: point(2, 0),
predictedPositionBasic: point(105),
predictedPositionAdvanced: point(106)
});
|