         (cb) -> load("/static/threejs/r#{VERSION}/Detector.min.js", cb)
         (cb) ->
             f = () ->
-                if THREE?
+                if Detector?
                     cb()
                 else
                     #console.log("load_threejs: waiting for THREEJS...")

            foreground      : undefined
            spin            : false      # if true, image spins by itself when mouse is over it.
            camera_distance : 10
            aspect_ratio    : undefined  # undefined does nothing or a triple [x,y,z] of length three, which scales the x,y,z coordinates of everything by the given values.
            stop_when_gone  : undefined  # if given, animation, etc., stops when this html element (not jquery!) is no longer in the DOM
            frame           : undefined  # if given call set_frame with opts.frame as input when init_done called
            cb              : undefined  # opts.cb(undefined, this object)

        @init_eval_note()
        opts.cb?(undefined, @)

    # client code should call this when start adding objects to the scene
    init: () =>

            cb(err)
        _loading_threejs_callbacks = []
    )


_scene_using_renderer  = undefined
