build/browser/index.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 HollowCylinder(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('HollowCylinder');
            var geoOptions = { kind: 'HollowCylinderGeometry' };
            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.outerRadius = isDefined(options.outerRadius) ? mustBeNumber('outerRadius', options.outerRadius) : ds.radius;
            geoOptions.innerRadius = isDefined(options.innerRadius) ? mustBeNumber('innerRadius', options.innerRadius) : 0.5 * geoOptions.outerRadius;
            geoOptions.sliceAngle = options.sliceAngle;
            var geometry = new HollowCylinderGeometry(contextManager, geoOptions);
            _this.geometry = geometry;
            geometry.release();
            var mmo = { kind: 'MeshMaterial', attributes: {}, uniforms: {} };
            mmo.attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION] = 3;
            mmo.attributes[GraphicsProgramSymbols.ATTRIBUTE_NORMAL] = 3;
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_COLOR] = 'vec3';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_OPACITY] = 'float';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_MODEL_MATRIX] = 'mat4';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_NORMAL_MATRIX] = 'mat3';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_PROJECTION_MATRIX] = 'mat4';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_VIEW_MATRIX] = 'mat4';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_AMBIENT_LIGHT] = 'vec3';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_COLOR] = 'vec3';
            mmo.uniforms[GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_DIRECTION] = 'vec3';
            var material = new MeshMaterial(contextManager, mmo);
            _this.material = material;
            material.release();
            setAxisAndMeridian(_this, options);
            setColorOption(_this, options, Color.gray);
            setDeprecatedOptions(_this, options);
            if (isDefined(options.length)) {
                _this.length = mustBeNumber('length', options.length);
            }
            if (levelUp === 0) {
                _this.synchUp();
            }
            return _this;
        }
function HollowCylinder ( 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 ( 'HollowCylinder' ) ; var geoOptions = { kind : 'HollowCylinderGeometry' } ; 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 . outerRadius = isDefined ( options . outerRadius ) ? mustBeNumber ( 'outerRadius' , options . outerRadius ) : ds . radius ; geoOptions . innerRadius = isDefined ( options . innerRadius ) ? mustBeNumber ( 'innerRadius' , options . innerRadius ) : 0.5 * geoOptions . outerRadius ; geoOptions . sliceAngle = options . sliceAngle ; var geometry = new HollowCylinderGeometry ( contextManager , geoOptions ) ; _this . geometry = geometry ; geometry . release ( ) ; var mmo = { kind : 'MeshMaterial' , attributes : { } , uniforms : { } } ; mmo . attributes [ GraphicsProgramSymbols . ATTRIBUTE_POSITION ] = 3 ; mmo . attributes [ GraphicsProgramSymbols . ATTRIBUTE_NORMAL ] = 3 ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_COLOR ] = 'vec3' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_OPACITY ] = 'float' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_MODEL_MATRIX ] = 'mat4' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_NORMAL_MATRIX ] = 'mat3' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_PROJECTION_MATRIX ] = 'mat4' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_VIEW_MATRIX ] = 'mat4' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_AMBIENT_LIGHT ] = 'vec3' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_DIRECTIONAL_LIGHT_COLOR ] = 'vec3' ; mmo . uniforms [ GraphicsProgramSymbols . UNIFORM_DIRECTIONAL_LIGHT_DIRECTION ] = 'vec3' ; var material = new MeshMaterial ( contextManager , mmo ) ; _this . material = material ; material . release ( ) ; setAxisAndMeridian ( _this , options ) ; setColorOption ( _this , options , Color . gray ) ; setDeprecatedOptions ( _this , options ) ; 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 ` .