Sceneide
add(object) children getChildByName remove(object) traverse(function)spa
.fog .overrideMaterial .autoUpdate .backgroundcode
雾化(两种方式)blog
Fog(hex,near,far) FogExp2(hex,density)rem
scene.fog = new THREE.Fog(0xffffff,0.015,100)
scene.fog = new THREE.FogExp2(0xffffff,0.015)
Fog: properties:name color near(1) far(1000) methods: .clone() .toJSON() get
FogExp2: properties:name color density(0.00025) methods: .clone() .toJSON() it
覆盖材质io
scene.overrideMaterial = new THREE.MeshLambertMaterial({color:0xffffff})
若使用了这个属性,全部添加到场景中的物体都会使用一样的材质function
光源class
AmbientLight(环境光)、PointLight(点光源)、SpotLight(聚光灯光源)、DirectionalLight(方向光)、
HemisphereLight(半球光)、AreaLight(面光源)、LensFlare(镜头炫目)
THREE.PerspectiveCamera(fov,aspect,near,far)
fov(视场) 45 从相机位置可以看到的部分场景
aspect(长宽比) window.innerWidth/window.innerHeight 渲染结果输出区的横向长度和纵向长度的比值
near(近面) 0.1 从距离相机多近的地方开始渲染场景
far(远面) 1000 定义的是相机能够从它所处的位置看多远
THREE.OrthographicCamera(left,right,top,bottom,near,far)
左右上下边界