Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate lightProbe from CubeCamera #17282

Closed
wants to merge 112 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
1899100
fix(WebGLTextures): iOS UIWebView OffscreenCanvas.getContext("2d")
vobu Jun 14, 2019
d4f6bfe
refactor: linting
vobu Jun 14, 2019
7d1fc45
BoxGeometry: Introduce ES6 classes and ES6-ES5 conversion for builds.
Mugen87 Aug 18, 2019
248002c
Generate lightProbe from CubeCamera
Aug 19, 2019
1980dec
Fix THREE.SphericalHarmonics3 to SphericalHarmonics3 in jsm
Aug 20, 2019
92f81d9
Add example
Aug 20, 2019
8fa0e30
add example to files.js
Aug 20, 2019
cc6ad9d
use gammaToLinear for color correction and update example with sky cu…
Aug 21, 2019
199d70b
Merge remote-tracking branch 'upstream/dev' into dev34
Mugen87 Aug 21, 2019
674b636
package.json: Clean up
Mugen87 Aug 21, 2019
95e0628
Examples: Inherit loaders from Loader I.
Mugen87 Aug 27, 2019
d8f1b2f
Rename fromCubeCamera to fromCubeRenderTarget
Aug 27, 2019
8dfeb29
zh doc: Translate the inherit method and property section in some loa…
gogoend Aug 28, 2019
e916cc8
zh doc: Sync the zh doc list with en's.
gogoend Aug 29, 2019
3b8b2fa
Added tonemapping
WestLangley Aug 29, 2019
a9ff84e
Zh doc: remove the old canvas example links.
gogoend Aug 29, 2019
c3113b7
Properly group indirect diffuse and indirect specular terms
WestLangley Aug 29, 2019
06ecb50
Merge remote-tracking branch 'upstream/dev' into lightprobegenerator_…
Aug 29, 2019
144bf2a
Cleanup and white space formatting
Aug 29, 2019
93a721b
zh doc: Sync with the en doc.
gogoend Aug 29, 2019
f8f269e
Merge pull request #17377 from WestLangley/dev_clearcoat_tonemapping
mrdoob Aug 29, 2019
96c59d5
LightningStrike: Make plasma sphere use physical transparency
yomboprime Aug 29, 2019
feb47fa
Merge pull request #17378 from WestLangley/dev_pbr_indirect_specular
mrdoob Aug 29, 2019
1ee9309
Merge pull request #17380 from yomboprime/crystal_plasma
mrdoob Aug 29, 2019
920ce42
Fix depthTexture types in WebGLRenderTarget.d.ts
sam6321 Aug 30, 2019
27c24e8
zh docs: Sync the zh docs to the latest en doc.
gogoend Aug 30, 2019
8692fd4
zh doc: fix for the wrong tab in list.js
gogoend Aug 30, 2019
11c7e50
Merge pull request #17387 from sam6321/patch-1
mrdoob Aug 30, 2019
095ff03
Merge pull request #17389 from gogoend/zh_doc
mrdoob Aug 30, 2019
d8a1530
r109dev
mrdoob Aug 31, 2019
a0caac6
Updated builds.
mrdoob Aug 31, 2019
8a2a68b
Merge pull request #17363 from Mugen87/dev37
Mugen87 Aug 31, 2019
857e491
Examples: Inherit loaders from Loader II.
Mugen87 Aug 31, 2019
9a6d53f
Merge pull request #17395 from Mugen87/dev37
Mugen87 Aug 31, 2019
015c121
Examples: Inherit from Loader III.
Mugen87 Aug 31, 2019
ba08ba9
Merge pull request #17397 from Mugen87/dev37
Mugen87 Aug 31, 2019
7d603a8
Examples: Inherit from Loader IV.
Mugen87 Aug 31, 2019
bcb0c57
Merge pull request #17398 from Mugen87/dev37
Mugen87 Aug 31, 2019
2f1f4c2
add missing setFromObject method
chkvskyi Aug 31, 2019
a04ba51
document length parameter behaviour
aardgoose Aug 31, 2019
8310817
Merge pull request #17401 from aardgoose/doc-ba
mrdoob Aug 31, 2019
1bae768
Merge pull request #17400 from demimgga/box-helper
mrdoob Aug 31, 2019
c3d0a13
Docs: Fix link to example in TGALoader page.
Mugen87 Sep 1, 2019
8db62b0
Merge pull request #17402 from Mugen87/dev37
Mugen87 Sep 1, 2019
84c3bd5
CompressedTextureLoader: Refactor parsing.
Mugen87 Sep 1, 2019
37bafb5
Examples: Inherit from Loader V.
Mugen87 Sep 1, 2019
7159fda
Merge pull request #17403 from Mugen87/dev37
mrdoob Sep 1, 2019
e9a6868
Merge pull request #17405 from Mugen87/dev29
mrdoob Sep 1, 2019
364ab46
DataTextureLoader: Refactor parsing.
Mugen87 Sep 2, 2019
3de103c
Examples: Clean up.
Mugen87 Sep 2, 2019
feff3d4
Merge pull request #17407 from Mugen87/dev37
Mugen87 Sep 2, 2019
7768d5b
Examples: Fix TS files.
Mugen87 Sep 2, 2019
eb4ecd9
Merge pull request #17410 from Mugen87/dev37
Mugen87 Sep 2, 2019
abf2eb2
Rename SpecularMIPLevelNode.d..ts to SpecularMIPLevelNode.d.ts
gkjohnson Sep 3, 2019
80f49cf
Fix toggling receiveShadow without changing material
Oletus Sep 2, 2019
3099698
Merge pull request #17411 from gkjohnson/patch-2
Mugen87 Sep 3, 2019
b7f4a3a
Merge pull request #17406 from Mugen87/dev29
Mugen87 Sep 3, 2019
f3205d7
Update builds.
Mugen87 Sep 3, 2019
d9873f2
DragControls: Remove deprecated API and checks.
Mugen87 Sep 3, 2019
07d4643
Merge pull request #17276 from Mugen87/dev34
mrdoob Sep 3, 2019
2171430
Updated package-lock.json.
mrdoob Sep 3, 2019
e68904f
Rollup: Tweaked Buble transforms.
mrdoob Sep 3, 2019
5577a7f
Updated builds.
mrdoob Sep 3, 2019
f4c6da9
Merge pull request #17413 from higharc/fix-receiveShadow
mrdoob Sep 3, 2019
b78d665
Removed unneeded example.
mrdoob Sep 3, 2019
b2a8c14
Updated builds.
mrdoob Sep 3, 2019
d76ff57
Merge pull request #17416 from Mugen87/dev37
mrdoob Sep 3, 2019
5e6d710
Merge pull request #16781 from vobu/bugfix/offscreencanvas-getcontext…
mrdoob Sep 4, 2019
656cc03
Updated builds.
mrdoob Sep 4, 2019
caca0a2
Update OBJLoader2.html
Carnaux Sep 4, 2019
b19f656
Take receiveShadow flag into account for shadowMask
Oletus Sep 4, 2019
7a21630
Merge pull request #17421 from Carnaux/patch-2
Mugen87 Sep 4, 2019
8e15fb2
Fix a spelling error
wooster0 Sep 4, 2019
305766a
Merge pull request #17427 from r00ster91/patch-1
Mugen87 Sep 4, 2019
938f4a7
Merge pull request #17423 from higharc/fix-receiveShadow-shadowMask
mrdoob Sep 4, 2019
80b6bb1
WebXR: request common reference spaces as features
klausw Aug 9, 2019
b64ff29
Merge pull request #17429 from klausw/webxr-spacefeatures
mrdoob Sep 4, 2019
8b898d4
Updated builds.
mrdoob Sep 4, 2019
4ac6597
Update Loading-3D-models.html
fabryx92 Sep 5, 2019
04f3bf7
Merge pull request #17432 from fabryx92/patch-1
mrdoob Sep 5, 2019
f0a4e02
GLTFExporter: Clean up.
mrdoob Sep 5, 2019
71ec3b2
GLTFExporter: Fixed alphaMode handling
mrdoob Sep 5, 2019
8ff9b41
Loader: Remove Handlers.
Mugen87 Sep 5, 2019
4de9262
Tests: Clean up
Mugen87 Sep 5, 2019
3e3a25a
TS: Clean up
Mugen87 Sep 5, 2019
25ee8a1
DracoLoader: Clean up.
Mugen87 Sep 5, 2019
00642a1
Merge pull request #17433 from mrdoob/gltfexporter
mrdoob Sep 5, 2019
3b4bebc
Merge pull request #17436 from Mugen87/dev29
Mugen87 Sep 5, 2019
2aeee4d
LegacyGLTFLoader: Fix typo.
Mugen87 Sep 6, 2019
c574d51
JSM: Update modules.
Mugen87 Sep 6, 2019
4ff9082
Merge pull request #17438 from Mugen87/dev29
Mugen87 Sep 6, 2019
9cb0c15
package.json: removed deprecated jsnext:main.
mrdoob Sep 6, 2019
b94b717
package.json: changed repository format.
mrdoob Sep 6, 2019
9e18ea9
package.json: added more keywords.
mrdoob Sep 6, 2019
e7df453
Remove unnecessary EventDispatcher methods definitions from Geometry.…
takahirox Sep 6, 2019
b9a157b
Remove EventDispatcher inheritance from DirectGeometry.d.ts
takahirox Sep 6, 2019
6791c8f
Merge pull request #17440 from takahirox/CleanupGeometryTS
Mugen87 Sep 6, 2019
26ffbd2
Examples: Remove usage of BufferAttribute.setArray().
Mugen87 Sep 6, 2019
87c5fcf
Merge pull request #17439 from Mugen87/dev29
mrdoob Sep 6, 2019
1536454
Merge pull request #17434 from Mugen87/dev38
mrdoob Sep 6, 2019
d842a59
PointerLockControls: Clean up.
Mugen87 Sep 7, 2019
d98291b
Merge pull request #17444 from Mugen87/dev29
Mugen87 Sep 7, 2019
fda056f
Update builds.
Mugen87 Sep 7, 2019
09fdfc9
Generate lightProbe from CubeCamera
Aug 19, 2019
3ae144a
Fix THREE.SphericalHarmonics3 to SphericalHarmonics3 in jsm
Aug 20, 2019
e9efdaa
Add example
Aug 20, 2019
10a9c66
add example to files.js
Aug 20, 2019
5b9ee3e
use gammaToLinear for color correction and update example with sky cu…
Aug 21, 2019
f3405e4
Rename fromCubeCamera to fromCubeRenderTarget
Aug 27, 2019
0165e63
Cleanup and white space formatting
Aug 29, 2019
8d652aa
Merge remote-tracking branch 'origin/lightprobegenerator_fromCubeCame…
Sep 9, 2019
fc0d9a5
Rename function prototype and use convertColorToLinear function
Sep 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,812 changes: 925 additions & 887 deletions build/three.js

Large diffs are not rendered by default.

1,490 changes: 744 additions & 746 deletions build/three.min.js

Large diffs are not rendered by default.

367 changes: 200 additions & 167 deletions build/three.module.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ <h2>Constructor</h2>

<p>All of the above are called in the same way.</p>

<h3>TypedBufferAttribute( [param:Array array], [param:Integer itemSize], [param:Boolean normalized] )</h3>
<h3>TypedBufferAttribute( [param:Array_or_Integer array], [param:Integer itemSize], [param:Boolean normalized] )</h3>
<p>
array -- this can be a typed or untyped (normal) array. It will be converted to the Type specified.<br /><br />
array -- this can be a typed or untyped (normal) array or an integer length.
An array value will be converted to the Type specified.
If a length is given a new TypedArray will created, initialized with all elements set to zero.<br /><br />

itemSize -- the number of values of the array that should be associated with a particular vertex.<br /><br />

Expand Down
25 changes: 0 additions & 25 deletions docs/api/en/loaders/Loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,31 +77,6 @@ <h3>[method:Loader setResourcePath]( [param:String resourcePath] )</h3>
[page:String resourcePath] — Set the base path for dependent resources like textures.
</p>

<h2>Handlers</h2>

<p>
*[name].Handlers* is a special object normally used by other loaders like [page:GLTFLoader] or [page:MTLLoader]. It provides an
API that allows the definition of special mappings: What loaders should be used in order to load specific files. A typical use case
is to overwrite the default loader for textures.<br /><br />

Note: It's only possible to use *[name].Handlers* if the respective loader support the usage.
</p>

<h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
<p>
[page:Object regex] — A regular expression.<br />
[page:Loader loader] — The loader.
<p>
Registers a loader with the given regular expression.
</p>

<h3>[method:null get]( [param:String file] )</h3>
<p>
[page:String file] — The file path.
<p>
Can be used to retrieve the registered loader for the given file path.
</p>

<h2>Source</h2>

<p>
Expand Down
24 changes: 23 additions & 1 deletion docs/api/en/loaders/managers/LoadingManager.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,36 @@ <h3>[method:null itemEnd]( [param:String url] )</h3>
This should be called by any loader using the manager when the loader ended loading an url.
</p>


<h3>[method:null itemError]( [param:String url] )</h3>
<p>
[page:String url] — the loaded url<br /><br />

This should be called by any loader using the manager when the loader errors loading an url.
</p>

<h3>[method:LoadingManager addHandler]( [param:Object regex], [param:Loader loader] )</h3>
<p>
[page:Object regex] — A regular expression.<br />
[page:Loader loader] — The loader.
<p>
Registers a loader with the given regular expression. Can be used to define what loader should be used in
order to load specific files. A typical use case is to overwrite the default loader for textures.
</p>

<h3>[method:LoadingManager removeHandler]( [param:Object regex] )</h3>
<p>
[page:Object regex] — A regular expression.
<p>
Removes the loader for the given regular expression.
</p>

<h3>[method:null getHandler]( [param:String file] )</h3>
<p>
[page:String file] — The file path.
<p>
Can be used to retrieve the registered loader for the given file path.
</p>

<h2>Source</h2>

[link:https://github.com/mrdoob/three.js/blob/master/src/loaders/LoadingManager.js src/loaders/LoadingManager.js]
Expand Down
2 changes: 1 addition & 1 deletion docs/api/en/materials/Material.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ <h3>[property:Boolean transparent]</h3>
as transparent objects need special treatment and are rendered after
non-transparent objects. <br />
When set to true, the extent to which the material is transparent is
controlled by setting it's [page:Float opacity] property. <br />
controlled by setting its [page:Float opacity] property. <br />
Default is *false*.
</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/api/zh/cameras/ArrayCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
[page:PerspectiveCamera] &rarr;
[page:Object3D] &rarr; [page:Camera] &rarr; [page:PerspectiveCamera] &rarr;

<h1>摄像机阵列([name])</h1>

Expand Down
1 change: 0 additions & 1 deletion docs/api/zh/cameras/OrthographicCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ <h1>正交相机([name])</h1>

<h2>示例</h2>

<p>[example:canvas_camera_orthographic camera / orthographic ]</p>
<p>[example:webgl_camera camera ]</p>
<p>[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]</p>
<p>[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]</p>
Expand Down
2 changes: 0 additions & 2 deletions docs/api/zh/cameras/PerspectiveCamera.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ <h1>透视相机([name])</h1>

<h2>示例</h2>

<p>[example:canvas_geometry_birds geometry / birds ]</p>
<p>[example:canvas_geometry_cube geometry / cube ]</p>
<p>[example:webgl_animation_skinning_blending animation / skinning / blending ]</p>
<p>[example:webgl_animation_skinning_morph animation / skinning / blending ]</p>
<p>[example:webgl_effects_stereo effects / stereo ]</p>
Expand Down
4 changes: 3 additions & 1 deletion docs/api/zh/constants/Renderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ <h2>阴影类型</h2>
THREE.BasicShadowMap
THREE.PCFShadowMap
THREE.PCFSoftShadowMap
THREE.VSMShadowMap
</code>
<p>
这些常量定义了WebGLRenderer中[page:WebGLRenderer.shadowMap.type shadowMap.type]的属性。<br /><br />

[page:constant BasicShadowMap] 能够给出没有经过过滤的阴影映射 —— 速度最快,但质量最差。<br />
[page:constant PCFShadowMap] 为默认值,使用Percentage-Closer Filtering (PCF)算法来过滤阴影映射。<br />
[page:constant PCFSoftShadowMap] 使用Percentage-Closer Soft Shadows (PCSS) 算法来过滤阴影映射。
[page:constant PCFSoftShadowMap] 使用Percentage-Closer Soft Shadows (PCSS) 算法来过滤阴影映射。<br />
[page:constant VSMShadowMap] filters shadow maps using the Variance Shadow Map (VSM) algorithm.
</p>

<h2>色调映射</h2>
Expand Down
10 changes: 10 additions & 0 deletions docs/api/zh/core/Layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ <h3>[method:null toggle]( [param:Integer layer] )</h3>
根据参数切换对象所属图层。
</p>

<h3>[method:null enableAll]()</h3>
<p>
Add membership to all layers.
</p>

<h3>[method:null disableAll]()</h3>
<p>
Remove membership from all layers.
</p>

<h2>源代码</h2>

<p>
Expand Down
4 changes: 0 additions & 4 deletions docs/api/zh/lights/AmbientLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ <h1>[name]</h1>

<h2>示例</h2>
<p>
[example:canvas_camera_orthographic camera / orthographic ]<br />
[example:canvas_interactive_voxelpainter interactive / voxelpainter ]<br />
[example:canvas_materials materials ]<br />
[example:canvas_sandbox sandbox ]<br />
[example:webgl_animation_cloth animation / cloth ]<br />
[example:webgl_animation_skinning_blending animation / skinning / blending ]
</p>
Expand Down
1 change: 0 additions & 1 deletion docs/api/zh/lights/DirectionalLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ <h2>关于位置、目标和旋转说明</h2>

<h2>示例</h2>
<p>
[example:canvas_morphtargets_horse morphtargets / horse ]<br />
[example:misc_controls_fly controls / fly ]<br />
[example:webvr_cubes cubes ]<br />
[example:webgl_effects_parallaxbarrier effects / parallaxbarrier ]<br />
Expand Down
1 change: 0 additions & 1 deletion docs/api/zh/lights/PointLight.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ <h1>点光源([name])</h1>
<h2>示例</h2>

<p>
[example:canvas_lights_pointlights lights / pointlights ]<br />
[example:webgl_lights_pointlights lights / pointlights ]<br />
[example:webgl_lights_pointlights2 lights / pointlights2 ]<br />
[example:webgldeferred_animation animation ]<br />
Expand Down
82 changes: 36 additions & 46 deletions docs/api/zh/lights/shadows/LightShadow.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,17 @@
<h1>[name]</h1>

<p class="desc">
这在 [page:PointLight PointLights] 内部用于计算阴影,也可用作其他阴影类的基类
该类作为其他阴影类的基类来使用
</p>


<h2>例子</h2>
<p>
<code>
//Create a WebGLRenderer and turn on shadows in the renderer
var renderer = new THREE.WebGLRenderer();
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap

//Create a PointLight and turn on shadows for the light
var light = new THREE.PointLight( 0xffffff, 1, 100 );
light.position.set( 0, 10, 0 );
light.castShadow = true; // default false
scene.add( light );

//Set up shadow properties for the light
light.shadow.mapSize.width = 512; // default
light.shadow.mapSize.height = 512; // default
light.shadow.camera.near = 0.5; // default
light.shadow.camera.far = 500 // default

//Create a sphere that cast shadows (but does not receive them)
var sphereGeometry = new THREE.SphereBufferGeometry( 5, 32, 32 );
var sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );
var sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene.add( sphere );

//Create a plane that receives shadows (but does not cast them)
var planeGeometry = new THREE.PlaneBufferGeometry( 20, 20, 32, 32 );
var planeMaterial = new THREE.MeshStandardMaterial( { color: 0x00ff00 } )
var plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
scene.add( plane );

//Create a helper for the shadow camera (optional)
var helper = new THREE.CameraHelper( light.shadow.camera );
scene.add( helper );
</code>
</p>

<h2>构造函数</h2>

<h3>[name]( [param:Camera camera] )</h3>
<p>
[page:Camera camera] - 在光的世界里<br /><br />

创建一个新的[name]。这不能直接调用的 - 它由[page:PointLight]在内部调用,或者由其他阴影用作基类
创建一个新的[name]。这不能直接调用的 - 它由其他阴影用作基类
</p>

<h2>属性</h2>
Expand All @@ -84,6 +43,11 @@ <h3>[property:WebGLRenderTarget map]</h3>
使用内置摄像头生成的深度图;超出像素深度的位置在阴影中。在渲染期间内部计算。
</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>
Expand Down Expand Up @@ -113,9 +77,34 @@ <h3>[property:Float radius]</h3>


<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], [param:Camera viewCamera], [param:number viewportIndex])</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.<br />
viewCamera -- the camera view for which the shadow is being rendered.<br />
viewportIndex -- calculates the matrix for this viewport
</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]中的所有属性的值复制到 SpotLight
将[page:LightShadow source]中的所有属性的值复制到该Light
</p>

<h3>[method:LightShadow clone]()</h3>
Expand All @@ -129,7 +118,8 @@ <h3>[method:Object toJSON]()</h3>
</p>

<h2>源码</h2>

[link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/lights/[name].js src/lights/[name].js]
</p>
</body>
</html>
82 changes: 82 additions & 0 deletions docs/api/zh/lights/shadows/PointLightShadow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!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">
该类在内部由[page:PointLight PointLights]所使用,以用于计算阴影。
</p>


<h2>示例</h2>
<p>
<code>
//Create a WebGLRenderer and turn on shadows in the renderer
var renderer = new THREE.WebGLRenderer();
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap; // default THREE.PCFShadowMap

//Create a PointLight and turn on shadows for the light
var light = new THREE.PointLight( 0xffffff, 1, 100 );
light.position.set( 0, 10, 0 );
light.castShadow = true; // default false
scene.add( light );

//Set up shadow properties for the light
light.shadow.mapSize.width = 512; // default
light.shadow.mapSize.height = 512; // default
light.shadow.camera.near = 0.5; // default
light.shadow.camera.far = 500 // default

//Create a sphere that cast shadows (but does not receive them)
var sphereGeometry = new THREE.SphereBufferGeometry( 5, 32, 32 );
var sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );
var sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );
sphere.castShadow = true; //default is false
sphere.receiveShadow = false; //default
scene.add( sphere );

//Create a plane that receives shadows (but does not cast them)
var planeGeometry = new THREE.PlaneBufferGeometry( 20, 20, 32, 32 );
var planeMaterial = new THREE.MeshStandardMaterial( { color: 0x00ff00 } )
var plane = new THREE.Mesh( planeGeometry, planeMaterial );
plane.receiveShadow = true;
scene.add( plane );

//Create a helper for the shadow camera (optional)
var helper = new THREE.CameraHelper( light.shadow.camera );
scene.add( helper );
</code>
</p>

<h2>构造函数</h2>
<h3>[name]( )</h3>
<p>
创建一个新的[name]。该方法不是直接调用的 —— 其在内部由[page:PointLight]调用。
</p>

<h2>属性</h2>
<p>
共有属性请参见其基类[page:LightShadow LightShadow]。
</p>

<h2>方法</h2>
<p>
共有方法请参见其基类[page:LightShadow 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>
4 changes: 2 additions & 2 deletions docs/api/zh/loaders/AnimationLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ <h3>[name]( [param:LoadingManager manager] )</h3>
</p>

<h2>属性</h2>
<p>See the base [page:Loader] class for common properties.</p>
<p>共有属性请参见其基类[page:Loader]</p>

<h2>方法</h2>
<p>See the base [page:Loader] class for common methods.</p>
<p>共有方法请参见其基类[page:Loader]</p>

<h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
<p>
Expand Down
Loading