提交 d34d8d8e 编写于 作者: A alteredq

Vertex colors examples tweaks.

上级 f5642a3b
......@@ -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>
......
......@@ -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++ ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册