 
         scene.opts.parent = opts.element
 
-        scene.opts.callback = (error, sceneobj) ->
+        scene.opts.callback = (sceneobj, error) ->
             if not error
                 if scene.obj?
                     sceneobj.addObj scene.obj
                 sceneobj.finalize()
-            opts.callback? error, sceneobj
+            opts.callback? sceneobj, error
 
         new Math3dThreeJS scene.opts
 

            width           : undefined
            height          : undefined
            renderer        : undefined # 'webgl' or 'canvas' or undefined to choose best
            background      : [1,1,1]
            spin            : false     # if true, image spins by itself when mouse is over it.
            aspect_ratio    : [1, 1, 1] # 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 # frame options
            callback        : undefined # opts.callback(error, this object)

        @frameOpts = defaults @opts.frame,
            color           : undefined # defaults to the color-wise negation of the background


        if opts.in_frame
            @_initPointHelper()
            @_pointHelperVec.set opts.loc...
            @updateBoundingBox @_pointHelper

        opts.radius = opts.size/1200
