 
     @zMin = -100
     @lastChunkZ = 0
+    @jumpTreshold = 3
 
     @group.scale.set scale, scale, scale
     @group.position.set -0.5*simulator.width*scale, -0.5*simulator.height*scale, 0
     @group.updateMatrix()
+    
         
   makeChunk: ->
     unless @lastState

      pushXYZ x,y+yn2,z+zn2
      pushXYZ x+xn1,y,z+zn1
      pushXYZ x,y-yn2,z-zn2
      if iz >0
        for j in [0...4]
          j1 = (j+1)%4
          pushQuad vindex-4+j, vindex+j, vindex-4+j1, vindex+j1

    if curIx isnt ixs.length then throw new Error "Not all indices filled"
    if curV isnt vs.length then throw new Error "Not all vertices filled"

    tube = new THREE.BufferGeometry()

    simulator.put pattern, cx, cy #pattern roughly at the center
    
    order = 3
    interpSteps = 1
    smoothing = 4
    @tubeRadius = 0.1
    @isim = new CircularInterpolatingSimulator simulator, order, interpSteps, smoothing
