提交 e06e9892 编写于 作者: M Mugen87

Docs: Clean up.

上级 83a04cf6
......@@ -20,7 +20,9 @@
<h2>Example</h2>
[example:webgl_helpers WebGL / helpers]
<p>
[example:webgl_helpers WebGL / helpers]
</p>
<code>
var pointLight = new THREE.PointLight( 0xff0000, 1, 100 );
......
......@@ -25,7 +25,6 @@
<p>
[example:webgl_lights_pointlights lights / pointlights ]<br />
[example:webgl_lights_pointlights2 lights / pointlights2 ]<br />
[example:webgldeferred_animation animation ]<br />
[example:webgl_effects_anaglyph effects / anaglyph ]<br />
[example:webgl_geometry_text geometry / text ]<br />
[example:webgl_lensflares lensflares ]
......
......@@ -19,30 +19,11 @@
This light can cast shadows - see the [page:SpotLightShadow] page for details.
</p>
<h2>Example</h2>
<iframe src='../examples/webgl_lights_spotlight.html'></iframe>
<p>
[example:webgl_lights_spotlight View in Examples ]
</p>
<h2>Other Examples</h2>
<p>
[example:webgl_interactive_cubes_gpu interactive / cubes / gpu ]<br />
[example:webgl_interactive_draggablecubes interactive / draggablecubes ]<br />
[example:webgl_materials_bumpmap_skin materials / bumpmap / skin ]<br />
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]<br />
[example:webgl_loader_md2 loader / md2 ]<br />
[example:webgl_shading_physical shading / physical ]<br />
[example:webgl_materials_bumpmap materials / bumpmap]<br/>
[example:webgl_shading_physical shading / physical]<br/>
[example:webgl_shadowmap shadowmap]<br/>
[example:webgl_shadowmap_performance shadowmap / performance]<br/>
[example:webgl_shadowmap_viewer shadowmap / viewer]
[example:webgl_lights_spotlight lights / spotlight ]<br />
[example:webgl_lights_spotlights lights / spotlights ]
</p>
<h2>Code Example</h2>
......
......@@ -19,7 +19,9 @@
<h2>Example</h2>
[example:webgl_geometry_colors_lookuptable WebGL / geometry / colors / lookuptable]
<p>
[example:webgl_performance WebGL / performance]
</p>
<code>
// instantiate a loader
......
......@@ -19,6 +19,10 @@
<h2>Example</h2>
<p>
[example:webgl_geometry_cube geometry / cube]
</p>
<code>
var texture = new THREE.TextureLoader().load( 'textures/land_ocean_ice_cloud_2048.jpg' );
......@@ -26,8 +30,6 @@
var material = new THREE.MeshBasicMaterial( { map: texture } );
</code>
[example:webgl_geometry_cube geometry / cube]
<h2>Example with Callbacks</h2>
<code>
......
......@@ -21,7 +21,9 @@
<h2>Example</h2>
[example:webgl_shadowmap_pointlight WebGL / shadowmap / pointlight]
<p>
[example:webgl_shadowmap_pointlight WebGL / shadowmap / pointlight]
</p>
<script>
......
......@@ -37,8 +37,10 @@
</script>
<h2>Examples</h2>
[example:webgl_materials_variations_physical materials / variations / physical]<br />
[example:webgl_materials_reflectivity materials / reflectivity]
<p>
[example:webgl_materials_variations_physical materials / variations / physical]<br />
[example:webgl_materials_reflectivity materials / reflectivity]
</p>
<h2>Constructor</h2>
......@@ -70,7 +72,7 @@
'STANDARD': ''
'PHYSICAL': '',
};
</code>
......
......@@ -17,7 +17,10 @@
</p>
<h3>Example</h3>
[example:webgl_geometry_spline_editor geometry / spline / editor]
<p>
[example:webgl_geometry_spline_editor geometry / spline / editor]
</p>
<code>
var planeGeometry = new THREE.PlaneGeometry( 2000, 2000 );
......
......@@ -15,12 +15,12 @@
<p class="desc">A material for a use with a [page:Sprite].</p>
<h2>Examples</h2>
<div>
<p>
[example:webgl_sprites WebGL / sprites]<br />
[example:software_sandbox software / sandbox]<br />
[example:svg_sandbox svg / sandbox]<br />
[example:webgl_materials_cubemap_dynamic webgl / materials / cubemap / dynamic]
</div>
</p>
<code>
var spriteMap = new THREE.TextureLoader().load( 'textures/sprite.png' );
......
......@@ -18,10 +18,14 @@
to reduce the number of draw calls and thus improve the overall rendering performance in your application.
</p>
<h3>Example</h3>
<h3>Examples</h3>
<p>
[example:webgl_instancing_suzanne WebGL / instancing / suzanne]<br />
[example:webgl_instancing_dynamic WebGL / instancing / dynamic]<br />
[example:webgl_instancing_modified WebGL / instancing / modified]<br />
[example:webgl_instancing_performance WebGL / instancing / performance]<br />
[example:webgl_instancing_scatter WebGL / instancing / scatter]<br />
[example:webgl_instancing_raycast WebGL / instancing / raycast]
</p>
<h2>Constructor</h2>
......
......@@ -19,7 +19,9 @@
<h2>Example</h2>
[example:webgl_depth_texture depth / texture]
<p>
[example:webgl_depth_texture depth / texture]
</p>
<h2>Constructor</h2>
<h3>[name]( [param:Number width], [param:Number height], [param:Constant type], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy], [param:Constant format] )</h3>
......
......@@ -20,7 +20,9 @@
<h2>例子</h2>
[example:webgl_helpers WebGL / helpers]
<p>
[example:webgl_helpers WebGL / helpers]
</p>
<code>
var pointLight = new THREE.PointLight( 0xff0000, 1, 100 );
......
......@@ -24,7 +24,6 @@
<p>
[example:webgl_lights_pointlights lights / pointlights ]<br />
[example:webgl_lights_pointlights2 lights / pointlights2 ]<br />
[example:webgldeferred_animation animation ]<br />
[example:webgl_effects_anaglyph effects / anaglyph ]<br />
[example:webgl_geometry_text geometry / text ]<br />
[example:webgl_lensflares lensflares ]
......@@ -46,7 +45,7 @@ scene.add( light );
[page:Number distance] - 这个距离表示从光源到光照强度为0的位置。
当设置为0时,光永远不会消失(距离无穷大)。缺省值 0.<br />
[page:Float decay] - 沿着光照距离的衰退量。缺省值 1。
在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式中,decay = 2。<br /><br />
创建一个新的点光源(PointLight)。
......@@ -75,7 +74,7 @@ scene.add( light );
光功率<br />
在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式中,
表示以"流明(光通量单位)"为单位的光功率。 缺省值 - *4Math.PI*。 <br /><br />
该值与 [page:.intensity intensity] 直接关联
<code>
power = intensity * 4&pi;
......@@ -86,9 +85,9 @@ scene.add( light );
<h3>[property:LightShadow shadow]</h3>
<p>
[page:LightShadow]用与计算此光照的阴影。<br /><br />
此对象的摄像机被设置为 [page:PerspectiveCamera.fov fov] 为90度,[page:PerspectiveCamera.aspect aspect]为1
,近裁剪面 [page:PerspectiveCamera.near near] 为0,远裁剪面[page:PerspectiveCamera.far far]
,近裁剪面 [page:PerspectiveCamera.near near] 为0,远裁剪面[page:PerspectiveCamera.far far]
为500的透视摄像机 [page:PerspectiveCamera]。
</p>
......
......@@ -18,30 +18,11 @@
该光源可以投射阴影 - 跳转至 [page:SpotLightShadow] 查看更多细节。
</p>
<h2>示例</h2>
<iframe src='../examples/webgl_lights_spotlight.html'></iframe>
<p>
[example:webgl_lights_spotlight View in Examples ]
</p>
<h2>其他例子</h2>
<p>
[example:webgl_interactive_cubes_gpu interactive / cubes / gpu ]<br />
[example:webgl_interactive_draggablecubes interactive / draggablecubes ]<br />
[example:webgl_materials_bumpmap_skin materials / bumpmap / skin ]<br />
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]<br />
[example:webgl_loader_md2 loader / md2 ]<br />
[example:webgl_shading_physical shading / physical ]<br />
[example:webgl_materials_bumpmap materials / bumpmap]<br/>
[example:webgl_shading_physical shading / physical]<br/>
[example:webgl_shadowmap shadowmap]<br/>
[example:webgl_shadowmap_performance shadowmap / performance]<br/>
[example:webgl_shadowmap_viewer shadowmap / viewer]
[example:webgl_lights_spotlight lights / spotlight ]<br />
[example:webgl_lights_spotlights lights / spotlights ]
</p>
<h2>代码示例</h2>
......@@ -124,7 +105,7 @@
光功率<br />
在 [page:WebGLRenderer.physicallyCorrectLights physically correct] 模式中,
表示以"流明(光通量单位)"为单位的光功率。 缺省值 - *4Math.PI*。 <br /><br />
该值与 [page:.intensity intensity] 直接关联
<code>
power = intensity * 4&pi;
......
......@@ -19,7 +19,9 @@
<h2>例子</h2>
[example:webgl_geometry_colors_lookuptable WebGL / geometry / colors / lookuptable]
<p>
[example:webgl_performance WebGL / performance]
</p>
<code>
// 初始化一个加载器
......
......@@ -19,6 +19,10 @@
<h2>例子</h2>
<p>
[example:webgl_geometry_cube geometry / cube]
</p>
<code>
var texture = new THREE.TextureLoader().load( 'textures/land_ocean_ice_cloud_2048.jpg' );
......@@ -26,8 +30,6 @@
var material = new THREE.MeshBasicMaterial( { map: texture } );
</code>
[example:webgl_geometry_cube geometry / cube]
<h2>Example with Callbacks</h2>
<code>
......
......@@ -21,7 +21,9 @@
<h2>示例</h2>
[example:webgl_shadowmap_pointlight WebGL / shadowmap / pointlight]
<p>
[example:webgl_shadowmap_pointlight WebGL / shadowmap / pointlight]
</p>
<script>
......
......@@ -35,8 +35,11 @@
</script>
<h2>例子(Examples)</h2>
[example:webgl_materials_variations_physical materials / variations / physical]<br />
[example:webgl_materials_reflectivity materials / reflectivity]
<p>
[example:webgl_materials_variations_physical materials / variations / physical]<br />
[example:webgl_materials_reflectivity materials / reflectivity]
</p>
<h2>构造函数(Constructor)</h2>
......@@ -65,7 +68,7 @@
'STANDARD': ''
'PHYSICAL': '',
};
</code>
[page:WebGLRenderer]使用它来选择shaders。
......
......@@ -17,7 +17,10 @@
</p>
<h3>例子(Example)</h3>
[example:webgl_geometry_spline_editor geometry / spline / editor]
<p>
[example:webgl_geometry_spline_editor geometry / spline / editor]
</p>
<code>
var planeGeometry = new THREE.PlaneGeometry( 2000, 2000 );
......
......@@ -15,12 +15,12 @@
<p class="desc">一种使用[page:Sprite]的材质。</p>
<h2>例子(Examples)</h2>
<div>
<p>
[example:webgl_sprites WebGL / sprites]<br />
[example:software_sandbox software / sandbox]<br />
[example:svg_sandbox svg / sandbox]<br />
[example:webgl_materials_cubemap_dynamic webgl / materials / cubemap / dynamic]
</div>
</p>
<code>
var spriteMap = new THREE.TextureLoader().load( 'textures/sprite.png' );
......
......@@ -18,10 +18,14 @@
to reduce the number of draw calls and thus improve the overall rendering performance in your application.
</p>
<h3>Example</h3>
<h3>Examples</h3>
<p>
[example:webgl_instancing_suzanne WebGL / instancing / suzanne]<br />
[example:webgl_instancing_dynamic WebGL / instancing / dynamic]<br />
[example:webgl_instancing_modified WebGL / instancing / modified]<br />
[example:webgl_instancing_performance WebGL / instancing / performance]<br />
[example:webgl_instancing_scatter WebGL / instancing / scatter]<br />
[example:webgl_instancing_raycast WebGL / instancing / raycast]
</p>
<h2>Constructor</h2>
......
......@@ -17,8 +17,9 @@
</p>
<h2>示例</h2>
[example:webgl_depth_texture depth / texture]
<p>
[example:webgl_depth_texture depth / texture]
</p>
<h2>构造函数</h2>
<h3>[name]( [param:Number width], [param:Number height], [param:Constant type], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy], [param:Constant format] )</h3>
......
......@@ -32,7 +32,7 @@
<h2>Example</h2>
<p>[example:webgl_decals decals ]</p>
<p>[example:webgl_decals WebGL / decals]</p>
<code>var geometry = new THREE.DecalGeometry( mesh, position, orientation, size );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
......
......@@ -19,9 +19,10 @@
<h2>Example</h2>
<p>
[example:webgl_lensflares lensflares]
[example:webgl_lensflares WebGL / lensflares]
</p>
<code>
<code>
var light = new THREE.PointLight( 0xffffff, 1.5, 2000 );
var textureLoader = new THREE.TextureLoader();
......@@ -37,9 +38,7 @@ lensflare.addElement( new THREE.LensflareElement( textureFlare1, 512, 0 ) );
lensflare.addElement( new THREE.LensflareElement( textureFlare2, 60, 0.6 ) );
light.add( lensflare );
</code>
</p>
</code>
<h2>Constructor</h2>
......
......@@ -32,7 +32,7 @@
<h2>Example</h2>
<p>[example:webgl_decals decals ]</p>
<p>[example:webgl_decals WebGL / decals]</p>
<code>var geometry = new THREE.DecalGeometry( mesh, position, orientation, size );
var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
......
......@@ -19,9 +19,10 @@
<h2>示例</h2>
<p>
[example:webgl_lensflares lensflares]
[example:webgl_lensflares WebGL / lensflares]
</p>
<code>
<code>
var light = new THREE.PointLight( 0xffffff, 1.5, 2000 );
var textureLoader = new THREE.TextureLoader();
......@@ -37,9 +38,7 @@ lensflare.addElement( new THREE.LensflareElement( textureFlare1, 512, 0 ) );
lensflare.addElement( new THREE.LensflareElement( textureFlare2, 60, 0.6 ) );
light.add( lensflare );
</code>
</p>
</code>
<h2>Constructor</h2>
......
......@@ -76,14 +76,17 @@
</p>
<h3>Examples</h3>
[example:webgl_geometry_text WebGL / geometry / text]<br />
[example:webgl_shadowmap WebGL / shadowmap]
<p>
[example:webgl_geometry_text WebGL / geometry / text]<br />
[example:webgl_shadowmap WebGL / shadowmap]
</p>
<p>
If Typeface is down, or you want to use a font that is not there, there's a tutorial
with a python script for blender that allows you to export text to Three.js's JSON format:
[link:http://www.jaanga.com/2012/03/blender-to-threejs-create-3d-text-with.html]
</p>
</p>
</div>
......
......@@ -70,14 +70,15 @@
</p>
<h3>示例</h3>
[example:webgl_geometry_text WebGL / geometry / text]<br />
[example:canvas_geometry_text canvas / geometry / text]<br />
[example:webgl_shadowmap WebGL / shadowmap]
<p>
[example:webgl_geometry_text WebGL / geometry / text]<br />
[example:webgl_shadowmap WebGL / shadowmap]
</p>
<p>
如果Typeface已经关闭,或者没有你所想使用的字体,这有一个教程:[link:http://www.jaanga.com/2012/03/blender-to-threejs-create-3d-text-with.html]<br>
这是一个在blender上运行的python脚本,能够让你将文字导出为Three.js的JSON格式。
</p>
</p>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册