question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to draw 2D things over the WebGL renderer?

See original GitHub issue

Hi!

If I use THREE.CanvasRenderer then I can draw on it with .getContext("2d"). But if I use THREE.WebGLRenderer, then I can’t get it’s 2D context. Are there any functions for 2D drawing, or I have to create a new canvas over the other?

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Mugen87commented, Sep 2, 2019

Please don’t post help requests at closed issues. Use the forum instead.

0reactions
utkarshsaraogicommented, Sep 2, 2019

I am trying to record canvas on which THREE renders the scene with a LOGO on top of it, but I cannot seem to find a way to use getContext(‘2d’) with the same canvas. I tried using sprites but that does not work as I want it to be. Any suggestions?

Read more comments on GitHub >

github_iconTop Results From Across the Web

A basic 2D WebGL animation example - Web APIs | MDN
The first thing that needs to be done in order to draw a frame of the animation is to clear the background to...
Read more >
WebGL - Drawing Multiple Things
How to draw multiple different kinds of things in WebGL. ... And this is arguably the main rendering loop of most 3D engines...
Read more >
Drawing 2D charts with WebGL - Scott Logic Blog
Is WebGL faster than Canvas for drawing 2D shapes, ... Here's an example rendering up to 50,000 shapes moving around the screen, ...
Read more >
Drawing Multiple Things - WebGL2 Fundamentals
How to draw multiple different kinds of things in WebGL. ... after first getting something up in WebGL is how do I draw...
Read more >
Drawing many shapes in WebGL - Stack Overflow
Get a context (gl) from the canvas element. · initialize buffers with the shape of my object · drawScene() : a call to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found