<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><!--This file has been created with freeplane2html.xsl--><head><title>three.js开发指南</title><link rel="stylesheet" href="three.js开发指南-全展开.html_files/freeplane2html.css" type="text/css"/><meta name="generator" content="Freeplane-XSL Stylesheet (see: http://freeplane-xsl.dev.slash-me.net/ for details)"/><script type="text/javascript" src="three.js开发指南-全展开.html_files/freeplane2html.js">
</script><script type="text/javascript"><!--
function toggle(id)
{
div_el = document.getElementById(id);
img_el = document.getElementById('img'+id);
if (div_el.style.display != 'none')
{
div_el.style.display='none';
img_el.src = 'three.js开发指南-全展开.html_files/show.png';
}
else
{
div_el.style.display='block';
img_el.src = 'three.js开发指南-全展开.html_files/hide.png';
};
};
--></script></head><body><h1>three.js开发指南</h1><div style="width:96%; padding:2%; margin-bottom:10px; border: 0px; text-align:center; vertical-align:center;"><img src="three.js开发指南-全展开.html_files/image.png" style="margin-bottom:10px; 	border: 0px; 	text-align:center; 	vertical-align:center;" alt="Imagemap" usemap="#fm_imagemap"/></div><map name="fm_imagemap" id="fm_imagemap"><area shape="rect" href="#FMID_1723255651FM" alt="three.js开发指南" title="three.js开发指南" coords="42,13881,160,13933" /><area shape="rect" href="#FMID_1923526527FM" alt="场景" title="场景" coords="166,800,197,821" /><area shape="rect" href="#FMID_1673977800FM" alt="创建渲染的时候,相机会自动加载到场景中。相机,光源等,只要添加到场景中都算是物体 ..." title="创建渲染的时候,相机会自动加载到场景中。相机,光源等,只要添加到场景中都算是物体 ..." coords="214,42,715,85" /><area shape="rect" href="#FMID_275956053FM" alt="scene属性" title="scene属性" coords="214,562,283,583" /><area shape="rect" href="#FMID_1582682154FM" alt="scene.add(obj);" title="scene.add(obj);" coords="300,134,400,155" /><area shape="rect" href="#FMID_732859221FM" alt="fog" title="fog" coords="417,133,440,154" /><area shape="rect" href="#FMID_1427696520FM" alt="//颜色 near far
scene.fog = new THREE.Fo ..." title="//颜色 near far
scene.fog = new THREE.Fo ..." coords="457,88,774,198" /><area shape="rect" href="#FMID_394113899FM" alt="scene.children 数组,元素是obj" title="scene.children 数组,元素是obj" coords="300,201,499,222" /><area shape="rect" href="#FMID_668097239FM" alt="obj instanceof THREE.MESH 当然还有光源和相机" title="obj instanceof THREE.MESH 当然还有光源和相机" coords="300,303,613,324" /><area shape="rect" href="#FMID_1300585700FM" alt="遍历场景中的物体:
scene.traverse(function(e){
..." title="遍历场景中的物体:
scene.traverse(function(e){
..." coords="630,225,926,331" /><area shape="rect" href="#FMID_23503355FM" alt="mesh.children.forEach(function(e){
e ..." title="mesh.children.forEach(function(e){
e ..." coords="630,334,853,402" /><area shape="rect" href="#FMID_1668485898FM" alt="Scene.getChildByName(name)" title="Scene.getChildByName(name)" coords="300,405,496,426" /><area shape="rect" href="#FMID_1611788359FM" alt="scene.remove(obj);" title="scene.remove(obj);" coords="300,693,423,714" /><area shape="rect" href="#FMID_1981428151FM" alt="clone函数:
this.clone = function(){
va ..." title="clone函数:
this.clone = function(){
va ..." coords="440,429,941,977" /><area shape="rect" href="#FMID_1982327087FM" alt="name 唯一标识物体" title="name 唯一标识物体" coords="300,980,426,1001" /><area shape="rect" href="#FMID_1924197543FM" alt="scene.overrideMaterial 材质覆盖" title="scene.overrideMaterial 材质覆盖" coords="300,1018,504,1039" /><area shape="rect" href="#FMID_910701379FM" alt="scene.overrideMaterial = new THREE.MeshL ..." title="scene.overrideMaterial = new THREE.MeshL ..." coords="521,1004,992,1029" /><area shape="rect" href="#FMID_1347381465FM" alt="添加到场景中的物体都会使用当前的材质。" title="添加到场景中的物体都会使用当前的材质。" coords="521,1032,789,1053" /><area shape="rect" href="#FMID_185484248FM" alt="Geometry()" title="Geometry()" coords="214,1151,288,1172" /><area shape="rect" href="#FMID_207797128FM" alt="手动创建几何对象:
var vertices = [
new THREE ..." title="手动创建几何对象:
var vertices = [
new THREE ..." coords="374,1056,505,1081" /><area shape="rect" href="#FMID_1112481969FM" alt="出于性能的考虑,Three.js库假设一个网格的几何体在其声明周期内不会改变。但 ..." title="出于性能的考虑,Three.js库假设一个网格的几何体在其声明周期内不会改变。但 ..." coords="366,1107,867,1238" /><area shape="rect" href="#FMID_1598209613FM" alt="使用多重材质:
var materials = [
new THREE. ..." title="使用多重材质:
var materials = [
new THREE. ..." coords="305,1241,408,1266" /><area shape="rect" href="#FMID_695724678FM" alt="mesh" title="mesh" coords="214,1363,252,1384" /><area shape="rect" href="#FMID_316196101FM" alt="position" title="position" coords="269,1314,320,1335" /><area shape="rect" href="#FMID_775971642FM" alt="cube.position.x =10;
cube.position.y =10 ..." title="cube.position.x =10;
cube.position.y =10 ..." coords="337,1269,642,1379" /><area shape="rect" href="#FMID_594765518FM" alt="rotation" title="rotation" coords="269,1406,320,1427" /><area shape="rect" href="#FMID_1599878020FM" alt="cube.rotation.x = 0.5*Math.PI;
cube.rota ..." title="cube.rotation.x = 0.5*Math.PI;
cube.rota ..." coords="337,1382,683,1450" /><area shape="rect" href="#FMID_375860149FM" alt="translateX" title="translateX" coords="269,1454,335,1475" /><area shape="rect" href="#FMID_618853597FM" alt=