Vertex colors examples tweaks.

This commit is contained in:
alteredq
2011-02-12 02:00:33 +01:00
parent f5642a3beb
commit d34d8d8e05
3 changed files with 46 additions and 4 deletions
+42
View File
@@ -21,6 +21,21 @@
padding: 5px;
}
#oldie {
font-family:monospace;
font-size:13px;
text-align:center;
background:#eee;
color:#000;
padding:1em;
width:475px;
margin:5em auto 0;
display:none;
}
a {
color: #0080ff;
@@ -33,12 +48,30 @@
<div id="container"></div>
<div id="info"><a href="http://github.com/mrdoob/three.js" target="_blank">three.js</a> - vertex colors - webgl</div>
<center>
<div id="oldie">
Sorry, your browser doesn't support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a>
<br/>
Please try in
<a href="http://www.chromium.org/getting-involved/dev-channel">Chrome 9+</a> /
<a href="http://www.mozilla.com/en-US/firefox/all-beta.html">Firefox 4+</a> /
<a href="http://nightly.webkit.org/">Safari OSX 10.6+</a>
</div>
</center>
<script type="text/javascript" src="js/Stats.js"></script>
<script type="text/javascript" src="../build/ThreeExtras.js"></script>
<script type="text/javascript">
if ( !is_browser_compatible() ) {
document.getElementById( "oldie" ).style.display = "block";
}
var container, stats;
var camera, scene, renderer;
@@ -179,6 +212,15 @@
}
function is_browser_compatible() {
// WebGL support
try { var test = new Float32Array(1); } catch(e) { return false; }
return true;
}
</script>
+4 -4
View File
@@ -90,15 +90,15 @@
container = document.createElement( 'div' );
document.body.appendChild( container );
camera = new THREE.Camera( 55, window.innerWidth / window.innerHeight, 1, 3000 );
camera.position.z = 1000;
camera = new THREE.Camera( 50, window.innerWidth / window.innerHeight, 1, 3000 );
camera.position.z = 1400;
scene = new THREE.Scene();
scene.fog = new THREE.FogExp2( 0x000000, 0.001 );
scene.fog = new THREE.FogExp2( 0x000000, 0.0009 );
geometry = new THREE.Geometry();
sprite = ImageUtils.loadTexture( "textures/sprites/circle.png" );
sprite = ImageUtils.loadTexture( "textures/sprites/ball.png" );
for ( i = 0; i < 5000; i++ ) {
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB