Questions tagged as 'canvas'

1
answer

Get image of an external Url with Html2canvas

Dear: I do not know much canvas , but I tried to make a screnshoot of a web page through the URL . Is this possible with html2canvas ? since I have done it with other functions, but they do not allow me to capture the entire...
asked by 20.12.2016 / 23:27
0
answers

How to move an object in a certain direction

Hi, I want to create the effect of throwing an object, in this case a circle that is drawn in the canvas . The problem is that I do not understand how to identify where to touch on the screen and move the circle in that direction. My final...
asked by 13.02.2018 / 17:43
1
answer

I can not center a canvas

I can not center a canvas with respect to the parent div, instead the link is centered. for(var cont=1; cont<=14; cont++) { cajaconestilo(cont) } function cajaconestilo(cont) { var con = cont; var caja = document.getEleme...
asked by 22.03.2018 / 23:57
1
answer

Canvas does not behave the same, indicating dimensions on the label or in CSS

Currently I am watching an online course on HTML5 and I have come to the part where they explain the operation and all the properties of the Canvas API. All right until at a certain point we begin to make strokes, I realize that I do not leave a...
asked by 03.09.2017 / 01:42
1
answer

Problems in detecting object collisions

Recently I started to develop a game that consists of throwing a ball and getting it to take place (in this case in a rectangle), which has been a parabolic shot in full force.    In the game there are different objects:       · The basket (...
asked by 06.04.2017 / 20:33
3
answers

Draw functions f (x) with JavaScript and canvas

My idea is to paint a x function using JavaScript and Canvas , I've been looking through the internet and have not found anything about it, I may have looked bad, I do not know, but the question is that I'm not sure how to start, here I lea...
asked by 09.03.2017 / 18:23
1
answer

Equivalent canvas in PixiJS?

How is the following code made in PixiJS? I have tried to see documentation and several things, but there is not much in Spanish. var c = document.getElementById("canvas"); var ctx = c.getContext("2d"); ctx.font = "20px Ubuntu"; ctx...
asked by 23.07.2017 / 23:52
1
answer

Canvas inside forEach

I need to draw a canvas for each element of the matrix, but I do not draw anything with the foreach, but if I take out the foreach and the function per and I only leave the drawing of #nodes if it works, but clearly it only draws me once....
asked by 04.05.2017 / 13:05
2
answers

HTML Javascript - Position and color of lines on canvas

I'm drawing with canvas but I need that the lines that appear are behind the rectangles and also that each line has its own color Canvas code <script> //X,Y function start () { var element = document....
asked by 02.03.2018 / 14:38
1
answer

The text created with PixiJS is not drawn

I try to draw the text, but it is not drawn, why the error? This is my code: var a = document.getElementById("canvas"); var d = PIXI.autoDetectRenderer(200,200,a); var ctx = new PIXI.Graphics(); document.body.appendChild(d.view);...
asked by 24.07.2017 / 13:16