Three.js 代码片段
一些不错的参考链接
HTML, JS, CSS
<!DOCTYPE html><html lang="en"> <head> <title>TITLE</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> <style> </style> </head><body></body></html>
body { color: #808080; font-family: Monospace; font-size: 13px; text-align: center; background-color: #000; margin: 0px; padding: 0px; overflow: hidden;}#logDiv { position: absolute; top: 0px; width: 100%; padding: 5px; z-index: 100;}
Three.js
cameraPerspective = new THREE.PerspectiveCamera( 50, 0.5 * aspect, 150, 1000 ); cameraPerspectiveHelper = new THREE.CameraHelper( cameraPerspective ); scene.add( cameraPerspectiveHelper );