25 lines
757 B
JavaScript
25 lines
757 B
JavaScript
// Presentation pacing belongs to the player, not the installation path JSON.
|
|
export const ASSEMBLY_PACE = Object.freeze({
|
|
insertion: 1.25,
|
|
join: 1.8,
|
|
camera: 1.2,
|
|
cameraHold: 0.18,
|
|
stepHold: 0.55,
|
|
});
|
|
|
|
// Zero velocity AND acceleration at both ends; no bounce/overshoot at the hole.
|
|
export function assemblyEase(progress) {
|
|
const t = Math.max(0, Math.min(1, progress));
|
|
return t * t * t * (t * (t * 6 - 15) + 10);
|
|
}
|
|
|
|
export function presentationScrewMotion(motion) {
|
|
return {
|
|
...motion,
|
|
approachDuration: Math.max(motion.approachDuration, 0.95),
|
|
engageDuration: Math.max(motion.engageDuration, 0.5),
|
|
tightenDuration: Math.max(motion.tightenDuration, 3.2),
|
|
retractDuration: Math.max(motion.retractDuration, 0.65),
|
|
};
|
|
}
|