LightShadow.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. <h1>[name]</h1>
  12. <p class="desc">
  13. 该类作为其他阴影类的基类来使用。
  14. </p>
  15. <h2>构造函数</h2>
  16. <h3>[name]( [param:Camera camera] )</h3>
  17. <p>
  18. [page:Camera camera] - 在光的世界里<br /><br />
  19. 创建一个新的[name]。这不能直接调用的 - 它由其他阴影用作基类。
  20. </p>
  21. <h2>属性</h2>
  22. <h3>[property:Camera camera]</h3>
  23. <p>
  24. 光的世界里。这用于生成场景的深度图;从光的角度来看,其他物体背后的物体将处于阴影中。
  25. </p>
  26. <h3>[property:Float bias]</h3>
  27. <p>
  28. 阴影贴图偏差,在确定曲面是否在阴影中时,从标准化深度添加或减去多少。<br />
  29. 默认值为0.此处非常小的调整(大约0.0001)可能有助于减少阴影中的伪影
  30. </p>
  31. <h3>[property:WebGLRenderTarget map]</h3>
  32. <p>
  33. 使用内置摄像头生成的深度图;超出像素深度的位置在阴影中。在渲染期间内部计算。
  34. </p>
  35. <h3>[property:WebGLRenderTarget mapPass]</h3>
  36. <p>
  37. The distribution map generated using the internal camera; an occlusion is calculated based
  38. on the distribution of depths. Computed internally during rendering.
  39. </p>
  40. <h3>[property:Vector2 mapSize]</h3>
  41. <p>
  42. 一个[Page:Vector2]定义阴影贴图的宽度和高度。<br /><br />
  43. 较高的值会以计算时间为代价提供更好的阴影质量。值必须是2的幂,直到给定设备的[page:WebGLRenderer.capabilities].maxTextureSize,
  44. 虽然宽度和高度不必相同(例如,(512,1024)有效)。
  45. 默认值为*(512,512)*。
  46. </p>
  47. <h3>[property:Matrix4 matrix]</h3>
  48. <p>
  49. 模拟阴影相机空间,计算阴影贴图中的位置和深度。存储在[page:Matrix4 Matrix4]中。这是在渲染期间内部计算的。
  50. </p>
  51. <h3>[property:Float radius]</h3>
  52. <p>
  53. 将此值设置为大于1的值将模糊阴影的边缘。<br />
  54. 较高的值会在阴影中产生不必要的条带效果 - 更大的[page:.mapSize mapSize]将允许在这些效果变得可见之前使用更高的值。<br />
  55. If [page:WebGLRenderer.shadowMap.type] is set to [page:Renderer PCFSoftShadowMap], it is recommended to
  56. leave radius at 1 and increase softness by decreasing [page:.mapSize mapSize] instead.<br /><br />
  57. 请注意,如果[page:WebGLRenderer.shadowMap.type]设置为[page:Renderer BasicShadowMap],将会无效。
  58. </p>
  59. <h2>方法</h2>
  60. <h3>[method:Vector2 getFrameExtents]()</h3>
  61. <p>
  62. Used internally by the renderer to extend the shadow map to contain all viewports
  63. </p>
  64. <h3>[method:null updateMatrices]( [param:Light light] )</h3>
  65. <p>
  66. Update the matrices for the camera and shadow, used internally by the renderer.<br /><br />
  67. light -- the light for which the shadow is being rendered.
  68. </p>
  69. <h3>[method:Frustum getFrustum]()</h3>
  70. <p>
  71. Gets the shadow cameras frustum. Used internally by the renderer to cull objects.
  72. </p>
  73. <h3>[method:number getViewportCount]()</h3>
  74. <p>
  75. Used internally by the renderer to get the number of viewports that need to be rendered for this shadow.
  76. </p>
  77. <h3>[method:LightShadow copy]( [param:LightShadow source] )</h3>
  78. <p>
  79. 将[page:LightShadow source]中的所有属性的值复制到该Light。
  80. </p>
  81. <h3>[method:LightShadow clone]()</h3>
  82. <p>
  83. 克隆与此相同属性的新LightShadow。
  84. </p>
  85. <h3>[method:Object toJSON]()</h3>
  86. <p>
  87. 序列化这个LightShadow。
  88. </p>
  89. <h2>源码</h2>
  90. <p>
  91. [link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
  92. </p>
  93. </body>
  94. </html>