-{Simulator, CircularInterpolatingSimulator} = require "../revca_track"
 {parseRle} = require "../rle"
-{Tubing} = require "./tubing"
 
 container = undefined
 stats = undefined

  time = Date.now()
  if prevTime isnt null
    dt = time-prevTime
    #steps = stepsLeft + stepsPerMs * dt
    #iSteps = Math.round steps
    #stepsLeft = steps - iSteps
    #curves.step Math.min 100, iSteps #for old line-based code
    curves.step Math.min 100, stepsPerMs * dt
    
    #to make movement smoother, shift lines by the remaining noninteger fraction.
    #curves.offsetZ stepsLeft
  prevTime = time
  return
  
render = ->
  #time = Date.now() * 0.0001
  #mesh.rotation.x = time * 0.25
  #mesh.rotation.y = time * 0.5
  renderer.render scene, camera
  return
  



prevTime = null

animate = ->
  requestAnimationFrame animate
