Ver código fonte

Docs: Improve fog pages. (#25474)

Michael Herzog 2 anos atrás
pai
commit
34d84c6854

+ 5 - 0
docs/api/en/scenes/Fog.html

@@ -11,6 +11,11 @@
 
 		<p class="desc">This class contains the parameters that define linear fog, i.e., that grows linearly denser with the distance.</p>
 
+		<h2>Code Example</h2>
+
+		<code>const scene = new THREE.Scene();
+		scene.fog = new THREE.Fog( 0xcccccc, 10, 15 );
+		</code>
 
 		<h2>Constructor</h2>
 

+ 5 - 0
docs/api/en/scenes/FogExp2.html

@@ -11,6 +11,11 @@
 
 		<p class="desc">This class contains the parameters that define exponential squared fog, which gives a clear view near the camera and a faster than exponentially densening fog farther from the camera.</p>
 
+		<h2>Code Example</h2>
+
+		<code>const scene = new THREE.Scene();
+		scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
+		</code>
 
 		<h2>Constructor</h2>
 

+ 5 - 0
docs/api/it/scenes/Fog.html

@@ -11,6 +11,11 @@
 
 		<p class="desc">Questa classe contiene i parametri che definiscono la nebbia lineare, cioè che cresce linearmente con la distanza.</p>
 
+		<h2>Codice di Esempio</h2>
+
+		<code>const scene = new THREE.Scene();
+		scene.fog = new THREE.Fog( 0xcccccc, 10, 15 );
+		</code>
 
 		<h2>Costruttore</h2>
 

+ 6 - 0
docs/api/it/scenes/FogExp2.html

@@ -15,6 +15,12 @@
 			a densità esponenziale più lontana dalla telecamera.
 		</p>
 
+		<h2>Codice di Esempio</h2>
+
+		<code>const scene = new THREE.Scene();
+		scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
+		</code>
+
 		<h2>Costruttore</h2>
 
 

+ 5 - 0
docs/api/zh/scenes/Fog.html

@@ -11,6 +11,11 @@
 
 		<p class="desc">这个类中的参数定义了线性雾。也就是说,雾的密度是随着距离线性增大的。</p>
 
+		<h2>代码示例</h2>
+
+		<code>const scene = new THREE.Scene();
+		scene.fog = new THREE.Fog( 0xcccccc, 10, 15 );
+		</code>
 
 		<h2>构造器</h2>
 

+ 6 - 0
docs/api/zh/scenes/FogExp2.html

@@ -11,6 +11,12 @@
 
 		<p class="desc">该类所包含的参数定义了指数雾,它可以在相机附近提供清晰的视野,且距离相机越远,雾的浓度随着指数增长越快。</p>
 
+		<h2>代码示例</h2>
+
+		<code>const scene = new THREE.Scene();
+		scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 );
+		</code>
+
 		<h2>构造器</h2>