 
   #controls.addEventListener 'change', render
 
-  curves = new FlyingCurves
+  curves = new ChunkedFlyingCurves
 
   lines = new THREE.Object3D
   lines.add curves.group

  time = Date.now()
  if prevTime isnt null
    dt = time-prevTime
    steps = stepsLeft + stepsPerMs * dt
    iSteps = Math.round steps
    stepsLeft = steps - iSteps
    curves.step iSteps
    #to make movement smoother, shift lines by the remaining noninteger fraction.
    curves.offsetZ stepsLeft
  prevTime = time
  return
  


prevTime = null
stepsLeft = 0
stepsPerMs = 5 / 1000

animate = ->
  requestAnimationFrame animate
