PolygonMaterial
PolygonMaterial represents a material for polygon geometry rendering.
Properties
Section titled “Properties”applyWaterNormal
Section titled “applyWaterNormal”Type: boolean | undefined
Description: Specifies whether to apply a water normal map.
Default: undefined
Example:
{ polygon: { applyWaterNormal: false }}castShadow
Section titled “castShadow”Type: boolean | undefined
Description: Specifies whether the polygon casts shadows.
Default: undefined
Example:
{ polygon: { castShadow: true }}clampToGround
Section titled “clampToGround”Type: boolean | undefined
Description: Specifies whether to clamp to the ground.
Default: undefined
Example:
{ polygon: { clampToGround: true }}Type: Color
Description: Specifies the polygon color as a Color instance.
Default: Required
Example:
import { Color } from "@navaramap/three";
{ polygon: { color: new Color().setHex(0x00cc66) }}effectIds
Section titled “effectIds”Type: string[] | undefined
Description: Specifies the IDs of selective effects to apply (e.g., “bloom”, “outline”). Used in conjunction with SelectiveBloomEffectDesc or SelectiveOutlineEffectDesc.
Default: undefined
Example:
{ polygon: { effectIds: ["bloom", "outline"] }}emissiveColor
Section titled “emissiveColor”Type: Color | undefined
Description: Specifies the emissive color as a Color instance.
Default: undefined
Example:
import { Color } from "@navaramap/three";
{ polygon: { emissiveColor: new Color().setHex(0xff0000) }}emissiveIntensity
Section titled “emissiveIntensity”Type: number | undefined
Description: Specifies the emissive intensity. The default value is 0.3 when the Bloom effect is enabled.
Default: undefined
Example:
{ polygon: { emissiveIntensity: 0.5 }}extrudedHeight
Section titled “extrudedHeight”Type: number | undefined
Description: Specifies the extrusion height. This works when clampToGround is false.
Default: undefined
Example:
{ polygon: { extrudedHeight: 50 // 50 meters extrusion }}height
Section titled “height”Type: number | undefined
Description: Specifies the height. This works when clampToGround is false. The unit is meters.
Default: undefined
Example:
{ polygon: { height: 10 // 10 meters height }}Type: number | undefined
Description: Specifies the Index of Refraction. Affects the refraction of light passing through the material.
Default: undefined
Example:
{ polygon: { ior: 1.5 // Index of refraction for glass }}opacity
Section titled “opacity”Type: number | undefined
Description: Specifies the opacity of the polygon. Specified in the range of 0.0 (fully transparent) to 1.0 (fully opaque). Requires transparent to be enabled.
Default: undefined
Example:
{ polygon: { opacity: 0.5 }}outline
Section titled “outline”Type: boolean | undefined
Description: Whether to compute outline geometry. Only effective at initial load time. When not set, inferred from outlineShow.
Default: undefined
Example:
{ polygon: { outline: true }}outlineColor
Section titled “outlineColor”Type: Color | undefined
Description: Specifies the outline color as a Color instance. Currently, this property is only supported for GeoJSON.
Default: undefined
Example:
import { Color } from "@navaramap/three";
{ polygon: { outlineColor: new Color().setHex(0xff00ff) }}outlineShow
Section titled “outlineShow”Type: boolean | undefined
Description: Specifies whether to show the outline. Currently, this property is only supported for GeoJSON.
Default: undefined
Example:
{ polygon: { outlineShow: false }}outlineWidth
Section titled “outlineWidth”Type: number | undefined
Description: Specifies the outline width. Currently, this property is only supported for GeoJSON. The unit is pixels.
Default: undefined
Example:
{ polygon: { outlineWidth: 2 }}perPositionHeight
Section titled “perPositionHeight”Type: boolean | undefined
Description: Specifies whether to obtain height from the data. When false, the height is a constant value.
Default: undefined
Example:
{ polygon: { perPositionHeight: true }}receiveShadow
Section titled “receiveShadow”Type: boolean | undefined
Description: Specifies whether the polygon receives shadows.
Default: undefined
Example:
{ polygon: { receiveShadow: true }}reflectivity
Section titled “reflectivity”Type: number | undefined
Description: Specifies the reflectivity for post-processing or environment maps.
Default: undefined
Example:
{ polygon: { reflectivity: 0.5 }}roughness
Section titled “roughness”Type: number | undefined
Description: Specifies the roughness for post-processing. Specified in the range of 0.0 to 1.0.
Default: undefined
Example:
{ polygon: { roughness: 0.2 }}shininess
Section titled “shininess”Type: number | undefined
Description: Specifies the shininess of the material.
Default: undefined
Example:
{ polygon: { shininess: 100 }}Type: boolean | undefined
Description: Specifies whether to show the polygon.
Default: undefined
Example:
{ polygon: { show: true }}specular
Section titled “specular”Type: boolean | undefined
Description: Specifies whether to enable the specular effect. When enabled, the shininess and specularStrength values are used.
Default: undefined
Example:
{ polygon: { specular: true }}specularStrength
Section titled “specularStrength”Type: number | undefined
Description: Specifies the intensity of specular highlights.
Default: undefined
Example:
{ polygon: { specularStrength: 2 }}surfaceShow
Section titled “surfaceShow”Type: boolean | undefined
Description: Specifies whether to show the polygon surface. Currently, this property is only supported for GeoJSON. This is effective when outlineShow is true.
Default: undefined
Example:
{ polygon: { surfaceShow: true }}transparent
Section titled “transparent”Type: boolean | undefined
Description: Specifies whether to enable transparency. Must be set to true to use opacity. May cause unexpected behavior when using effects.
Default: undefined
Example:
{ polygon: { transparent: true }}Type: boolean | undefined
Description: Splits the polygon into XYZ vector tiles for rendering, even when the data source is not an MVT layer. This can improve performance for large polygons. Enabling clampToGround implicitly forces tiled to true. Outline rendering is not supported when tiled is enabled.
Default: false
Example:
{ polygon: { tiled: true }}Type: boolean | undefined
Description: Specifies whether to apply a water surface material to the polygon. May slow down mesh loading.
Default: undefined
Example:
{ polygon: { water: true }}waterScaleNormal
Section titled “waterScaleNormal”Type: number | undefined
Description: Specifies the scale of the water surface normals. Smaller values make the water surface rougher.
Default: undefined
Example:
{ polygon: { waterScaleNormal: 2.0 }}waterSpeed
Section titled “waterSpeed”Type: number | undefined
Description: Specifies the speed of water waves.
Default: undefined
Example:
{ polygon: { waterSpeed: 0.003 }}wireframe
Section titled “wireframe”Type: boolean | undefined
Description: Specifies whether to display as wireframe.
Default: undefined
Example:
{ polygon: { wireframe: false }}