Ejemplo n.º 1
0
        public void SetDefaultAssets(UvMapType mapType = UvMapType.Atlas)
        {
            StyleAssetPathBundle styleAssetPathBundle = new StyleAssetPathBundle("Default", Constants.Path.MAP_FEATURE_STYLES_DEFAULT_STYLE_ASSETS);

            texturingType = mapType;
            AssignAssets(styleAssetPathBundle);
        }
        public GeometryExtrusionWithAtlasOptions(GeometryExtrusionOptions extrusionOptions, UVModifierOptions uvOptions)
        {
            extrusionType         = extrusionOptions.extrusionType;
            extrusionGeometryType = extrusionOptions.extrusionGeometryType;
            propertyName          = extrusionOptions.propertyName;
            minimumHeight         = extrusionOptions.minimumHeight;
            maximumHeight         = extrusionOptions.maximumHeight;

            texturingType = uvOptions.texturingType;
            atlasInfo     = uvOptions.atlasInfo;
        }
Ejemplo n.º 3
0
 public GeometryExtrusionWithAtlasOptions(UVModifierOptions uvOptions)
 {
     texturingType = uvOptions.texturingType;
     atlasInfo     = uvOptions.atlasInfo;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Sets up default values for GeometryMaterial Options.
        /// If style is set to Custom, user defined values will be used.
        /// </summary>
        public void SetDefaultMaterialOptions()
        {
            var styleName = style.ToString();

            if (customStyleOptions == null)
            {
                customStyleOptions = new CustomStyleBundle();
                customStyleOptions.SetDefaultAssets();
            }
            if (style == StyleTypes.Custom)
            {
                //nothing to do. Use custom settings
            }
            else
            {
                var samplePaletteName = samplePalettes.ToString();

                var path = Path.Combine(Constants.Path.MAP_FEATURE_STYLES_SAMPLES, Path.Combine(styleName, Constants.Path.MAPBOX_STYLES_ASSETS_FOLDER));

                var styleAssetPathBundle = new StyleAssetPathBundle(styleName, path, samplePaletteName);

                AssignAssets(styleAssetPathBundle);
            }

            switch (style)
            {
            case StyleTypes.Light:
                var lightColor = materials[0].Materials[0].color;
                lightColor.a = lightStyleOpacity;
                materials[0].Materials[0].color = lightColor;

                lightColor   = materials[1].Materials[0].color;
                lightColor.a = lightStyleOpacity;
                materials[1].Materials[0].color = lightColor;
                break;

            case StyleTypes.Dark:
                var darkColor = materials[0].Materials[0].color;
                darkColor.a = darkStyleOpacity;
                materials[0].Materials[0].color = darkColor;

                darkColor   = materials[1].Materials[0].color;
                darkColor.a = darkStyleOpacity;
                materials[1].Materials[0].color = darkColor;
                break;

            case StyleTypes.Color:
                var color = colorStyleColor;
                materials[0].Materials[0].color = color;
                materials[1].Materials[0].color = color;
                break;

            default:
                break;
            }

            if (style == StyleTypes.Satellite)
            {
                texturingType = UvMapType.Tiled;
            }
            else
            {
                texturingType = (style != StyleTypes.Custom && style == StyleTypes.Simple) ? UvMapType.AtlasWithColorPalette : UvMapType.Atlas;
            }
        }