dist/index.js
function stretch(object, axis, distance, offset) {
  var normal = {
    x: [1, 0, 0],
    y: [0, 1, 0],
    z: [0, 0, 1]
  };
  var bounds = object.getBounds();
  var size = util.size(object);
  var cutDelta = util.getDelta(size, bounds, axis, offset, true);
  // console.log('stretch.cutDelta', cutDelta, normal[axis]);
  return object.stretchAtPlane(normal[axis], cutDelta, distance);
}
function stretch(object, axis, distance, offset) {
  var normal = {
    x: [1, 0, 0],
    y: [0, 1, 0],
    z: [0, 0, 1]
  };
  var bounds = object.getBounds();
  var size = util.size(object);
  var cutDelta = util.getDelta(size, bounds, axis, offset, true);
  // console.log('stretch.cutDelta', cutDelta, normal[axis]);
  return object.stretchAtPlane(normal[axis], cutDelta, distance);
}
function stretch ( object , axis , distance , offset ) { var normal = { x : [ 1 , 0 , 0 ] , y : [ 0 , 1 , 0 ] , z : [ 0 , 0 , 1 ] } ; var bounds = object . getBounds ( ) ; var size = util . size ( object ) ; var cutDelta = util . getDelta ( size , bounds , axis , offset , true ) ; // console.log('stretch.cutDelta', cutDelta, normal[axis]); return object . stretchAtPlane ( normal [ axis ] , cutDelta , distance ) ; }
Wraps the `stretchAtPlane` call using the same
logic as `bisect`.
@param  {CSG} object   Object to stretch
@param  {String} axis     Axis to streatch along
@param  {Number} distance Distance to stretch
@param  {Number} offset   Offset along the axis to cut the object
@return {CSG}          The stretched object.
Wraps the stretchAtPlane call using the same logic as bisect .