element for direct painting access on web pages, introduced with HTML5

learn more… | top users | synonyms

6
votes
1answer
43 views

Display text on video screen

The code displays a video that will play a video and then display some text on the screen at specific locations on the video screen. The code works but I would like to see if I could change ...
6
votes
1answer
67 views

Plan to make a small game - got a hang of canvas and made a cube fly around

I'm planning to make a small game for learning purposes. So far, I've got the hang of the canvas element and using the context to draw things on it, as well as object notation and classes in ...
4
votes
1answer
76 views

Bouncing ball in JavaScript

I have been using this code for a while for a project at work. Actually I got it from a friends who got it from a book. But either way it worked for my demonstration. But the other night I decided to ...
5
votes
1answer
59 views

Utilizing HTML5 Canvas to apply color theme to .png icons

Because we have a mix of both icons for core items and .png icons for custom items, I've developed an easy way to theme them (alter the color) all of them easily that will work across all browsers. ...
7
votes
2answers
191 views

Optimizing the performance of html5 video manipulation

I've been working on an html5 canvas video player with a lot of fun little extras and ui toys, the main one being a chroma key (green screen) effect that allows the user to key out different colors or ...
4
votes
2answers
185 views

JavaScript Tic-Tac-Toe review: best practices, correctness, and any other improvements/suggestions

I just finished a little game of Tic-Tac-Toe for a class I'm in, and I think it looks alright, but I'm pretty fresh, so I would like to know how I might be able to improve it, given the situation I'm ...
0
votes
1answer
118 views

Canvas performance and stable frames per second

I'm sure this has probably been asked before (although I couldn't find a question akin to this one). I have a canvas "app" that is refreshing persistently, but performance is awful on mobile devices. ...
4
votes
1answer
67 views

javascript canvas -javascript design

I am doing some tests with html5 Canvas object. At the same time I am trying to make my javascript code more modular. In the following code, where/how should I declare canvas and context, so that it ...
2
votes
1answer
226 views

Review a simple sprite sheet animation script

This is just a simple script for testing sprite sheet animations. I'm trying to improve my code style, so I'm curious about suggestions anyone might have about best practices or readability. ...
3
votes
1answer
92 views

Collision detection accuracy

How do you guys think I can improve the code for collision detection on my website asteroidfield.eu5.org? The current code is ...
2
votes
2answers
161 views

Javascript canvas interactive chart - how to make my code shorter

I'm trying to teach myself javascript and HTML5, (just beginning), and for some practice with canvas I am trying to turn this chart into an interactive chart on canvas, whereby clicking on a word ...
0
votes
1answer
125 views

My second attempt at canvas spatial grid collision? Did I get it?

After posting my first question and my first attempt which you can see here, My first attempt at canvas spatial grid collision? Please be honest! I have re-written it to try and implement what the ...
3
votes
1answer
139 views
3
votes
1answer
723 views

JavaScript/Canvas Pong game

This is the first time I've written JavaScript in this way (previously all I've done mostly is DOM manipulation and form validation in vanilla and jQuery). I've begun working on a basic Pong game. ...
4
votes
1answer
144 views

Basic game code structure tips

I'm learning JavaScript and came up with this basic game code structure (using the CreateJS framework): ...
5
votes
1answer
187 views

Optimize iterative pixel blending function

Summary I've created a function that blends tiles on a 2D hexagonal grid with their neighboring tiles based on an image that serves as a "blend mask". It runs, and isn't too intensive, but I feel it ...
6
votes
2answers
298 views

Splitting text into lines from a max width value for CANVAS

Ok so this works as is, and is not actually slow at all (from what I can see) - However I don't like the taste of nested while loops and was wondering if anyone could give some insight on a different ...