Questions tagged [html5-canvas]
Canvas is an HTML element that allows for dynamic, scriptable rendering of 2D shapes, 3D shapes, bitmap images and animations in both 2D and 3D.
html5-canvas
12,256
questions
1
vote
3
answers
56
views
html canvas draw straight line
I want to use MS paint style line tool to draw straight line using UI on html canvas element using JS.
The issue is that line preview must be visible on canvas as mouse is being dragged after click at ...
0
votes
0
answers
20
views
Issue with firefox for andriod font loading
I made a a particle letter effect for a website using canvas. The way it works is it first generates a small text on a canvas and then reads the image data from that text to turn each pixel into a ...
0
votes
1
answer
17
views
How to deal with Electron app using .asr and SteamPipe app update
I have released HTML5 Electron game on Steam. It's easy to update game as SteamPipe compare files and upload those which has changed. So changing .js files gives few KB update.
Recently I have started ...
-1
votes
0
answers
24
views
Facing layout issue in pdf styling
enter image description here
As shown in the image, I am facing a layout issue in my PDF. The first td does not retain its space on the second page of the PDF, and the second td is placed within the ...
1
vote
1
answer
40
views
Why does canvas.toDataURL() and canvas.toBlob() produce corrupt images on Firefox?
On Chrome and Safari, I am not having problem generating a snapshot image of a video. However, I've been for hours trying several different things on Firefox, but the image always comes corrupted, ...
0
votes
1
answer
55
views
Why is the offscreen canvas not adhering to backdrop-filter styling property
I have a project, in which I draw a canvas using a webworker. The drawing comes out fine. For the rest of the section's design, I have 4 cards, which I want them to apply a backdrop filter on the ...
0
votes
2
answers
37
views
HTML Canvas "onmousedown" event and "mousedown" listener not firing [closed]
I have an HTML page with a canvas in the body defined as so:
<!DOCTYPE html>
<html>
<head>
<script defer src="./js/canvas.js"></script>
<link rel=&...
2
votes
1
answer
36
views
How to pass an image sequence for a canvas in React?
I have a list of 150 images called 0001.jpg, 0002.jpg ... 0150.jpg.
This is what I'm doing so far (only included the relevant code):
import React, { useRef, useEffect, useState } from 'react';
...
0
votes
1
answer
21
views
Failed to execute 'drawImage' on 'CanvasRenderingContext2D' even though image source is correct
I am trying to create an animation on scroll using an image sequence, but keep running into this error:
"Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The ...
0
votes
1
answer
56
views
simingly unlinked CSS changes impact value of window.innerWidth and window.innerHeight on chrome
Everything works fine on a regular chrome page on a computer, but as soon as I toggle the device toolbar and preview my website from let's say an iphone 12 (any device in portrait mode works), the ...
0
votes
0
answers
78
views
Error ''Cannot read properties of undefined (reading 'canvas')'' while creating a pixi.js app
I am getting the error Cannot read properties of undefined (reading 'canvas') while trying to run a pixi.js app. Here is my code :
<script src = 'js/pixi.min.js'></script>
<script>...
0
votes
0
answers
28
views
Is window.requestAnimationFrame() less resource demanding than setInterval() for animations? [duplicate]
Background:
MDN's page on optimizing canvas says:
With animations, use window.requestAnimationFrame() instead of setInterval() .
I'm not sure I know the reason for this. Is it just because ...
-2
votes
0
answers
73
views
Draw path with pressure in HTML canvas
I have many points in the format [x, y, pressure], and I want to draw a complex path that supports pen pressure. The way I currently implement this is by splitting the path into many pieces with ...
0
votes
1
answer
43
views
Too much shadow when drawing on canvas in loop
I have been trying to make a shadow effect in canvas by first creating a rounded rectangle and adding a shadow to it, everything seems to be working fine if I do this once without a loop. However when ...
-1
votes
0
answers
32
views
HTML's canvas listens for both finger touches and stylus events?
When the HTML canvas listens for finger touch events, if the finger is not lifted, it cannot listen for stylus events. Why is that? The scene is in the ipad's chrome browser, with two types of input: ...