O'Reilly logo

Three.js Essentials by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Combining HTML and Three.js with CSS3DRenderer

So far in this book, we've exclusively used the THREE.WebGLRenderer object to render our scenes. This specific renderer requires browsers that support WebGL to show a scene. Most modern desktop browsers have good support for WebGL, but mobile devices are currently a bit behind. Three.js offers two alternative renderers that you can use. With CanvasRenderer, you can directly draw on an HTML5 canvas, which is supported on pretty much all the browsers and devices. However, CanvasRenderer has one big disadvantage; its performance isn't that great. With the latest versions of Three.js, we get another option: CSS3DRenderer. With this renderer, Three.js uses CSS3 3D transforms to render a scene. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required