Skip to content
tracend edited this page Jan 22, 2013 · 10 revisions

How to...

Create a new scene

  • Either use the method addScene() or
  • append the container with a <scene></scene> tag using append()

Return the $3d object of a container

$(container).three()

Texture a surface

  • Either add a class to the mesh tag that contains a backgrounD-image property:
<sphere class="moon"></sphere>
  • or define it as a data attribute (named "map"):
<sphere map="/examples/assets/img/moon_1k.jpg"></sphere>

Create your own tags

Extend the Three lib with an internal method:

Three.prototype.fn.webgl.TagName = function(){ ... };

You are now ready to use the tag with <TagName></TagName>

Clone this wiki locally