浏览代码

Merge pull request #17672 from Mugen87/dev39

Docs: Add note about onBeforeCompile().
Mr.doob 6 年之前
父节点
当前提交
87faa70e9d
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3 0
      docs/api/en/materials/Material.html
  2. 3 0
      docs/api/zh/materials/Material.html

+ 3 - 0
docs/api/en/materials/Material.html

@@ -342,6 +342,9 @@
 		An optional callback that is executed immediately before the shader program is compiled.
 		An optional callback that is executed immediately before the shader program is compiled.
 		This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.
 		This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.
 		</p>
 		</p>
+		<p>
+		Unlike properties, the callback is not supported by [page:Material.clone .clone](), [page:Material.copy .copy]() and [page:Material.toJSON .toJSON]().
+		</p>
 
 
 		<h3>[method:null setValues]( [param:object values] )</h3>
 		<h3>[method:null setValues]( [param:object values] )</h3>
 		<p>
 		<p>

+ 3 - 0
docs/api/zh/materials/Material.html

@@ -291,6 +291,9 @@ Defines whether this material is tone mapped according to the renderer's [page:W
 <h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
 <h3>[method:null onBeforeCompile]( [param:Shader shader], [param:WebGLRenderer renderer] )</h3>
 <p> 在编译shader程序之前立即执行的可选回调。此函数使用shader源码作为参数。用于修改内置材质。
 <p> 在编译shader程序之前立即执行的可选回调。此函数使用shader源码作为参数。用于修改内置材质。
 </p>
 </p>
+<p>
+Unlike properties, the callback is not supported by [page:Material.clone .clone](), [page:Material.copy .copy]() and [page:Material.toJSON .toJSON]().
+</p>
 
 
 <h3>[method:null setValues]( [param:object values] )</h3>
 <h3>[method:null setValues]( [param:object values] )</h3>
 <p> values -- 具有参数的容器。
 <p> values -- 具有参数的容器。