Scene.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr;
  12. <h1>场景([name])</h1>
  13. <p class="desc">
  14. 场景允许你在什么地方、摆放什么东西来交给three.js来渲染,这是你放置物体、灯光和摄像机的地方。</p>
  15. <h2>构造器</h2>
  16. <h3>[name]()</h3>
  17. <p>
  18. 创建一个新的场景对象。
  19. </p>
  20. <h2>属性</h2>
  21. <h3>[property:Fog fog]</h3>
  22. <p>一个[page:Fog fog]实例定义了影响场景中的每个物体的雾的类型。默认值为null。
  23. </p>
  24. <h3>[property:Material overrideMaterial]</h3>
  25. <p>如果不为空,它将强制场景中的每个物体使用这里的材质来渲染。默认值为null。</p>
  26. <h3>[property:boolean autoUpdate]</h3>
  27. <p>
  28. 默认值为true,若设置了这个值,则渲染器会检查每一帧是否需要更新场景及其中物体的矩阵。
  29. 当设为false时,你必须亲自手动维护场景中的矩阵。
  30. </p>
  31. <h3>[property:Object background]</h3>
  32. <p>
  33. 若不为空,在渲染场景的时候将设置背景,且背景总是首先被渲染的。
  34. 可以设置一个用于的“clear”的[page:Color](颜色)、一个覆盖canvas的[page:Texture](纹理),或是一个[page:CubeTexture]。默认值为null。
  35. </p>
  36. <h2>方法</h2>
  37. <h3>[method:JSON toJSON]</h3>
  38. <p>
  39. 使用JSON格式返回场景数据。
  40. </p>
  41. <h3>[method:null dispose]()</h3>
  42. <p>
  43. 清除[page:WebGLRenderer]内部所缓存的场景相关的数据。
  44. </p>
  45. <h2>源代码</h2>
  46. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  47. </body>
  48. </html>