Graphics Reference
In-Depth Information
Getting
started
with
the
CSS
3D
renderer
HTML and CSS are getting more and more powerful each day. Modern browsers,
both mobile and desktop variants, have great support for these two standards.
The latest versions of CSS also support 3D transformations. With the
THREE.CSS3DRenderer object, we can directly access these CSS 3D features and
transform an arbitrary HTML element in 3D space.
Getting ready
To use the CSS 3D renderer, we first have to download the specific JavaScript file
from the Three.js site, as it hasn't been included in the standard Three.js distribution.
You can download this file directly from GitHub at https://raw.githubusercontent.com/
mrdoob/three.js/master/examples/js/renderers/CSS3DRenderer.js or look in the lib
directory of the sources provided with this topic.
To see the CSS3DRenderer scene in action, you can open the example
01.03-cssrenderer-skeleton.html in your browser:
What you see here is a standard HTML div element, rendered in 3D with the
THREE.CSS3DRenderer object.
Search WWH ::




Custom Search