LightShadow.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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:Float normalOffset]</h3>
  32. <p>Defines how much the position used to query the shadow map is offset along the object normal.</p>
  33. <p>The default is 0. Increasing this value can be used to reduce shadow acne especially in large scenes where light shines onto geometry at a shallow angle. The cost is that shadows may appear distorted.</p>
  34. <h3>[property:WebGLRenderTarget map]</h3>
  35. <p>
  36. 使用内置摄像头生成的深度图;超出像素深度的位置在阴影中。在渲染期间内部计算。
  37. </p>
  38. <h3>[property:WebGLRenderTarget mapPass]</h3>
  39. <p>
  40. The distribution map generated using the internal camera; an occlusion is calculated based
  41. on the distribution of depths. Computed internally during rendering.
  42. </p>
  43. <h3>[property:Vector2 mapSize]</h3>
  44. <p>
  45. 一个[Page:Vector2]定义阴影贴图的宽度和高度。<br /><br />
  46. 较高的值会以计算时间为代价提供更好的阴影质量。值必须是2的幂,直到给定设备的[page:WebGLRenderer.capabilities].maxTextureSize,
  47. 虽然宽度和高度不必相同(例如,(512,1024)有效)。
  48. 默认值为*(512,512)*。
  49. </p>
  50. <h3>[property:Matrix4 matrix]</h3>
  51. <p>
  52. 模拟阴影相机空间,计算阴影贴图中的位置和深度。存储在[page:Matrix4 Matrix4]中。这是在渲染期间内部计算的。
  53. </p>
  54. <h3>[property:Float radius]</h3>
  55. <p>
  56. 将此值设置为大于1的值将模糊阴影的边缘。<br />
  57. 较高的值会在阴影中产生不必要的条带效果 - 更大的[page:.mapSize mapSize]将允许在这些效果变得可见之前使用更高的值。<br />
  58. If [page:WebGLRenderer.shadowMap.type] is set to [page:Renderer PCFSoftShadowMap], radius has
  59. no effect and it is recommended to increase softness by decreasing [page:.mapSize mapSize] instead.<br /><br />
  60. 请注意,如果[page:WebGLRenderer.shadowMap.type]设置为[page:Renderer BasicShadowMap],将会无效。
  61. </p>
  62. <h2>方法</h2>
  63. <h3>[method:Vector2 getFrameExtents]()</h3>
  64. <p>
  65. Used internally by the renderer to extend the shadow map to contain all viewports
  66. </p>
  67. <h3>[method:null updateMatrices]( [param:Light light] )</h3>
  68. <p>
  69. Update the matrices for the camera and shadow, used internally by the renderer.<br /><br />
  70. light -- the light for which the shadow is being rendered.
  71. </p>
  72. <h3>[method:Frustum getFrustum]()</h3>
  73. <p>
  74. Gets the shadow cameras frustum. Used internally by the renderer to cull objects.
  75. </p>
  76. <h3>[method:number getViewportCount]()</h3>
  77. <p>
  78. Used internally by the renderer to get the number of viewports that need to be rendered for this shadow.
  79. </p>
  80. <h3>[method:LightShadow copy]( [param:LightShadow source] )</h3>
  81. <p>
  82. 将[page:LightShadow source]中的所有属性的值复制到该Light。
  83. </p>
  84. <h3>[method:LightShadow clone]()</h3>
  85. <p>
  86. 克隆与此相同属性的新LightShadow。
  87. </p>
  88. <h3>[method:Object toJSON]()</h3>
  89. <p>
  90. 序列化这个LightShadow。
  91. </p>
  92. <h2>源码</h2>
  93. <p>
  94. [link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
  95. </p>
  96. </body>
  97. </html>