build/browser/index.js
/**
     * This function computes the reference axis of an object.
     * @hidden
     */
This function computes the reference axis of an object.
@hidden
This function computes the reference axis of an object . @hidden
function referenceAxis(options, fallback) {
        if (options.tilt) {
            var axis = Geometric3.fromVector(canonicalAxis$4).rotate(options.tilt);
            return vec(axis.x, axis.y, axis.z);
        }
        else if (options.axis) {
            var axis = options.axis;
            return vec(axis.x, axis.y, axis.z).direction();
        }
        else if (typeof options.height === 'object') {
            console.warn("height is deprecated. Please use axis instead.");
            var axis = options.height;
            return vec(axis.x, axis.y, axis.z).direction();
        }
        else if (options.meridian) {
            var B = Geometric3.dualOfVector(canonicalAxis$4);
            var tilt = Geometric3.rotorFromVectorToVector(canonicalMeridian$1, options.meridian, B);
            var axis = Geometric3.fromVector(canonicalAxis$4).rotate(tilt);
            return vec(axis.x, axis.y, axis.z).direction();
        }
        else if (options.cutLine) {
            console.warn("cutLine is deprecated. Please use meridian instead.");
            var B = Geometric3.dualOfVector(canonicalAxis$4);
            var tilt = Geometric3.rotorFromVectorToVector(canonicalMeridian$1, options.cutLine, B);
            var axis = Geometric3.fromVector(canonicalAxis$4).rotate(tilt);
            return vec(axis.x, axis.y, axis.z).direction();
        }
        else {
            return vec(fallback.x, fallback.y, fallback.z);
        }
    }
function referenceAxis ( options , fallback ) { if ( options . tilt ) { var axis = Geometric3 . fromVector ( canonicalAxis$4 ) . rotate ( options . tilt ) ; return vec ( axis . x , axis . y , axis . z ) ; } else if ( options . axis ) { var axis = options . axis ; return vec ( axis . x , axis . y , axis . z ) . direction ( ) ; } else if ( typeof options . height === 'object' ) { console . warn ( "height is deprecated. Please use axis instead." ) ; var axis = options . height ; return vec ( axis . x , axis . y , axis . z ) . direction ( ) ; } else if ( options . meridian ) { var B = Geometric3 . dualOfVector ( canonicalAxis$4 ) ; var tilt = Geometric3 . rotorFromVectorToVector ( canonicalMeridian$1 , options . meridian , B ) ; var axis = Geometric3 . fromVector ( canonicalAxis$4 ) . rotate ( tilt ) ; return vec ( axis . x , axis . y , axis . z ) . direction ( ) ; } else if ( options . cutLine ) { console . warn ( "cutLine is deprecated. Please use meridian instead." ) ; var B = Geometric3 . dualOfVector ( canonicalAxis$4 ) ; var tilt = Geometric3 . rotorFromVectorToVector ( canonicalMeridian$1 , options . cutLine , B ) ; var axis = Geometric3 . fromVector ( canonicalAxis$4 ) . rotate ( tilt ) ; return vec ( axis . x , axis . y , axis . z ) . direction ( ) ; } else { return vec ( fallback . x , fallback . y , fallback . z ) ; } }
This function computes the reference axis of an object.
This function computes the reference axis of an object .