Graphics Reference
In-Depth Information
All you have to do to make a refractive material is load the cubemap object like this:
var cubemap =
THREE.ImageUtils.loadTextureCube(urls, new
THREE.CubeRefractionMapping());
And define the material in the following way:
var envMaterial = new
THREE.MeshBasicMaterial({envMap:cubemap});
envMaterial.refractionRatio = 0.95;
See also
• If you look closely at the example shown at the beginning of this recipe, you
might notice that you don't see the reflections of the individual objects on
each other. You only see the reflection of the skybox. In the Using a dynam-
ic cubemap to create reflective materials recipe, we show you how you can
make the cubemap object dynamic so that other rendered meshes are re-
flected.
Search WWH ::




Custom Search