I am using it this way ..
var canvas = document.getElementById("canvas");
var contextGrayLine= canvas.getContext("2d");
var contextRedLine= canvas.getContext("2d");
contextGrayLine.lineWidth = 50;
contextRedLine.lineWidth = 20;
contextGrayLine.beginPath();
contextGrayLine.moveTo(10,10);
contextGrayLine.lineTo(500,10)
...
I'm making a game in html5 canvas. I'm using jquery so I can get the click event and the clicks x,y coordinates. I have an array of unit objects and a tiled terrain (also an array). The unit objects have bounding box information, their position, and their type.
What is the most effecient way to map this click event to one of the unit...
I have figured out the drag and drop part but how would I then upload and POST the file to a URL with set parameters?
If I had a form I would just
<form enctype="multipart/form-data" method="post" action="url">
<input type="?" name="?"/>
<input type="?" name ="?" value="?"/>
</form>
How would I do above using the HTML5 ...
Is it possible to still use the geolocation features when you are in offline mode in HTML5? It appears that when I am online (navigator.onLine = true), the geolocation works fine. But when I go offline (navigator.onLine = false), I get thrown to my error callback and the error indicates geolocation not available.
...
I have a simple question about how Rails 3 works with XHTML doctypes. Since Rails 3 uses UJS for its ajax calls (and even normal calls such as delete calls) and does so by use of HTML5 data attributes, then, since XHTML doesn't support data attributes, will the markup be automatically invalid?
...
Hi,
is there anyway with the HTML5 Drag & Drop functionality or/and the File API to drag an jpg image from one window to another?
The idea is that I could drag and image from Facebook to a different browser's window with a custom HTML that would get that image.
Or, at least, a way to drag from the Desktop to a browser?
Thanks a lot
...
What's the best way to debug a webworker? My worker appears to be failing somewhere, but I don't appear to be able to log things to the console to figure out what's going on. Is there a way using firebug, or webkit's inspector I can run javascript in the webworker context? Is there a better way of doing this?
...
Please, show me how to get my a random question, $randomQuestion (i.e., "What color is the sky?"), and matching answer, $matchingAnswer (i.e., "BLUE"), from the $quizID's table's list of questions in my SQL database. Then, please help me use jQuery to refresh the $randomQuestion and $matchingAnswer, without refreshing the whole page.
I...
Is it possible to write text on HTML5 canvas? I've googled for that, found some workaround but no good description...
Please advise, thanks!
...
For an internal project we would like to play with building a video conferencing system. We are able to decide the browser that the user has to use and can install plugins.
The only requirement is that the browser and plugins must be free and work over Linux and Mac. (Don't care about Windows)
What is the best way to do access the web...
Hi,
I've created an HTML5 video player (very simple) that works perfectly on the iPad and the browser.
However, when I open it on the iPhone, I only get a play button which, when pressed, opens the native video player on a new window, on top of all my stuff.
That means I lose access to my custom controls and time tracking (written in ...
Hello,
I'm trying to get the background of a html5-starfield transparent.
I'm not really a coder; but i think it's hard to do.
http://www.chiptune.com/starfield/starfield.html
http://www.thediscopalace.com/testing.php
Using flash can be a solution but this is not allowed because it also must run on the ipad.
Can somebody give me some...
Hi,
Can HTML5 (or anything in the browser) be used to transmit sound in real-time? Like Skype for example?
Thanks
...
I'm using the new HTML5 onpopstate event. Using Firefox 4 the window.onpopstate event is triggered on a page load whilst in Webkit this does not seem to be the case.
Which is the correct behaviour?
...
Unlike Flash, if you develop an application in HTML5 using Canvas, since it uses JavaScript, doesn't that mean the code is wide open? Does using HTML5 mean the end of closed code on the web browser? Am I correct that a Flash application has a closed source?
I know that HTML and JavaScript has been open for a while (just view source ri...
Right now I have an iFrame object with the seamless attribute which looks perfect,
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.google.com%2F&amp;layout=standard&amp;show_faces=false&amp;width=400&amp;action=like&amp;colorscheme=light&amp;height=35" seamless></iframe>
with a coupl...
I'm trying to use PHP to do this:
<if !empty($list) {echo
.
.
.
?>
And get the result:
Additional options:
<p><input type="checkbox" name="1">1</input></label></p>
<p><input type="checkbox" name="2">2</input></label></p>
.
.
.
<p><input type="checkbox" name="n">n</input></label></p>
</legend>
</fieldse...
Are there any app built with html5 feature (such as canvas, video playback...) available in Android marketplace?
I'm looking for html5 web apps wrapped as a native android app.
...
hi guys , i was optimizing my html5 game engine for performance issues and i want to know how much time a render process needs.So i got a bunch of render functions.Each of them render seperated parts of the game.. such as blocks , players etc.
function gameRender() {
var d1 = new Date();
var firstTime = d1.getTime();
// ren...
How can I make canvas be 100% in width and height of the page?
...