src/staging/replace-furniture.js
function getNewPosition(element3d, offset) {

  var s = Math.sin(element3d.ry / 180 * Math.PI)
  var c = Math.cos(element3d.ry / 180 * Math.PI)
  var newPosition = {
    x: element3d.x + offset.x * c + offset.z * s,
    y: element3d.y + offset.y,
    z: element3d.z - offset.x * s + offset.z * c
  }
  return newPosition
}
function getNewPosition(element3d, offset) {

  var s = Math.sin(element3d.ry / 180 * Math.PI)
  var c = Math.cos(element3d.ry / 180 * Math.PI)
  var newPosition = {
    x: element3d.x + offset.x * c + offset.z * s,
    y: element3d.y + offset.y,
    z: element3d.z - offset.x * s + offset.z * c
  }
  return newPosition
}
function getNewPosition ( element3d , offset ) { var s = Math . sin ( element3d . ry / 180 * Math . PI ) var c = Math . cos ( element3d . ry / 180 * Math . PI ) var newPosition = { x : element3d . x + offset . x * c + offset . z * s , y : element3d . y + offset . y , z : element3d . z - offset . x * s + offset . z * c } return newPosition }
compute new position based on bounding boxes
compute new position based on bounding boxes