             else
                 console.log "ERROR: bad object type #{opts.obj.type}"
 
-        if opts.set_frame?
-            @set_frame opts.set_frame
-
         @render_scene true
 
     animate: (opts = {}) ->

            width           : undefined
            height          : undefined
            renderer        : undefined  # 'webgl' or 'canvas' or undefined to choose best
            background      : "#ffffff"
            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
            callback        : undefined  # opts.callback(error, this object)

        math3d.load_threejs (error) =>

            @init_light()

            # set background color
            @opts.background = new THREE.Color @opts.background...
            @element.style.background = @opts.background.getStyle()

            if @opts.foreground?
                @opts.foreground = new THREE.Color @opts.foreground...
            else
                @opts.foreground = new THREE.Color()
                {h, s, l} = @opts.background.getHSL()
                if h >= 0.5
                    @opts.foreground.setHSL(h-0.5, s, 1-l)
                else
                    @opts.foreground.setHSL(h+0.5, s, 1-l)

            if @opts.frame_color?
                @opts.frame_color = new THREE.Color @opts.frame_color...
            else
                @opts.frame_color = @opts.foreground

            @opts.callback? undefined, @

