浏览代码

improve doc

David Catuhe 6 年之前
父节点
当前提交
252eb17c3c
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      src/Meshes/transformNode.ts
  2. 2 1
      src/node.ts

+ 1 - 0
src/Meshes/transformNode.ts

@@ -622,6 +622,7 @@ export class TransformNode extends Node {
     /**
      * Defines the passed node as the parent of the current node.
      * The node will remain exactly where it is and its position / rotation will be updated accordingly
+     * @see https://doc.babylonjs.com/how_to/parenting
      * @param node the node ot set as the parent
      * @returns this TransformNode.
      */

+ 2 - 1
src/node.ts

@@ -154,7 +154,8 @@ export class Node implements IBehaviorAware<Node> {
     }
 
     /**
-     * Gets or sets the parent of the node
+     * Gets or sets the parent of the node (without keeping the current position in the scene) 
+     * @see https://doc.babylonjs.com/how_to/parenting
      */
     public set parent(parent: Nullable<Node>) {
         if (this._parentNode === parent) {