             canvas,
             canvas.clientWidth,
             canvas.clientHeight,
-            MYOU_PARAMS.gl_options or {antialias: true, alpha: false}
+            options.gl_options or {antialias: true, alpha: false}
         )
 
         @update_canvas_rect()


        window.addEventListener 'resize', resize_canvas

        data_dir = MYOU_PARAMS.data_dir or './data'
        data_dir = MYOU_PARAMS.data_dir = data_dir.replace(/\/$/g, '')

        @events = new Events root, MYOU_PARAMS.event_options
        @mesh_factory = new MeshFactory @
        @main_loop.run()


{MeshFactory} = require './mesh_factory.coffee'

class Myou
    constructor: (root, options)->
        if not root?
            throw "Missing root DOM element, got null or undefined"
        if not options?
            throw "Missing options"
        @scenes = {}
        @loaded_scenes = []
        @active_sprites = []
