Hacker News new | comments | show | ask | jobs | submit login

I don't know what it's like for other Javascript-based environments, but in mine it looks like this:

    Mars.load("olympusmons.js");

    var app = new Mars.UIApplication().init(1280, 720);
    app.setBackgroundColour(0xFFFFFFFF);
    app.startRenderThread();

    var scene = new Mars.UIScene().init(app);
    app.addScene(scene);

    var surface = new Mars.UISurface().init(app);
    surface.setSize(300, 200);
    surface.setColour(0xFFFFFFFF);

    var texture = surface.getTexture();
    texture.setBackgroundColour(0xFF0000FF);
    texture.setPixel(150, 100, 0x000000FF);



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: