All Questions

Tagged with
Filter by
Sorted by
Tagged with
4
votes
1answer
43 views

Canvas added to YouTube is not visible

I'm following the WebGL tutorial from MDN (code, demo (black rectangle)) to create a WebGL canvas. The goal is a userscript (with WebGL shaders, i.e. video effects) for YouTube. So I opened a YouTube ...
0
votes
0answers
33 views

How to simulate click on canvas with webgl by coordinates?

I want to simulate clicks on https://www.thesnidewalk.com/ For example simulate clicks on "walk" button at start menu. I tried this, got coordinates on button and made mouse event and ...
-1
votes
2answers
64 views

how to force a canvas size to real size of a window in pixels, disregarding the zoom factor of the browser?

I'm working on this website : sphere.mars2540.com. Is there any way in javascript or css to force the canvas size not to scale regarding the zoom factor of the page and to constantly correspond to the ...
0
votes
1answer
99 views

Pixi.js sometimes throws an error: WebGL unsupported in this browser

The site is constantly running on the terminal, and sometimes it gives the following error WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support. But when ...
0
votes
0answers
51 views

Multiple canvas with OGL

Not sure if I'm not doing something correctly or if it's something not supported by the great OGL library https://github.com/oframe/ogl I just started using the lib and made a simple slider with 1 ...
0
votes
1answer
18 views

Angular with Three JS - canvas rendered in the wrong place

I'm currently developing code for a website and I'm trying to combine Three JS with Angular. After a couple of research, I've discovered that this is possible and I did indeed manage to combine these ...
0
votes
1answer
54 views

In a threeJS canvas with an animated scroll function, how do I prevent scrolling up beyond the top of the page?

I'm implementing a smooth scroll in Three.js based on this tutorial, it amounts to the following scroll listener: window.addEventListener("wheel", onMouseWheel); let y = 0; let pos = 0; ...
1
vote
1answer
342 views

Can I capture stream from a hidden canvas in javascript?

I'm currently developing an API which takes a videoTrack as input and return a processed videoTrack. I've managed to draw the processed video on a canvas and hoping use the canvas.captureStream() to ...
0
votes
0answers
25 views

Why doesn't the browser paint the canvas when an image is either added or animated?

I was looking at browser performance and the steps it takes to render a web page. I could see that if elements are separated as layers in HTML, there is no need to paint the specific element again ...
1
vote
0answers
83 views

How to generate an image from a leaflet map (with a webGL Heatmap layer) using JavaScript?

I have a functionality where I need to render a leaflet map with some Polygons and Markers. I was able to use domtoimage and was able to extract the entire map as an image using the following code ...
0
votes
0answers
25 views

Fast canvas scaling

I am trying to create an editor app, that can contain thousands od items. To draw items I use 2D WebGL. One of the important feature is scaling. Scaling is done by mouse wheel. After scale <canvas&...
0
votes
0answers
20 views

How do modern editors handle text buffers?

I am trying to figure out how to create a basic text editor using WebGL/canvas element. I do NOT want to have an input field that then prints the text into canvas. I want to be able to write the text ...
1
vote
1answer
67 views

WebGL perspective projection matrix not working

Trying to write basic WebGL program, which draws a triangle to the screen. Without any projection matrix it works just right, as well as with identity matrix. But when it comes to perspective ...
0
votes
0answers
30 views

WebGL 2 - Strange blending behaviour

I notice a strange behaviour trying to render a texture using WebGL 2.0. I disabled blending and antialias and performed a test to check if I can run some values "through GPU" and get them ...
0
votes
0answers
79 views

difference between canvas and gl.canvas

in WebGL, we create a rendering context with const canvas = document.getElementById("#mycanvas"); let gl = canvas.getContext("webgl2"); in every operation I see people using gl....

15 30 50 per page
1
2 3 4 5
27