 
 palette = [0xfe8f0f, 0xf7325e, 0x7dc410, 0xfef8cf, 0x0264ed]
 
-
-class ChunkedFlyingCurves
+###Pure class, without THREE.js code.
+#  Creates "blueprints" of the tube geometries
+###
+class Tubing
   constructor: ->
     pattern = parseRle "$3b2o$2bobob2o$2bo5bo$7b2o$b2o$bo5bo$2b2obobo$5b2oo"
     simulator = new Simulator 64, 64 #field size

    if @lastChunkZ < 0
      console.log "last chunk is at #{@lastChunkZ}, Cerating new chunk..."
      chunk = @makeChunk()
      chunkLen = @chunkSize * @stepZ
      @lastChunkZ += chunkLen
      chunk.position.setZ @lastChunkZ
      @chunks.push chunk
      @group.add chunk
      console.log "Created, addded at #{@lastChunkZ} chunk of len #{chunkLen}"
    return
      
      

    #Offset to put pattern to the center
    cx = ((simulator.width - patW)/2) & ~1
    cy = ((simulator.height - patH)/2) & ~1

    simulator.put pattern, cx, cy #pattern roughly at the center
    
    order = 3
