Răsfoiți Sursa

Manual: Removed distance references.

Mr.doob 4 luni în urmă
părinte
comite
491c7a016d

+ 1 - 21
manual/en/lights.html

@@ -308,31 +308,12 @@ scene.add(helper);
 }
 -updateLight();
 </pre>
-<p>Note that at some level a <a href="/docs/#api/en/helpers/PointLightHelper"><code class="notranslate" translate="no">PointLightHelper</code></a> has no um, point.
-It just draws a small wireframe diamond. It could just as easily
-be any shape you want, just add a mesh to the light itself.</p>
-<p>A <a href="/docs/#api/en/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a> has the added property of <a href="/docs/#api/en/lights/PointLight#distance"><code class="notranslate" translate="no">distance</code></a>.
-If the <code class="notranslate" translate="no">distance</code> is 0 then the <a href="/docs/#api/en/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a> shines to
-infinity. If the <code class="notranslate" translate="no">distance</code> is greater than 0 then the light shines
-its full intensity at the light and fades to no influence at <code class="notranslate" translate="no">distance</code>
-units away from the light.</p>
-<p>Let's setup the GUI so we can adjust the distance.</p>
-<pre class="prettyprint showlinemods notranslate lang-js" translate="no">const gui = new GUI();
-gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('color');
-gui.add(light, 'intensity', 0, 250, 1);
-+gui.add(light, 'distance', 0, 40).onChange(updateLight);
-
-makeXYZGUI(gui, light.position, 'position', updateLight);
--makeXYZGUI(gui, light.target.position, 'target', updateLight);
-</pre>
-<p>And now try it out.</p>
 <p></p><div translate="no" class="threejs_example_container notranslate">
   <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lights-point.html"></iframe></div>
   <a class="threejs_center" href="/manual/examples/lights-point.html" target="_blank">click here to open in a separate window</a>
 </div>
 
 <p></p>
-<p>Notice when <code class="notranslate" translate="no">distance</code> is &gt; 0 how the light fades out.</p>
 <h2 id="-spotlight-"><a href="/docs/#api/en/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a></h2>
 <p>Spotlights are effectively a point light with a cone
 attached where the light only shines inside the cone.
@@ -378,8 +359,7 @@ the center of the outer cone.</p>
 <p>Notice with the default <code class="notranslate" translate="no">penumbra</code> of 0 the spotlight has a very sharp edge
 whereas as you adjust the <code class="notranslate" translate="no">penumbra</code> toward 1 the edge blurs.</p>
 <p>It might be hard to see the <em>cone</em> of the spotlight. The reason is it's
-below the ground. Shorten the distance to around 5 and you'll see the open
-end of the cone.</p>
+below the ground.</p>
 <h2 id="-rectarealight-"><a href="/docs/#api/en/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a></h2>
 <p>There's one more type of light, the <a href="/docs/#api/en/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a>, which represents
 exactly what it sounds like, a rectangular area of light like a long

+ 0 - 7
manual/examples/lights-point.html

@@ -143,16 +143,9 @@ function main() {
 		const helper = new THREE.PointLightHelper( light );
 		scene.add( helper );
 
-		function updateLight() {
-
-			helper.update();
-
-		}
-
 		const gui = new GUI();
 		gui.addColor( new ColorGUIHelper( light, 'color' ), 'value' ).name( 'color' );
 		gui.add( light, 'intensity', 0, 250, 1 );
-		gui.add( light, 'distance', 0, 40 ).onChange( updateLight );
 
 		makeXYZGUI( gui, light.position, 'position' );
 

+ 0 - 1
manual/examples/lights-spot-w-helper.html

@@ -178,7 +178,6 @@ function main() {
 		const gui = new GUI();
 		gui.addColor( new ColorGUIHelper( light, 'color' ), 'value' ).name( 'color' );
 		gui.add( light, 'intensity', 0, 250, 1 );
-		gui.add( light, 'distance', 0, 40 ).onChange( updateLight );
 		gui.add( new DegRadHelper( light, 'angle' ), 'value', 0, 90 ).name( 'angle' ).onChange( updateLight );
 		gui.add( light, 'penumbra', 0, 1, 0.01 );
 

+ 0 - 1
manual/examples/shadows-point-light.html

@@ -206,7 +206,6 @@ function main() {
 		const gui = new GUI();
 		gui.addColor( new ColorGUIHelper( light, 'color' ), 'value' ).name( 'color' );
 		gui.add( light, 'intensity', 0, 200 );
-		gui.add( light, 'distance', 0, 40 ).onChange( updateCamera );
 
 		{
 

+ 0 - 1
manual/examples/shadows-spot-light-with-camera-gui.html

@@ -225,7 +225,6 @@ function main() {
 		const gui = new GUI();
 		gui.addColor( new ColorGUIHelper( light, 'color' ), 'value' ).name( 'color' );
 		gui.add( light, 'intensity', 0, 200 );
-		gui.add( light, 'distance', 0, 40 ).onChange( updateCamera );
 		gui.add( new DegRadHelper( light, 'angle' ), 'value', 0, 90 ).name( 'angle' ).onChange( updateCamera );
 		gui.add( light, 'penumbra', 0, 1, 0.01 );
 

+ 0 - 1
manual/examples/shadows-spot-light-with-shadow-radius.html

@@ -226,7 +226,6 @@ function main() {
 		const gui = new GUI();
 		gui.addColor( new ColorGUIHelper( light, 'color' ), 'value' ).name( 'color' );
 		gui.add( light, 'intensity', 0, 200 );
-		gui.add( light, 'distance', 0, 40 ).onChange( updateCamera );
 		gui.add( new DegRadHelper( light, 'angle' ), 'value', 0, 90 ).name( 'angle' ).onChange( updateCamera );
 		gui.add( light, 'penumbra', 0, 1, 0.01 );
 

+ 1 - 21
manual/fr/lights.html

@@ -308,31 +308,12 @@ scene.add(helper);
 }
 -updateLight();
 </pre>
-<p>Notez qu'à un certain niveau, un <a href="/docs/#api/en/helpers/PointLightHelper"><code class="notranslate" translate="no">Helper de Lumière Ponctuelle</code></a> n'a pas de... point.
-Il dessine simplement un petit losange en fil de fer. Cela pourrait tout aussi facilement
-être n'importe quelle forme que vous souhaitez, il suffit d'ajouter un maillage à la lumière elle-même.</p>
-<p>Une <a href="/docs/#api/en/lights/PointLight"><code class="notranslate" translate="no">Lumière Ponctuelle</code></a> a la propriété supplémentaire de <a href="/docs/#api/en/lights/PointLight#distance"><code class="notranslate" translate="no">distance</code></a>.
-Si la <code class="notranslate" translate="no">distance</code> est 0, alors la <a href="/docs/#api/en/lights/PointLight"><code class="notranslate" translate="no">Lumière Ponctuelle</code></a> brille à
-l'infini. Si la <code class="notranslate" translate="no">distance</code> est supérieure à 0, alors la lumière brille
-à pleine intensité au niveau de la lumière et s'estompe jusqu'à ne plus avoir d'influence à
-<code class="notranslate" translate="no">distance</code> unités de distance de la lumière.</p>
-<p>Configurons l'interface GUI pour que nous puissions ajuster la distance.</p>
-<pre class="prettyprint showlinemods notranslate lang-js" translate="no">const gui = new GUI();
-gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('couleur');
-gui.add(light, 'intensity', 0, 250, 1);
-+gui.add(light, 'distance', 0, 40).onChange(updateLight);
-
-makeXYZGUI(gui, light.position, 'position', updateLight);
--makeXYZGUI(gui, light.target.position, 'target', updateLight);
-</pre>
-<p>Et maintenant, essayez.</p>
 <p></p><div translate="no" class="threejs_example_container notranslate">
   <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lights-point.html"></iframe></div>
   <a class="threejs_center" href="/manual/examples/lights-point.html" target="_blank">cliquez ici pour ouvrir dans une fenêtre séparée</a>
 </div>
 
 <p></p>
-<p>Remarquez quand <code class="notranslate" translate="no">distance</code> est > 0 comment la lumière s'estompe.</p>
 <h2 id="-spotlight-"><a href="/docs/#api/en/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a></h2>
 <p>Les projecteurs sont effectivement une lumière ponctuelle avec un cône
 attaché où la lumière ne brille qu'à l'intérieur du cône.
@@ -378,8 +359,7 @@ le centre du cône extérieur.</p>
 <p>Remarquez qu'avec la <code class="notranslate" translate="no">penumbra</code> par défaut de 0, le projecteur a un bord très net,
 tandis que lorsque vous ajustez la <code class="notranslate" translate="no">penumbra</code> vers 1, le bord devient flou.</p>
 <p>Il peut être difficile de voir le <em>cône</em> du projecteur. La raison est qu'il est
-en dessous du sol. Raccourcissez la distance à environ 5 et vous verrez l'extrémité ouverte
-du cône.</p>
+en dessous du sol.</p>
 <h2 id="-rectarealight-"><a href="/docs/#api/en/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a></h2>
 <p>Il existe un autre type de lumière, la <a href="/docs/#api/en/lights/RectAreaLight"><code class="notranslate" translate="no">Lumière Rectangulaire</code></a>, qui représente
 exactement ce à quoi cela ressemble : une zone rectangulaire de lumière, comme un long

+ 0 - 17
manual/ja/lights.html

@@ -278,29 +278,12 @@ scene.add(helper);
 }
 -updateLight();
 </pre>
-<p><a href="/docs/#api/ja/helpers/PointLightHelper"><code class="notranslate" translate="no">PointLightHelper</code></a> には点がない事に注意して下さい。
-小さなダイヤモンドのワイヤーフレームを描画します。
-簡単に望む任意の形状にできて、ライト自体にメッシュを追加します。</p>
-<p><a href="/docs/#api/ja/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a> は <a href="/docs/#api/ja/lights/PointLight#distance"><code class="notranslate" translate="no">distance</code></a>プロパティを持ちます。
-<code class="notranslate" translate="no">distance</code> が0ならば <a href="/docs/#api/ja/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a> は無限大に輝きます。
-<code class="notranslate" translate="no">distance</code> が0よりも大きい場合、ライトに向かってライトの全強度を照らし、ライトから離れた <code class="notranslate" translate="no">distance</code> では影響を受けないようにフェードアウトします。</p>
-<p>distanceを調整できるようにGUIを設定してみましょう。</p>
-<pre class="prettyprint showlinemods notranslate lang-js" translate="no">const gui = new GUI();
-gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('color');
-gui.add(light, 'intensity', 0, 250, 1);
-+gui.add(light, 'distance', 0, 40).onChange(updateLight);
-
-makeXYZGUI(gui, light.position, 'position', updateLight);
--makeXYZGUI(gui, light.target.position, 'target', updateLight);
-</pre>
-<p>これを試してみて下さい。</p>
 <p></p><div translate="no" class="threejs_example_container notranslate">
   <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lights-point.html"></iframe></div>
   <a class="threejs_center" href="/manual/examples/lights-point.html" target="_blank">ここをクリックして別のウィンドウで開きます</a>
 </div>
 
 <p></p>
-<p><code class="notranslate" translate="no">distance</code> が &gt; 0 の時にライトがフェードアウトしている事に注目して下さい。</p>
 <h2 id="-spotlight-"><code class="notranslate" translate="no">SpotLight(集中光線)</code></h2>
 <p>集中光源は円錐体にライティングする時に効果的です。
 実際は2つの円錐体があります。外側と内側の円錐体です。

+ 1 - 19
manual/ko/lights.html

@@ -288,29 +288,12 @@ scene.add(helper);
 }
 -updateLight();
 </pre>
-<p><a href="/docs/#api/ko/helpers/PointLightHelper"><code class="notranslate" translate="no">PointLightHelper</code></a>는 점의 표상을 그립니다. 점의 표상이란 점으로는 확인이 어려우니,
-기본값으로 다이아몬드 형태의 와이어프레임(wireframe)을 대신 그려놓은 것이죠. 점의
-형태는 조명에 <code class="notranslate" translate="no">mesh</code> 객체를 하나 넘겨 얼마든지 바꿀 수 있습니다.</p>
-<p><a href="/docs/#api/ko/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a>에는 추가로 <a href="/docs/#api/ko/lights/PointLight#distance"><code class="notranslate" translate="no">distance</code></a> 속성이 있습니다.
-<code class="notranslate" translate="no">distance</code>가이 0이면 <a href="/docs/#api/ko/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a>의 밝기가 무한대임을 의미하고,  0보다 크면
-<code class="notranslate" translate="no">distance</code>에 지정된 거리만큼만 영향을 미칩니다.</p>
-<p>거리도 조정할 수 있도록 GUI에 추가하겠습니다.</p>
-<pre class="prettyprint showlinemods notranslate lang-js" translate="no">const gui = new GUI();
-gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('color');
-gui.add(light, 'intensity', 0, 250, 1);
-+gui.add(light, 'distance', 0, 40).onChange(updateLight);
-
-makeXYZGUI(gui, light.position, 'position', updateLight);
--makeXYZGUI(gui, light.target.position, 'target', updateLight);
-</pre>
-<p>이제 한 번 테스트해보죠.</p>
 <p></p><div translate="no" class="threejs_example_container notranslate">
   <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lights-point.html"></iframe></div>
   <a class="threejs_center" href="/manual/examples/lights-point.html" target="_blank">새 탭에서 보기</a>
 </div>
 
 <p></p>
-<p><code class="notranslate" translate="no">distance</code>가 0보다 클 때 조명의 밝기를 잘 관찰해보세요.</p>
 <h2 id="-spotlight-"><a href="/docs/#api/ko/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a></h2>
 <p>스포트라이트는 비유하자면 원뿔 안의 <a href="/docs/#api/ko/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a>입니다.
 차이점은 원뿔 안에서만 빛난다는 점이죠. <a href="/docs/#api/ko/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a>의
@@ -353,8 +336,7 @@ scene.add(helper);
 <p><code class="notranslate" translate="no">penumbra</code> 속성이 0일 때는 빛의 경계가 굉장히 분명한 것이 보일 겁니다.
 <code class="notranslate" translate="no">penumbra</code> 속성을 1에 가깝게 조정하면 경계가 점점 흐릿해지죠.</p>
 <p><a href="/docs/#api/ko/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a>가 <em>원뿔 모양</em>처럼 보이지 않을지도 모릅니다. 이는 바닥이 원뿔의
-거리보다 가까이 있기 때문으로, <code class="notranslate" translate="no">distance</code>를 약 5 정도로 조정하면 원뿔의 밑면을
-확인할 수 있을 겁니다.</p>
+거리보다 가까이 있기 때문입니다.</p>
 <h2 id="-rectarealight-"><a href="/docs/#api/ko/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a></h2>
 <p>마지막으로 살펴볼 조명은 <a href="/docs/#api/ko/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a>입니다. 이름 그대로 사각 형태의
 조명으로, 형광등이나 천장의 유리를 통과하는 태양빛을 표현하기에 적합합니다.</p>

+ 0 - 18
manual/ru/lights.html

@@ -306,30 +306,12 @@ scene.add(helper);
 }
 -updateLight();
 </pre>
-<p>Обратите внимание, что на каком-то уровне <a href="/docs/#api/en/helpers/PointLightHelper"><code class="notranslate" translate="no">PointLightHelper</code></a> не имеет точки.
-Он просто рисует маленький каркас ромба. Это может быть любая
-форма, которую вы хотите, просто добавьте mesh к самому источнику света.</p>
-<p><a href="/docs/#api/en/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a> имеет дополнительное свойство <a href="/docs/#api/en/lights/PointLight#distance"><code class="notranslate" translate="no">distance</code></a>.
-Если <code class="notranslate" translate="no">distance</code> = 0, то  <a href="/docs/#api/en/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a> светит до бесконечности. Если значение
-<code class="notranslate" translate="no">distance</code> больше 0, то свет излучает свою полную интенсивность и
-исчезает, с увеличением <code class="notranslate" translate="no">distance</code> вдали от света.</p>
-<p>Давайте настроим графический интерфейс, чтобы мы могли регулировать расстояние.</p>
-<pre class="prettyprint showlinemods notranslate lang-js" translate="no">const gui = new GUI();
-gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('color');
-gui.add(light, 'intensity', 0, 250, 1);
-+gui.add(light, 'distance', 0, 40).onChange(updateLight);
-
-makeXYZGUI(gui, light.position, 'position', updateLight);
--makeXYZGUI(gui, light.target.position, 'target', updateLight);
-</pre>
-<p>А теперь попробуйте.</p>
 <p></p><div translate="no" class="threejs_example_container notranslate">
   <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lights-point.html"></iframe></div>
   <a class="threejs_center" href="/manual/examples/lights-point.html" target="_blank">нажмите здесь, чтобы открыть в отдельном окне</a>
 </div>
 
 <p></p>
-<p>Обратите внимание, когда <code class="notranslate" translate="no">distance</code> &gt; 0, как свет гаснет.</p>
 <h2 id="-spotlight-"><a href="/docs/#api/en/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a></h2>
 <p>Прожекторы - это точечный источник света с прикрепленным к нему
 конусом, который светит только внутри конуса. Там на самом деле

+ 1 - 15
manual/zh/lights.html

@@ -250,26 +250,12 @@ scene.add(helper);
 }
 -updateLight();
 </pre>
-<p><a href="/docs/#api/zh/helpers/PointLightHelper"><code class="notranslate" translate="no">PointLightHelper</code></a> 不是一个点,而是在光源的位置绘制了一个小小的线框宝石体来代表点光源。也可以使用其他形状来表示点光源,只要给点光源添加一个自定义的 <a href="/docs/#api/zh/objects/Mesh"><code class="notranslate" translate="no">Mesh</code></a> 子节点即可。</p>
-<p>点光源(<a href="/docs/#api/zh/lights/PointLight"><code class="notranslate" translate="no">PointLight</code></a>)有额外的一个范围(<a href="/docs/#api/zh/lights/PointLight#distance"><code class="notranslate" translate="no">distance</code></a>)属性。
-如果 <code class="notranslate" translate="no">distance</code> 设为 0,则光线可以照射到无限远处。如果大于 0,则只可以照射到指定的范围,光照强度在这个过程中逐渐衰减,在光源位置时,<code class="notranslate" translate="no">intensity</code> 是设定的大小,在距离光源 <code class="notranslate" translate="no">distance</code> 位置的时候,<code class="notranslate" translate="no">intensity</code> 为 0。</p>
-<p>下面是添加对 distance 参数控制的代码:</p>
-<pre class="prettyprint showlinemods notranslate lang-js" translate="no">const gui = new GUI();
-gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('color');
-gui.add(light, 'intensity', 0, 250, 1);
-+gui.add(light, 'distance', 0, 40).onChange(updateLight);
-
-makeXYZGUI(gui, light.position, 'position', updateLight);
--makeXYZGUI(gui, light.target.position, 'target', updateLight);
-</pre>
-<p>效果如下:</p>
 <p></p><div translate="no" class="threejs_example_container notranslate">
   <div><iframe class="threejs_example notranslate" translate="no" style=" " src="/manual/examples/resources/editor.html?url=/manual/examples/lights-point.html"></iframe></div>
   <a class="threejs_center" href="/manual/examples/lights-point.html" target="_blank">点击此处在新标签页中打开</a>
 </div>
 
 <p></p>
-<p>注意 <code class="notranslate" translate="no">distance</code> &gt; 0 时光照强度的衰减现象。</p>
 <h2 id="-spotlight-">聚光灯(<a href="/docs/#api/zh/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a>)</h2>
 <p>聚光灯可以看成是一个点光源被一个圆锥体限制住了光照的范围。实际上有两个圆锥,内圆锥和外圆锥。光照强度在两个锥体之间从设定的强度递减到 0(具体可以看下方 <a href="/docs/#api/zh/lights/SpotLight#penumbra"><code class="notranslate" translate="no">penumbra</code></a> 参数)。</p>
 <p>聚光灯(<a href="/docs/#api/zh/lights/SpotLight"><code class="notranslate" translate="no">SpotLight</code></a>)类似方向光(<a href="/docs/#api/zh/lights/DirectionalLight"><code class="notranslate" translate="no">DirectionalLight</code></a>)一样需要一个目标点,光源的位置是圆锥的顶点,目标点处于圆锥的中轴线上。</p>
@@ -299,7 +285,7 @@ scene.add(helper);
 
 <p></p>
 <p>注意观察,当 <code class="notranslate" translate="no">penumbra</code> 为默认值 0 的时候,聚光灯会有非常清晰的边缘,而当把 <code class="notranslate" translate="no">penumbra</code> 向 1 调节的时候,边缘会开始模糊。</p>
-<p>示例中有点难以看到聚光灯的整个圆锥体,因为圆锥底部在平面下方。将 <code class="notranslate" translate="no">distance</code> 减小到 5 左右,就可以看到圆锥的底部。</p>
+<p>示例中有点难以看到聚光灯的整个圆锥体,因为圆锥底部在平面下方。</p>
 <h2 id="-rectarealight-">矩形区域光(<a href="/docs/#api/zh/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a>)</h2>
 <p>Three.js 中还有一种类型的光照,矩形区域光(<a href="/docs/#api/zh/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a>), 顾名思义,表示一个矩形区域的发射出来的光照,例如长条的日光灯或者天花板上磨砂玻璃透进来的自然光。</p>
 <p><a href="/docs/#api/zh/lights/RectAreaLight"><code class="notranslate" translate="no">RectAreaLight</code></a> 只能影响 <a href="/docs/#api/zh/materials/MeshStandardMaterial"><code class="notranslate" translate="no">MeshStandardMaterial</code></a> 和 <a href="/docs/#api/zh/materials/MeshPhysicalMaterial"><code class="notranslate" translate="no">MeshPhysicalMaterial</code></a>,所以我们把所有的材质都改为 <a href="/docs/#api/zh/materials/MeshStandardMaterial"><code class="notranslate" translate="no">MeshStandardMaterial</code></a>。</p>

粤ICP备19079148号