Skip to content

Commit

Permalink
Merge pull request mrdoob#3 from Lowfab/feature/depthtextures
Browse files Browse the repository at this point in the history
Feature/depthtextures
  • Loading branch information
kintel committed Apr 15, 2015
2 parents c778b63 + 0000d8b commit cc31fbf
Show file tree
Hide file tree
Showing 300 changed files with 7,437 additions and 5,870 deletions.
2 changes: 2 additions & 0 deletions docs/api/extras/geometries/DodecahedronGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ <h1>[name]</h1>

<div class="desc">A class for generating a dodecahedron geometries.</div>

<iframe src='../../../scenes/geometry-browser.html#DodecahedronGeometry'></iframe>


<h2>Constructor</h2>

Expand Down
1 change: 1 addition & 0 deletions docs/api/extras/geometries/IcosahedronGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>[name]</h1>

<div class="desc">A class for generating an icosahedron geometry.</div>

<iframe src='../../../scenes/geometry-browser.html#IcosahedronGeometry'></iframe>

<h2>Constructor</h2>

Expand Down
1 change: 1 addition & 0 deletions docs/api/extras/geometries/OctahedronGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ <h1>[name]</h1>

<div class="desc">A class for generating an octahedron geometry.</div>

<iframe src='../../../scenes/geometry-browser.html#OctahedronGeometry'></iframe>

<h2>Constructor</h2>

Expand Down
2 changes: 2 additions & 0 deletions docs/api/extras/geometries/TetrahedronGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ <h1>[name]</h1>

<div class="desc">A class for generating a tetrahedron geometries.</div>

<iframe src='../../../scenes/geometry-browser.html#TetrahedronGeometry'></iframe>


<h2>Constructor</h2>

Expand Down
1 change: 1 addition & 0 deletions docs/api/extras/geometries/TorusGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ <h1>[name]</h1>

<div class="desc">A class for generating torus geometries</div>

<iframe src='../../../scenes/geometry-browser.html#TorusGeometry'></iframe>

<h2>Example</h2>

Expand Down
2 changes: 2 additions & 0 deletions docs/api/extras/geometries/TorusKnotGeometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ <h1>[name]</h1>

<div class="desc">Creates a torus knot, the particular shape of which is defined by a pair of coprime integers, p and q. If p and q are not coprime, the result will be a torus link.</div>

<iframe src='../../../scenes/geometry-browser.html#TorusKnotGeometry'></iframe>


<h2>Example</h2>

Expand Down
4 changes: 0 additions & 4 deletions docs/api/materials/MeshBasicMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ <h3>[name]( [page:Object parameters] )</h3>
<div>
color — geometry color in hexadecimal. Default is 0xffffff.<br />
map — Sets the texture map. Default is null <br />
lightMap — Set light map. Default is null.<br />
specularMap — Set specular map. Default is null.<br />
alphaMap — Set alpha map. Default is null.<br />
envMap — Set env map. Default is null.<br />
Expand All @@ -45,9 +44,6 @@ <h2>Properties</h2>
<h3>[property:Integer color]</h3>
<div>Sets the color of the geometry. Default is 0xffffff.</div>

<h3>[property:Texture lightMap]</h3>
<div>Set light map. Default is null.</div>

<h3>[property:Texture specularMap]</h3>
<div>Set specular map. Default is null.</div>

Expand Down
18 changes: 0 additions & 18 deletions docs/api/materials/MeshLambertMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ <h3>[name]([page:Object parameters])</h3>
<div>
color — Line color in hexadecimal. Default is 0xffffff.<br />
map — Sets the texture map. Default is null <br />
lightMap — Set light map. Default is null.<br />
specularMap — Set specular map. Default is null.<br />
alphaMap — Set alpha map. Default is null.<br />
envMap — Set env map. Default is null.<br />
Expand Down Expand Up @@ -53,27 +52,10 @@ <h3>[property:Color emissive]</h3>
<div>
Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black.<br />
</div>

<h3>[property:boolean wrapAround]</h3>
<div>
Define whether the diffuse lighting wraps around the model or not. This option adds a little more (tintable) light
onto the side of the object in relation to a light.
</div>

<h3>[property:Vector3 wrapRGB]</h3>
<div>
Decide how much of the wrap around values get used if the wrapAround option is set. The x, y, z values correspond
to the r, g, b values respectively. The typical range is of each is from 0 to 1. For example setting all of the
vector values to 0.5 will add a moderate amount of light to the side of the model. Changing *b* to 1 will
tint the light on the side to be more blue. Defaults to *(1,1,1)*.
</div>

<h3>[property:Texture map]</h3>
<div>Set color texture map. Default is null.</div>

<h3>[property:Texture lightMap]</h3>
<div>Set light map. Default is null.</div>

<h3>[property:Texture specularMap]</h3>
<div>Since this material does not have a specular component, the specular value affects only how much of the environment map affects the surface. Default is null.</div>

Expand Down
14 changes: 0 additions & 14 deletions docs/api/materials/MeshPhongMaterial.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,6 @@ <h3>[property:boolean metal]</h3>
underlying colors.
</div>

<h3>[property:boolean wrapAround]</h3>
<div>
Define whether the diffuse lighting wraps around the model or not. This option adds a little more (tintable) light
onto the side of the object in relation to a light.
</div>

<h3>[property:Vector3 wrapRGB]</h3>
<div>
Decide how much of the wrap around values get used if the wrapAround option is set. The x, y, z values correspond
to the r, g, b values respectively. The typical range is of each is from 0 to 1. For example setting all of the
vector values to 0.5 will add a moderate amount of light to the side of the model. Changing *b* to 1 will
tint the light on the side to be more blue. Defaults to (1,1,1).
</div>

<h3>[property:Texture map]</h3>
<div>Set color texture map. Default is null.</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ <h1><a href="http://threejs.org">three.js</a> / docs</h1>
if ( window.location.hash.length > 0 ) goToHash();

console.log([
' __ __',
' __ __',
' __/ __\\ / __\\__ ____ _____ _____',
'/ __/ /\\/ / /___\\/ ____\\/ _____\\/ _____\\',
'\\/_ __/ / _ / / __/ / __ / / __ /_ __ _____',
Expand Down
129 changes: 129 additions & 0 deletions docs/scenes/geometry-browser.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Three.js Geometry Browser</title>
<style>
@font-face {
font-family: 'inconsolata';
src: url('../files/inconsolata.woff') format('woff');
font-weight: normal;
font-style: normal;
}

body {
margin:0;
font-family: 'inconsolata';
font-size: 15px;
line-height: 18px;
overflow: hidden;
}

canvas { width: 100%; height: 100% }

#newWindow {
display: block;
position: absolute;
bottom: 0.3em;
left: 0.5em;
color: #fff;
}
</style>
</head>
<body>

<a id='newWindow' href='./geometry-browser.html' target='_blank'>Open in New Window</a>

<script src="../../build/three.min.js"></script>
<script src='../../examples/js/libs/dat.gui.min.js'></script>
<script src="../../examples/js/controls/OrbitControls.js"></script>
<script src='js/geometry.js'></script>

<script>

document.getElementById('newWindow').href += window.location.hash;

var gui = new dat.GUI();
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 50 );
camera.position.z = 30;

var renderer = new THREE.WebGLRenderer({antialias: true});
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );

var orbit = new THREE.OrbitControls( camera, renderer.domElement );

var ambientLight = new THREE.AmbientLight( 0x000000 );
scene.add( ambientLight );

var lights = [];
lights[0] = new THREE.PointLight( 0xffffff, 1, 0 );
lights[1] = new THREE.PointLight( 0xffffff, 1, 0 );
lights[2] = new THREE.PointLight( 0xffffff, 1, 0 );

lights[0].position.set( 0, 200, 0 );
lights[1].position.set( 100, 200, 100 );
lights[2].position.set( -100, -200, -100 );

scene.add( lights[0] );
scene.add( lights[1] );
scene.add( lights[2] );

var mesh = THREE.SceneUtils.createMultiMaterialObject(

new THREE.Geometry(),

[

new THREE.MeshBasicMaterial({
color: 0xffffff,
side: THREE.DoubleSide,
wireframe: true,
transparent: true,
opacity: 0.5
}),

new THREE.MeshPhongMaterial({
color: 0x156289,
emissive: 0x072534,
side: THREE.DoubleSide
})

]

)

chooseFromHash( mesh );

scene.add( mesh );

var prevFog = false;

var render = function () {

requestAnimationFrame( render );

var time = Date.now() * 0.001;

mesh.rotation.x += 0.005;
mesh.rotation.y += 0.005;

renderer.render( scene, camera );

};

window.addEventListener( 'resize', function () {

camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();

renderer.setSize( window.innerWidth, window.innerHeight );

}, false );

render();

</script>
</body>
</html>
Loading

0 comments on commit cc31fbf

Please sign in to comment.