build/browser/index.js
/**
     * Transform a list of points by applying a tilt rotation and an offset translation.
     * @hidden
     */
Transform a list of points by applying a tilt rotation and an offset translation.
@hidden
Transform a list of points by applying a tilt rotation and an offset translation . @hidden
function transform(xs, options) {
        if (options.tilt || options.offset) {
            var points = xs.map(function (coords) { return Geometric3.vector(coords[0], coords[1], coords[2]); });
            if (options.tilt) {
                points.forEach(function (point) {
                    point.rotate(options.tilt);
                });
            }
            if (options.offset) {
                points.forEach(function (point) {
                    point.addVector(options.offset);
                });
            }
            return points.map(function (point) { return [point.x, point.y, point.z]; });
        }
        else {
            return xs;
        }
    }
function transform ( xs , options ) { if ( options . tilt || options . offset ) { var points = xs . map ( function ( coords ) { return Geometric3 . vector ( coords [ 0 ] , coords [ 1 ] , coords [ 2 ] ) ; } ) ; if ( options . tilt ) { points . forEach ( function ( point ) { point . rotate ( options . tilt ) ; } ) ; } if ( options . offset ) { points . forEach ( function ( point ) { point . addVector ( options . offset ) ; } ) ; } return points . map ( function ( point ) { return [ point . x , point . y , point . z ] ; } ) ; } else { return xs ; } }
Transform a list of points by applying a tilt rotation and an offset translation.
Transform a list of points by applying a tilt rotation and an offset translation .