src/Transform.js
function _getLocalPositionFromWorldPosition(transform) {
  if (transform.parent === undefined)
    return transform.position;
  else
    return transform.parent.rotation.inverse().mulVector3(transform.position.sub(transform.parent.position));
}
function _getLocalPositionFromWorldPosition(transform) {
  if (transform.parent === undefined)
    return transform.position;
  else
    return transform.parent.rotation.inverse().mulVector3(transform.position.sub(transform.parent.position));
}
function _getLocalPositionFromWorldPosition ( transform ) { if ( transform . parent === undefined ) return transform . position ; else return transform . parent . rotation . inverse ( ) . mulVector3 ( transform . position . sub ( transform . parent . position ) ) ; }
Sets the local position of the transform according to the world position

@param {Transform} transform
Sets the local position of the transform according to the world position