All Questions
Tagged with graphics javascript
703 questions
0
votes
2
answers
59
views
How to create a cricket score ticker like this and populate it with API data in a React app? [closed]
When I was watching a live sports broadcast (cricket) on TV, I noticed an overlay showing match details with beautiful graphics and animations. It really caught my eye, and I’d love to build something ...
1
vote
2
answers
93
views
How can I optimize three.js the rendering of a gltf model? I tried 4 ways, but the result is the same
I'm trying to find a way to optimize three.js . I have a gltf tree model with 2144 triangles. I am adding 1000 trees to the scene in different ways.
I clone the tree in a simple loop.
I use ...
2
votes
1
answer
85
views
How to generate vertex normals from gltf positions attribute buffer?
I`m trying to implement vertex normal generation from vertex positions using the cross product method (in javaScript, from a gltf positions buffer), but most of resulting normals turn out to be (0, 0, ...
1
vote
0
answers
73
views
object looks translucent even though opacity is 1 in three js
Why is my three.js cube looking translucent when I change the metalness, roughness, and color even though opacity stays at 1.
The translucence only appears with a rectangle light, not a point light.
...
1
vote
0
answers
83
views
SVG - Plotting a smooth path
I am trying to plot mathematical functions using SVG as the plotter by generating a path representing the function. Some of the functions, such as x^2 work fine, but more involved functions such as 1 /...
0
votes
0
answers
28
views
WebGL Faces of a Pyramid Using Different Images Texture-Mapping - Cannot see images - Need Example to Better Understand
I am hoping someone can support reviewing my attached html and js code to correct my error. Or at minimum share with me a similar example so that I can learn to correct my errors.
The expectation is ...
0
votes
2
answers
60
views
requestAnimationFrame() animation of multiple objects sync problem
The task is to animate number of falling rectangles simulating rain, when rectangle – jet touches ground -draw star. To impelemnt it there are 3 classes: GitHub repository.
// Shapes:
class WaterJet ...
0
votes
0
answers
21
views
WebGL Support - Pyramid Position Points Not Lining Up Properly
below you will see my web gl .js file and .html and initshader.js files are correct so I did not attach. I am needing to create a pyramid that rotates about the x, y, z axis with the click function.
I ...
0
votes
0
answers
26
views
Capture bilinear filtered version of an image from Chrome for use in code
I need to bilinearly filter a (canvas) image for use thereafter in JS code. Chrome already does this filtering as part of their browser tab content rendering, when you scale up the tab content size.
...
0
votes
0
answers
67
views
How to project a 3D cuboid onto a 2D camera image?
I'm working on a project where I need to render a 3D cuboid onto a 2D camera image. The image should be displayed with a width of 600px, maintaining its aspect ratio. Here are the details of my cuboid ...
0
votes
1
answer
650
views
WebGPU multiple render passes for 1 canvas
I'm a beginner in WebGPU and want to process an image with multiple processing stages in separate shader modules:
Desaturation
Edge detection
Compression
Step 4 then computes the compressed texture ...
0
votes
0
answers
42
views
JS canvas "difference" mix-blend-mode : is it generating artificial differences?
Context :
Developing tests for a library generating complex images with canvas (see example image). An exact image match (by the pixel) is needed. I am trying to automate the regression tests on the ...
0
votes
1
answer
97
views
ThreeJS point light gives weird texture look
I use ThreeJS, more specificaly React Three Fiber to create a 3D Canvas.
I added a glb model, point light and ambient light and the result was really bad.
Why does the texture look so choppy?
Is it ...
0
votes
0
answers
27
views
collision problem with javascript graphics
I'm attempting to create a platformer on the codehs website using javascript graphics. I did the physics and it all worked fine, but when I got the collision script from an online source, the player ...
0
votes
0
answers
161
views
Graphics not appearing at the correct time in CodeHS
I am doing a project for school on CodeHS using Javascript. It is a game in which the user tries to move a character across the screen by pressing numbers to indicate which direction they want it to ...