         text_object.position.copy(node.position)
         node._text_object = text_object
         node
-
-    addNetwork: (network) =>
-        radius = 700
-        rotation = Math.PI / 2.2
-
-        network_object = new THREE.Object3D()
-        network_object.scale.multiplyScalar(SCALE_TEXT)
-        network_object.rotateX rotation
-        @scene.add network_object
-
-        root = makeTree network
-        root = setNetworkPositions root, radius
-
-        traverse = (node) =>
-            return if ! node.position?
-
-            node = @setTextObject(node)
-            text_object = node._text_object
-            text_object.rotateX -rotation
-            network_object.add text_object
-
-            faded_in = fadeIn(text_object)
-
-            if node.children
-                faded_in.then =>
-                    @panCameraToBBox(text_object)
-                .then ->
-                    if node.parent?
-                        siblings = node.parent.children.filter (child) ->
-                            return child._text_object isnt text_object
-                        if node.parent.parent
-                            siblings = siblings.concat(node.parent.parent)
-                        promises = siblings.map (sibling) ->
-                            fadeOut sibling._text_object
-                        return Promise.all promises
-                .then ->
-                    node.children.forEach traverse
-
-        traverse(root)
 
     linesToTree = (lines) ->
         lines = lines.map (line) ->


        @animateLines root

    newTest: -> new Test(@scene, @camera)

class Test extends Main
    constructor: (@scene, @camera) ->

    foo: ->
        console.log @camera.position

class ChainVis extends Main
    constructor: (@scene, @camera, @font, @texture) ->
        console.info "New ChainVis."

    start: (data) =>
        # console.log this
        @_addChain data

    _addChain: (text) =>

                        @camera.position.z = z(t)
                .each "end", resolve

    getFadePromise = (interpolator, duration) ->
        (text_object) ->
            new Promise (resolve) ->
