   # The particle emitter
   emitter: null
 
+  # The spatial optimisation manager to use
+  space: null
+
+  # Settings
   springIterations: 1
 
   constructor: ->
+    @space = new Space()
+    @emitter = new Emitter(this)
     @clear()
 
   clear: ->
     @particles = []
     @behaviours = []
     @constraints = []
-    @emitter = new Emitter(this)
 
   # polymorphic add
   add: ->


  update: ->
    @emitter.update()

    particles = @particles


    delta = @b.position.sub_ @a.position
    dist = delta.length()

    return if dist == 0

    normDistStrength = (dist - @restLength) / (dist * @strength) * 0.5

    if not @a.isLocked
