docs: function _Transform(position, rotation) {
    var _position = new Vector3();
    var _rotation = Quaternion.identity;
    var _localPosition = _position;
    var _localRotation = _rotation;
    var _parent = undefined;
    var _children = [];
    this.name = "object";
  
    if(position && (position instanceof Vector3)) {
      _position = position;
      _localPosition = position;
    }
    if(rotation && (rotation instanceof Quaternion)) {
      _rotation = rotation;
      _localRotation = rotation;
    }
  
    /**
     * Position of the object in world coordinate system
     */
    Object.defineProperty(this, "position", {
      get: function() { return _position; },
      set: function(val) {
        if(val instanceof Vector3) {
          _position = val;
          _localPosition = _getLocalPositionFromWorldPosition(this);
          _adjustChildren(_children);
        }
      }
    });
  
    /**
     * Rotation of the object in world coordinate system
     */
    Object.defineProperty(this, "rotation", {
      get: function() { return _rotation; },
      set: function(val) {
        if(val instanceof Quaternion) {
          _rotation = val;
          _localRotation = _getLocalRotationFromWorldRotation(this);
          _adjustChildren(_children);
        }
      }
    });
  
    /**
     * Position of the object in local coordinate system
     */
    Object.defineProperty(this, "localPosition", {
      get: function() { return _localPosition; },
      set: function(val) {
        if(val instanceof Vector3) {
          _localPosition = val;
          _position = _getWorldPositionFromLocalPosition(this);
        }
      }
    });
  
    /**
     * Rotation of the object in local coordinate system
     */
    Object.defineProperty(this, "localRotation", {
      get: function() { return _localRotation; },
      set: function(val) {
        if(val instanceof Quaternion) {
          _localRotation = val;
          _rotation = _getWorldRotationFromLocalRotation(this);
        }
      }
    });
  
    /**
     * Parent transform
     * Set to undefined if there is none
     */
    Object.defineProperty(this, "parent", {
      get: function() { return _parent; },
      set: function(val) {
        if(val instanceof _Transform) {
          _parent = val;
          _localRotation = _getLocalRotationFromWorldRotation(this);
          _localPosition = _getLocalPositionFromWorldPosition(this);
          _parent.addChild(this);
        } else if(val === undefined) {
          var temp = _parent;
          _parent = undefined;
          _localRotation = _rotation;
          _localPosition = _position;
          temp.removeChild(this);
        }
      }
    });
  
    readonly(this, "forward", _getForward(this));
    readonly(this, "right", _getRight(this));
    readonly(this, "up", _getUp(this));
    readonly(this, "localToWorldMatrix", _getLocalToWorldMatrix(this));
    readonly(this, "worldToLocalMatrix", _getWorldtoLocalMatrix(this));
    readonly(this, "root", _getRoot(this));
  
    /**
     * Adds a new child transform
     *
     * @param {Transform} transform
     */
    this.addChild = function(child) {
      if(!(child instanceof _Transform))
        throw new TypeError("Child must be a Transform.")
  
      if(child.parent !== this)
        child.parent = this;
  
      _children.push(child);
    }
  
    /**
     * Removes a previously added child transform
     *
     * @param {Transform} transform
     */
    this.removeChild = function(child) {
      if(!(child instanceof _Transform))
        throw new TypeError("Child must be a Transform.")
  
      if(child.parent === this)
        child.parent = undefined;
  
      var index = _children.indexOf(child);
  
      if(index != -1)
        _children.splice(index, 1);
    }
  }