ソースを参照

Docs: Improve `WebGLRenderer` page. (#26972)

Michael Herzog 1 年間 前
コミット
7804e92da8

+ 4 - 4
docs/api/ar/renderers/WebGLRenderer.html

@@ -350,16 +350,16 @@
 		</p>
 		 
 		<h3>
-		[method:undefined compile]( [param:Object3D scene], [param:Camera camera] )
+		[method:Set compile]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )
 		</h3>
 		<p>
-		يجمع جميع المواد في المشهد مع الكاميرا. هذا مفيد لـ
-		تجميع الشادرات قبل العرض الأول. <br />
+		يجمع جميع المواد الموجودة في المشهد بالكاميرا. يعد هذا مفيدًا لتجميع التظليل مسبقًا قبل العرض الأول.
+		إذا كنت تريد إضافة كائن ثلاثي الأبعاد إلى مشهد موجود، فاستخدم المعلمة الاختيارية الثالثة لتطبيق المشهد المستهدف. <br />
 		لاحظ أنه يجب تكوين إضاءة المشهد قبل استدعاء هذه الطريقة.
 		</p>
 
 		<h3>
-			[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera] )
+			[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )
 		</h3>
 		<p>
 			إصدار غير متزامن من [page:WebGLRenderer.compile .compile](). تقوم الطريقة بإرجاع Promise 

+ 5 - 4
docs/api/en/renderers/WebGLRenderer.html

@@ -348,15 +348,16 @@ document.body.appendChild( renderer.domElement );
 		</p>
 
 		<h3>
-			[method:undefined compile]( [param:Object3D scene], [param:Camera camera] )
+			[method:Set compile]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )
 		</h3>
 		<p>
-			Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering. <br />
-			Note that the scene's lighting should be configured before calling this method.
+			Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.
+			If you want to add a 3D object to an existing scene, use the third optional parameter for applying the target scene.<br />
+			Note that the (target) scene's lighting and environment should be configured before calling this method.
 		</p>	
 
 		<h3>
-			[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera] )
+			[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )
 		</h3>
 		<p>
 			Asynchronous version of [page:WebGLRenderer.compile .compile](). The method returns a Promise that resolves when the 

+ 4 - 3
docs/api/it/renderers/WebGLRenderer.html

@@ -307,13 +307,14 @@
 		<h3>[method:undefined clearStencil]( )</h3>
 		<p>Cancella il buffer di stencil. Equivalente a chiamare [page:WebGLRenderer.clear .clear]( false, false, true ).</p>
 
-		<h3>[method:undefined compile]( [param:Object3D scene], [param:Camera camera] )</h3>
+		<h3>[method:Set compile]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )</h3>
 		<p>
-			Compila tutti i materiali nella scena con la telecamera. Questo è utile per precompilare le ombre prima del primo rendering.<br/>
+			Compila tutti i materiali nella scena con la telecamera. Questo è utile per precompilare le ombre prima del primo rendering.
+			Se desideri aggiungere un oggetto 3D a una scena esistente, utilizza il terzo parametro opzionale per applicare la scena di destinazione.<br/>
 			Tieni presente che l'illuminazione della scena deve essere configurata prima di chiamare questo metodo.
 		</p>
 
-		<h3>[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera] )</h3>
+		<h3>[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )</h3>
 		<p>
 			Versione asincrona di [page:WebGLRenderer.compile .compile](). Il metodo restituisce una Promise che si risolve quando è possibile eseguire 
 			il rendering di un determinato oggetto 3D o scena senza inutili stalli dovuti alla compilazione dello shader.<br /><br />

+ 4 - 3
docs/api/zh/renderers/WebGLRenderer.html

@@ -268,13 +268,14 @@
 		<h3>[method:undefined clearStencil]( )</h3>
 		<p>清除模板缓存。相当于调用[page:WebGLRenderer.clear .clear]( false, false, true )</p>
 
-		<h3>[method:undefined compile]( [param:Object3D scene], [param:Camera camera] )</h3>
+		<h3>[method:Set compile]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )</h3>
 		<p>
-			使用相机编译场景中的所有材质。这对于在首次渲染之前预编译着色器很有用。<br />
+			使用相机编译场景中的所有材质。这对于在首次渲染之前预编译着色器很有用。
+			如果要将 3D 对象添加到现有场景,请使用第三个可选参数来应用目标场景。<br />
 			请注意,在调用此方法之前应配置场景的照明。
 		</p>
 
-		<h3>[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera] )</h3>
+		<h3>[method:Promise compileAsync]( [param:Object3D scene], [param:Camera camera], [param:Scene targetScene] )</h3>
 		<p>
 			[page:WebGLRenderer.compile .compile]() 的异步版本。该方法返回一个 Promise。它解决了何时可以渲染给定的 3D 对象或场景,而不会因着色器编译而出现不必要的停顿。<br /><br />
 			此方法利用 *KHR_parallel_shader_compile*。