build/module/lib/visual/Grid.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 Grid(contextManager, options, levelUp) {
        if (options === void 0) { options = {}; }
        if (levelUp === void 0) { levelUp = 0; }
        var _this = _super.call(this, void 0, void 0, contextManager, {}, levelUp + 1) || this;
        _this.setLoggingName('Grid');
        expectOptions(OPTION_NAMES, Object.keys(options));
        var mode = geometryModeFromOptions(options, GeometryMode.WIRE);
        switch (mode) {
            case GeometryMode.POINT: {
                configPoints(contextManager, options, _this);
                break;
            }
            case GeometryMode.WIRE: {
                configLines(contextManager, options, _this);
                break;
            }
            case GeometryMode.MESH: {
                configMesh(contextManager, options, _this);
                break;
            }
            default: {
                throw new Error("'" + mode + "' is not a valid option for mode.");
            }
        }
        setAxisAndMeridian(_this, options);
        setColorOption(_this, options, Color.gray);
        setDeprecatedOptions(_this, options);
        if (levelUp === 0) {
            _this.synchUp();
        }
        return _this;
    }
function Grid ( contextManager , options , levelUp ) { if ( options === void 0 ) { options = { } ; } if ( levelUp === void 0 ) { levelUp = 0 ; } var _this = _super . call ( this , void 0 , void 0 , contextManager , { } , levelUp + 1 ) || this ; _this . setLoggingName ( 'Grid' ) ; expectOptions ( OPTION_NAMES , Object . keys ( options ) ) ; var mode = geometryModeFromOptions ( options , GeometryMode . WIRE ) ; switch ( mode ) { case GeometryMode . POINT : { configPoints ( contextManager , options , _this ) ; break ; } case GeometryMode . WIRE : { configLines ( contextManager , options , _this ) ; break ; } case GeometryMode . MESH : { configMesh ( contextManager , options , _this ) ; break ; } default : { throw new Error ( "'" + mode + "' is not a valid option for mode." ) ; } } setAxisAndMeridian ( _this , options ) ; setColorOption ( _this , options , Color . gray ) ; setDeprecatedOptions ( _this , options ) ; 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 ` .