     end = begin + word.length
     # console.log begin, end
     text_object.children.slice begin, end
-
-  chainedFadeIn: (array, duration) ->
-    reduction = (promise, curr, index, array) =>
-      promise.then =>
-        @fadeToArray(1, 1000) curr._text_object.children
-
-    promise = array.reduce reduction, Promise.resolve()
 
 class LinesVis extends Main
   lineSpacing: 40

    return bbox.box
  getBBox: getBBox

  panCameraToPosition3: (target, duration, ignoreGlobal) =>
    z_offset = if ignoreGlobal? then 0 else CAMERA_Z
    new Promise (resolve) =>
      d3.transition()
        .duration duration || 1000
        .tween "moveCamera", =>
          current = @camera.position
          x = d3.interpolate(current.x, target.x)

          (t) ->
            obj.material.uniforms.opacity.value = i(t)

  fadeToArray: (to, duration) ->
    (array) =>
      new Promise (resolve) =>
        selection = d3.selectAll array
        @addFadeOpacityTransition(to, duration)(selection)
          .each "end", resolve

  fadeAll: (objects, to, duration) ->
      promises = objects.map (child) =>
          return @fadeToArray(to, duration) child.children
      return Promise.all promises

  chainedFadeIn: (array, duration) ->
    reduction = (promise, curr, index, array) =>
      promise.then =>
        @fadeToArray(1, 1000) curr._text_object.children

    promise = array.reduce reduction, Promise.resolve()

  _radianScale = d3.scale.linear()
      .domain([0, 360])
