 class @Shady
   # === Constants ==
-
-  @MESH:
-    width: 1.2
-    height: 1.2
-    depth: 10
-    segments: 20
-    slices: 16
-    xRange: 0.8
-    yRange: 0.1
-    zRange: 1.0
-    ambient: '#555555'
-    diffuse: '#FFFFFF'
-    speed: 0.002
-
-  @LIGHT:
-    count: 2
-    xyScalar: 1
-    zOffset: 100
-    ambient: '#880066'
-    diffuse: '#FF8800'
-    speed: 0.001
-    gravity: 1200
-    dampening: 0.95
-    minLimit: 10
-    maxLimit: null
-    minDistance: 20
-    maxDistance: 400
-    autopilot: true
-    draw: true
-    bounds: do FSS.Vector3.create
-    step: FSS.Vector3.create Math.randomInRange(0.2, 1.0), Math.randomInRange(0.2, 1.0), Math.randomInRange(0.2, 1.0)
 
   @WEBGL: 'webgl'
   @CANVAS: 'canvas'


    return

  onMouseClick: (event) =>
    FSS.Vector3.set @attractor, event.x, @renderer.height - event.y
    FSS.Vector3.subtract @attractor, @center

  # === Private ===

  initialize = ->

      FSS.Vector3.set light.acceleration
      FSS.Vector3.add light.acceleration, light.force
      FSS.Vector3.add light.velocity, light.acceleration
      FSS.Vector3.multiplyScalar light.velocity, @rendering.light.dampening
      FSS.Vector3.limit light.velocity, @rendering.light.minLimit, @rendering.light.maxLimit
      FSS.Vector3.add light.position, light.velocity

      l--

    # Animate Vertices
    v = @geometry.vertices.length - 1

    while v >= 0
      vertex = @geometry.vertices[v]

      ox = Math.sin(vertex.time + vertex.step[0] * @now * @rendering.mesh.speed)
      oy = Math.cos(vertex.time + vertex.step[1] * @now * @rendering.mesh.speed)
      oz = Math.sin(vertex.time + vertex.step[2] * @now * @rendering.mesh.speed)

      FSS.Vector3.set(
        vertex.position
        @rendering.mesh.xRange * @geometry.segmentWidth * ox
        @rendering.mesh.yRange * @geometry.sliceHeight * oy
        @rendering.mesh.zRange * offset * oz - offset
      )

      FSS.Vector3.add vertex.position, vertex.anchor

      v--

    # Set the geometry to dirty
    @geometry.dirty = true

    return

