From b77054f3f268eec7b9c6c289010ddd619e15c551 Mon Sep 17 00:00:00 2001
From: Mugen87
يجمع جميع المواد في المشهد مع الكاميرا. هذا مفيد لـ
تجميع الشادرات قبل العرض الأول.
+ Async version of [page:WebGLRenderer.compile .compile](). The method returns a Promise that resolves when the
+ given 3D object or scene can be rendered without unnecessary stalling due to shader compilation.
+
+ This method makes use of the *KHR_parallel_shader_compile* WebGL extension.
+
- Compiles all materials in the scene with the camera. This is useful to - precompile shaders before the first rendering. + Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering. +
+ +
+ Async version of [page:WebGLRenderer.compile .compile](). The method returns a Promise that resolves when the
+ given 3D object or scene can be rendered without unnecessary stalling due to shader compilation.
+
+ This method makes use of the *KHR_parallel_shader_compile* WebGL extension.
Compila tutti i materiali nella scena con la telecamera. Questo è utile per precompilare le ombre prima del primo rendering.
+
+ Async version of [page:WebGLRenderer.compile .compile](). The method returns a Promise that resolves when the
+ given 3D object or scene can be rendered without unnecessary stalling due to shader compilation.
+ This method makes use of the *KHR_parallel_shader_compile* WebGL extension.
+
Copia i pixel dal WebGLFramebuffer corrente in una texture 2D. Abilita l'accesso a diff --git a/docs/api/zh/renderers/WebGLRenderer.html b/docs/api/zh/renderers/WebGLRenderer.html index 365c2ff28cafc6..84c12d8423e5db 100644 --- a/docs/api/zh/renderers/WebGLRenderer.html +++ b/docs/api/zh/renderers/WebGLRenderer.html @@ -271,6 +271,14 @@
使用相机编译场景中的所有材质。这对于在首次渲染之前预编译着色器很有用。
+
+ Async version of [page:WebGLRenderer.compile .compile](). The method returns a Promise that resolves when the
+ given 3D object or scene can be rendered without unnecessary stalling due to shader compilation.
+
+ This method makes use of the *KHR_parallel_shader_compile* WebGL extension.
+
将当前WebGLFramebuffer中的像素复制到2D纹理中。可访问[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/copyTexImage2D WebGLRenderingContext.copyTexImage2D].
diff --git a/examples/webgl_loader_gltf.html b/examples/webgl_loader_gltf.html index b097d884f6f24c..a7c64f48347102 100644 --- a/examples/webgl_loader_gltf.html +++ b/examples/webgl_loader_gltf.html @@ -63,10 +63,6 @@ const loader = new GLTFLoader().setPath( 'models/gltf/DamagedHelmet/glTF/' ); loader.load( 'DamagedHelmet.gltf', async function ( gltf ) { - // Calling compileAsync returns a promise that resolves when gltf.scene can be added - // to scene without unnecessary stalling on shader compilation. This helps the page - // stay responsive during startup. - await renderer.compileAsync( gltf.scene, camera ); scene.add( gltf.scene ); diff --git a/examples/webgl_loader_gltf_transmission.html b/examples/webgl_loader_gltf_transmission.html index 64203de5e33e94..9b2e20a2126a72 100644 --- a/examples/webgl_loader_gltf_transmission.html +++ b/examples/webgl_loader_gltf_transmission.html @@ -70,10 +70,6 @@ mixer = new THREE.AnimationMixer( gltf.scene ); mixer.clipAction( gltf.animations[ 0 ] ).play(); - // Calling compileAsync returns a promise that resolves when gltf.scene can be added - // to scene without unnecessary stalling on shader compilation. This helps the page - // stay responsive during startup. - await renderer.compileAsync( gltf.scene, camera ); scene.add( gltf.scene );