浏览代码

Docs: Clarify onBeforeRender() and onAfterRender().

Mugen87 4 年之前
父节点
当前提交
4e652f87ac
共有 2 个文件被更改,包括 22 次插入2 次删除
  1. 12 2
      docs/api/en/core/Object3D.html
  2. 10 0
      docs/api/zh/core/Object3D.html

+ 12 - 2
docs/api/en/core/Object3D.html

@@ -105,17 +105,27 @@
 
 		<h3>[property:Function onAfterRender]</h3>
 		<p>
-		An optional callback that is executed immediately after the Object3D is rendered.
+		An optional callback that is executed immediately after a 3D object is rendered.
 		This function is called with the following parameters: renderer, scene, camera, geometry,
 		material, group.
 		</p>
+		<p>
+		Please notice that this callback is only executed for *renderable* 3D objects. Meaning 3D objects which define their visual
+		appearance with geometries and materials like instances of [page:Mesh], [page:Line], [page:Points] or [page:Sprite].
+		Instances of [page:Object3D], [page:Group] or [page:Bone] are not renderable and thus this callback is not executed for such objects.
+		</p>
 
 		<h3>[property:Function onBeforeRender]</h3>
 		<p>
-		An optional callback that is executed immediately before the Object3D is rendered.
+		An optional callback that is executed immediately before a 3D object is rendered.
 		This function is called with the following parameters: renderer, scene, camera, geometry,
 		material, group.
 		</p>
+		<p>
+		Please notice that this callback is only executed for *renderable* 3D objects. Meaning 3D objects which define their visual
+		appearance with geometries and materials like instances of [page:Mesh], [page:Line], [page:Points] or [page:Sprite].
+		Instances of [page:Object3D], [page:Group] or [page:Bone] are not renderable and thus this callback is not executed for such objects.
+		</p>
 
 		<h3>[property:Object3D parent]</h3>
 		<p>Object's parent in the [link:https://en.wikipedia.org/wiki/Scene_graph scene graph]. An object can have at most

+ 10 - 0
docs/api/zh/core/Object3D.html

@@ -104,12 +104,22 @@
 		一个可选的回调函数,在Object3D渲染之后直接执行。
 		使用以下参数来调用此函数:renderer,scene,camera,geometry,material,group。
 	</p>
+	<p>
+	Please notice that this callback is only executed for *renderable* 3D objects. Meaning 3D objects which define their visual
+	appearance with geometries and materials like instances of [page:Mesh], [page:Line], [page:Points] or [page:Sprite].
+	Instances of [page:Object3D], [page:Group] or [page:Bone] are not renderable and thus this callback is not executed for such objects.
+	</p>
 
 	<h3>[property:Function onBeforeRender]</h3>
 	<p>
 		一个可选的回调函数,在Object3D渲染之前直接执行。
 		使用以下参数来调用此函数:renderer,scene,camera,geometry,material,group。
 	</p>
+	<p>
+	Please notice that this callback is only executed for *renderable* 3D objects. Meaning 3D objects which define their visual
+	appearance with geometries and materials like instances of [page:Mesh], [page:Line], [page:Points] or [page:Sprite].
+	Instances of [page:Object3D], [page:Group] or [page:Bone] are not renderable and thus this callback is not executed for such objects.
+	</p>
 
 	<h3>[property:Object3D parent]</h3>
 	<p>在[link:https://en.wikipedia.org/wiki/Scene_graph scene graph](场景图)中,一个对象的父级对象。