瀏覽代碼

Docs: Add note about onBeforeCompile().

Mugen87 5 年之前
父節點
當前提交
3041f238fe
共有 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.
 		This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.
 		</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>
 		<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>
 <p> 在编译shader程序之前立即执行的可选回调。此函数使用shader源码作为参数。用于修改内置材质。
 </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>
 <p> values -- 具有参数的容器。