build/module/lib/visual/Cylinder.js
/**
     * @param contextManager This will usually be provided by the `Engine`.
     * @param options
     * @param levelUp Leave as zero unless you are extending this class.
     */
@param contextManager This will usually be provided by the `Engine`.
@param options
@param levelUp Leave as zero unless you are extending this class.
@param contextManager This will usually be provided by the ` Engine ` . @param options @param levelUp Leave as zero unless you are extending this class .
function Cylinder(contextManager, options, levelUp) {
        if (options === void 0) { options = {}; }
        if (levelUp === void 0) { levelUp = 0; }
        var _this = _super.call(this, void 0, void 0, contextManager, { axis: referenceAxis(options, ds.axis).direction(), meridian: referenceMeridian(options, ds.meridian).direction() }, levelUp + 1) || this;
        _this.setLoggingName('Cylinder');
        var geoOptions = { kind: 'CylinderGeometry' };
        geoOptions.mode = geometryModeFromOptions(options);
        geoOptions.offset = offsetFromOptions(options);
        geoOptions.tilt = spinorE3Object(options.tilt);
        geoOptions.axis = vectorE3Object(referenceAxis(options, ds.axis).direction());
        geoOptions.meridian = vectorE3Object(referenceMeridian(options, ds.meridian).direction());
        geoOptions.openCap = options.openCap;
        geoOptions.openBase = options.openBase;
        geoOptions.openWall = options.openWall;
        geoOptions.heightSegments = options.heightSegments;
        geoOptions.thetaSegments = options.thetaSegments;
        var geometry = new CylinderGeometry(contextManager, geoOptions);
        _this.geometry = geometry;
        geometry.release();
        var material = materialFromOptions(contextManager, simplexModeFromOptions(options, SimplexMode.TRIANGLE), options);
        _this.material = material;
        material.release();
        setAxisAndMeridian(_this, options);
        setColorOption(_this, options, options.textured ? Color.white : Color.gray);
        setDeprecatedOptions(_this, options);
        _this.radius = isDefined(options.radius) ? mustBeNumber('radius', options.radius) : ds.radius;
        if (isDefined(options.length)) {
            _this.length = mustBeNumber('length', options.length);
        }
        if (levelUp === 0) {
            _this.synchUp();
        }
        return _this;
    }
function Cylinder ( contextManager , options , levelUp ) { if ( options === void 0 ) { options = { } ; } if ( levelUp === void 0 ) { levelUp = 0 ; } var _this = _super . call ( this , void 0 , void 0 , contextManager , { axis : referenceAxis ( options , ds . axis ) . direction ( ) , meridian : referenceMeridian ( options , ds . meridian ) . direction ( ) } , levelUp + 1 ) || this ; _this . setLoggingName ( 'Cylinder' ) ; var geoOptions = { kind : 'CylinderGeometry' } ; geoOptions . mode = geometryModeFromOptions ( options ) ; geoOptions . offset = offsetFromOptions ( options ) ; geoOptions . tilt = spinorE3Object ( options . tilt ) ; geoOptions . axis = vectorE3Object ( referenceAxis ( options , ds . axis ) . direction ( ) ) ; geoOptions . meridian = vectorE3Object ( referenceMeridian ( options , ds . meridian ) . direction ( ) ) ; geoOptions . openCap = options . openCap ; geoOptions . openBase = options . openBase ; geoOptions . openWall = options . openWall ; geoOptions . heightSegments = options . heightSegments ; geoOptions . thetaSegments = options . thetaSegments ; var geometry = new CylinderGeometry ( contextManager , geoOptions ) ; _this . geometry = geometry ; geometry . release ( ) ; var material = materialFromOptions ( contextManager , simplexModeFromOptions ( options , SimplexMode . TRIANGLE ) , options ) ; _this . material = material ; material . release ( ) ; setAxisAndMeridian ( _this , options ) ; setColorOption ( _this , options , options . textured ? Color . white : Color . gray ) ; setDeprecatedOptions ( _this , options ) ; _this . radius = isDefined ( options . radius ) ? mustBeNumber ( 'radius' , options . radius ) : ds . radius ; if ( isDefined ( options . length ) ) { _this . length = mustBeNumber ( 'length' , options . length ) ; } if ( levelUp === 0 ) { _this . synchUp ( ) ; } return _this ; }
@param contextManager This will usually be provided by the `Engine`.
@param contextManager This will usually be provided by the ` Engine ` .