Questions tagged as 'canvas'

1
answer

Why does this green ball get back in animation using this conditional?

I have a javascript code that makes an animation of a green ball that moves until it reaches the limit of the width of the window, causing the ball to return, make the opposite way, until it reaches the other side of the window, and then come ba...
asked by 08.12.2017 / 22:58
1
answer

Canvas increasing the animation speed at each sprite exchange

I'm animating some LPC sprites on a canvas using Javascript. However, every time I change the animation, the animation starts to get faster. The test can be done in the code below. Just press any key to execute the attack animation, and watch...
asked by 06.11.2017 / 18:43
1
answer

Problems animating sprites with javaS canvas

I'm trying to animate some Sprites Sheets, but I'm having a problem with a certain "shadow" that remains after the canvas runs the animation frame, it would be the previous frame, I can not fix it. Full code in JSFiddle: link . I think the...
asked by 25.11.2015 / 03:14
1
answer

How to add onclick event to play audio on canvas?

When clicking on an image I want to play a sound. How can I do this function using the onclick event? Code: window.onload = function myCanvas() { var c = document.getElementById("myCanvas"); var ctx = c....
asked by 18.10.2015 / 22:55
1
answer

How do I do an "onload" on NODE.JS? (Discord.js)

I've been trying to make a code to generate an image on node.js using Canvas , but I'm facing the problem that the image is not loaded before using it. I tried using "onload" but that did not work (I never ran the code) Here is the "base"...
asked by 05.06.2017 / 20:42
0
answers

How to put particlejs in a parallax banner with text in the center

I'd like to know how I can put the ParticleJS effect on a banner Parallax with a text in the div center. This way: Forexample,inthisbannerIwantedthatinthecenterofit,therewasatextandthattheimagewaswitheffectParalax.Itriedthisway:...
asked by 23.06.2017 / 15:15
0
answers

Why does it only work as expected the second time?

I have this function: for (var i in chars) { chars[i].walk(); for (var j in chars) { if (i != j) { collision(chars[i], chars[j]); action(chars[i], chars[j]); } }...
asked by 02.08.2017 / 00:30
0
answers

Image Resolution created with canvas

Good afternoon everyone! I'm developing an application that does the scanning of a chip with several digital ones, where it is possible for the user to make cuts in these digital ones and then save them in the BLOB database. To do the scannin...
asked by 24.11.2016 / 17:45
0
answers

Canvas loses quality when saving video frame

I'm using a function that captures a frame of the video to later define it as a thumbnail. function thumbnail() { var canvas = document.getElementById('thumb'); $('#thumb').css('width',$('#video').css('width')); $('...
asked by 28.08.2017 / 17:04