Scene.html 2.2 KB

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