Skip to content

Commit 87faa70

Browse files
authored
Merge pull request #17672 from Mugen87/dev39
Docs: Add note about onBeforeCompile().
2 parents f9630d6 + 3041f23 commit 87faa70

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/api/en/materials/Material.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ <h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer r
342342
An optional callback that is executed immediately before the shader program is compiled.
343343
This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.
344344
</p>
345+
<p>
346+
Unlike properties, the callback is not supported by [page:Material.clone .clone](), [page:Material.copy .copy]() and [page:Material.toJSON .toJSON]().
347+
</p>
345348

346349
<h3>[method:null setValues]( [param:object values] )</h3>
347350
<p>

docs/api/zh/materials/Material.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ <h3>[method:null dispose]()</h3>
291291
<h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
292292
<p> 在编译shader程序之前立即执行的可选回调。此函数使用shader源码作为参数。用于修改内置材质。
293293
</p>
294+
<p>
295+
Unlike properties, the callback is not supported by [page:Material.clone .clone](), [page:Material.copy .copy]() and [page:Material.toJSON .toJSON]().
296+
</p>
294297

295298
<h3>[method:null setValues]( [param:object values] )</h3>
296299
<p> values -- 具有参数的容器。

0 commit comments

Comments
 (0)