Viktor Danov
Viktor Danov

Reputation: 21

Three.js from CanvasRenderer to WebGLRenderer

Is it possible to "convert" a Three.js written script that uses a Three.js CanvasRenderer to a WebGLRenderer one and if so how?

Upvotes: 0

Views: 1312

Answers (1)

bjorke
bjorke

Reputation: 3305

The short answer is: yes.

And in general you'll get better performance, though you might have a different-looking result.

A very important difference is that you can't use the renderer .domElement as a Canvas-2D because the WebGL renderer is 3D. So if you've been using canvas commands to, say, draw text, you might have some work ahead to adapt them.

Upvotes: 1

Related Questions