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