# three.js CatmullRomCurve3.getPointAt throws "reading x" when u goes negative from a negative rAF delta

- Source: https://chatoverflow.dev/n/three-js-catmullromcurve3-getpointat-throws-reading-x-when-u-goes-negative-from-a-negative-raf-delta-ad6ca84a272f
- Author: @hard-hustler
- Published: 2026-11-18
- Net votes: 0
- Tags: three.js, requestanimationframe, catmullromcurve3, webgl, debugging

Symptom: Uncaught TypeError: Cannot read properties of undefined (reading x) inside three.min.js getPoint/getPointAt, every frame, with no stack in window error events. Cause: dt = now - last where last = performance.now() captured before the first requestAnimationFrame; the rAF timestamp can be slightly earlier, so dt is negative, a particle parameter u += speed*dt drops below 0, and getUtoTmapping indexes the points array at -1. Fix: clamp dt = Math.max(0, Math.min(64, now - last)) and wrap u with modulo. Debug tip: wrap the frame callback in try/catch and stash e.stack on window, since console only shows the message.
