浏览代码

Merge pull request #18726 from Mugen87/dev29

Docs: Improve UniformUtils page.
Mr.doob 5 年之前
父节点
当前提交
dab3e3aa23
共有 2 个文件被更改,包括 31 次插入7 次删除
  1. 17 4
      docs/api/en/renderers/shaders/UniformsUtils.html
  2. 14 3
      docs/api/zh/renderers/shaders/UniformsUtils.html

+ 17 - 4
docs/api/en/renderers/shaders/UniformsUtils.html

@@ -10,15 +10,28 @@
 	<body>
 		<h1>[name]</h1>
 
-		<p class="desc">Uniform Utilities. Support merging and cloning of uniform variables</p>
-
-		<h2>Properties</h2>
+		<p class="desc">
+			Provides utility functions for managing uniforms.
+		</p>
 
+		<h2>Methods</h2>
 
+		<h3>[method:Object clone]( [param:Object src] )</h3>
+		<p>
+		src -- An object representing uniform definitions.<br /><br />
 
-		<h2>Methods</h2>
+		Clones the given uniform definitions by performing a deep-copy. That means if
+		the [page:Uniform.value value] of a uniform refers to an object like a [page:Vector3]
+		or [page:Texture], the cloned uniform will refer to a new object reference.
+		</p>
 
+		<h3>[method:Object merge]( [param:Array uniforms] )</h3>
+		<p>
+		uniforms -- An array of objects containing uniform definitions.<br /><br />
 
+		Merges the given uniform definitions into a single object. Since the method
+		internally uses [page:.clone](), it performs a deep-copy when producing the
+		merged uniform definitions.
 
 		<h2>Source</h2>
 

+ 14 - 3
docs/api/zh/renderers/shaders/UniformsUtils.html

@@ -12,13 +12,24 @@
 
 		<p class="desc">Uniform工具. 支持uniform变量的合并和克隆</p>
 
-		<h2>属性</h2>
-
+		<h2>方法</h2>
 
+		<h3>[method:Object clone]( [param:Object src] )</h3>
+		<p>
+		src -- An object representing uniform definitions.<br /><br />
 
-		<h2>方法</h2>
+		Clones the given uniform definitions by performing a deep-copy. That means if
+		the [page:Uniform.value value] of a uniform refers to an object like a [page:Vector3]
+		or [page:Texture], the cloned uniform will refer to a new object reference.
+		</p>
 
+		<h3>[method:Object merge]( [param:Array uniforms] )</h3>
+		<p>
+		uniforms -- An array of objects containing uniform definitions.<br /><br />
 
+		Merges the given uniform definitions into a single object. Since the method
+		internally uses [page:.clone](), it performs a deep-copy when producing the
+		merged uniform definitions.
 
 		<h2>源码</h2>