3 ms·
I was eager to learn about HTML5 Canvas, so I created a small project and learned a great deal while developing a lightweight canvas library, which hopefully ot
by akvlad 12y ago
I was eager to learn about HTML5 Canvas, so I created a small project and learned a great deal while developing a lightweight canvas library, which hopefully others will also find helpful. https://github.com/vladakilov/imagine https://github.com/vladakilov/imagine
- listic 12y agoHow hard would it be to make a fullscreen demo? I want to teach myself to make games in HTML5 and most of the examples I see use fixed size frame; so I must be fair to assume going fullscreen is a hard problem. The games I'm interested are visual novels http://en.wikipedia.org/wiki/Visual_novel http://en.wikipedia.org/wiki/Visual_novel or Undum-based interactive fiction http://almostgoodbye.textories.com/ http://almostgoodbye.textories.com/ upgraded with full-screen static 2D graphics and music, so graphics perfomance requirements are quite modest, but running fluidly on screens of different resolution is a must.
- stevejohnson 12y agoIt's not a hard problem; you just need a little JavaScript to update your canvas's width/height attributes when the size of the DOM element changes. Then you can just use CSS to fill the window with your canvas, and use the fullscreen API to take the browser fullscreen.
- akvlad 12y agoWell, it's also not a simple as you describe. You might have objects within the canvas that might also need to be resized, images, text, bg images, bounding borders, etc. All these things will need to be taken into consideration when being scaled or resized.