Joint3d-SDK Docs
  • Base
  • Map
  • Layers
  • Overlays
  • Materials
  • Effects
  • Tools
  • Analysis
  • ThirdPart
  • English
  • 简体中文
  • Base
  • Map
  • Layers
  • Overlays
  • Materials
  • Effects
  • Tools
  • Analysis
  • ThirdPart
  • English
  • 简体中文
  • Material

    • Joint3d.ColorMaterialProperty
      • example
      • creation
    • Joint3d.ImageMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleBlurMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleDiffuseMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleFadeMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CirclePulseMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleScanMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleSpiralMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleVaryMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.CircleWaveMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.EllipsoidElectricMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.EllipsoidTrailMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineDashMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineArrowMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineOutlineMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineGlowMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineFlickerMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineFlowMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineImageTrailMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineLightingMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineLightingTrailMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.PolylineTrailMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.RadarLineMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.RadarWaveMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.WallImageTrailMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.WallTrailMaterialProperty
      • example
      • creation
      • properties
    • Joint3d.WaterMaterialProperty
      • example
      • creation
      • properties
  • material
2022-01-10
目录

Material

# Material

In the real world, each object would react differently to light. Steel looks more shiny than a ceramic vase, and a wooden box would not reflect light as strongly as a steel box. Each object also reacts differently to specular highlights. Some objects don't scatter a lot of light but reflect a lot of light, resulting in a smaller highlight, and some objects scatter a lot and they produce a larger radius highlight. If we want to simulate multiple types of objects in OpenGL, we must define the Material property for each object separately.

# Joint3d.ColorMaterialProperty

# example

let material = new Joint3d.ColorMaterialProperty(Joint3d.Color.RED)

# creation

  • constructor(color)

    • parameters
      • {Joint3d.Color} color
    • returns material

# Joint3d.ImageMaterialProperty

# example

let material = new Joint3d.ImageMaterialProperty({
  image: '**/**.png',
  transparent: true,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns material
//options(optional)
{
  "image": "",
  "repeat": { "x": 1, "y": 1 },
  "color": Joint3d.Color.WHITE,
  "transparent": false
}

# properties

  • {String} image
  • {Object} repeat
  • {Joint3d.Color} color
  • {Boolean} transparent

# Joint3d.CircleBlurMaterialProperty

# example

let material = new Joint3d.CircleBlurMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CircleDiffuseMaterialProperty

# example

let material = new Joint3d.CircleDiffuseMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CircleFadeMaterialProperty

# example

let material = new Joint3d.CircleFadeMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CirclePulseMaterialProperty

# example

let material = new Joint3d.CirclePulseMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CircleScanMaterialProperty

# example

let material = new Joint3d.CircleScanMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns material
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CircleSpiralMaterialProperty

# example

let material = new Joint3d.CircleSpiralMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CircleVaryMaterialProperty

# example

let material = new Joint3d.CircleVaryMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns material
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.CircleWaveMaterialProperty

# example

let material = new Joint3d.CircleWaveMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns material
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10,
  "count": 5,
  "gradient": 0.1
}

# properties

  • {Color} color
  • {Number} speed
  • {Number} count
  • {Number} gradient

# Joint3d.EllipsoidElectricMaterialProperty

# example

let material = new Joint3d.EllipsoidElectricMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.EllipsoidTrailMaterialProperty

# example

let material = new Joint3d.EllipsoidTrailMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.PolylineDashMaterialProperty

# example

let material = new Joint3d.PolylineDashMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "gapColor": Joint3d.Color.TRANSPARENT,
  "dashLength": 16.0
}

# properties

  • {Joint3d.Color} color
  • {Joint3d.Color} gapColor
  • {Number} dashLength

# Joint3d.PolylineArrowMaterialProperty

# example

let material = new Joint3d.PolylineArrowMaterialProperty(Joint3d.Color.WHITE)

# creation

  • constructor(color)

    • parameters
      • {Joint3d.Color} color
    • returns materialProperty

# properties

  • {Joint3d.Color} color

# Joint3d.PolylineOutlineMaterialProperty

# example

let material = new Joint3d.PolylineOutlineMaterialProperty({
  color: Joint3d.Color.WHITE,
  outlineColor: Joint3d.Color.BLACK,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "outlineColor": Joint3d.Color.BLACK,
  "outlineWidth": 1
}

# properties

  • {Joint3d.Color} color
  • {Joint3d.Color} outlineColor
  • {Number} outlineWidth

# Joint3d.PolylineGlowMaterialProperty

# example

let material = new Joint3d.PolylineGlowMaterialProperty({
  color: Joint3d.Color.WHITE,
  glowPower: 0.25,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "glowPower": 0.25,
  "taperPower": 1
}

# properties

  • {Joint3d.Color} color
  • {Number} glowPower
  • {Number} taperPower

# Joint3d.PolylineFlickerMaterialProperty

# example

let material = new Joint3d.PolylineFlickerMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.PolylineFlowMaterialProperty

# example

let material = new Joint3d.PolylineFlowMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10,
  "percent": 0.3,
  "gradient": 0.1
}

# properties

  • {Joint3d.Color} color
  • {Number} speed
  • {Number} percent
  • {Number} gradient

# Joint3d.PolylineImageTrailMaterialProperty

# example

let material = new Joint3d.PolylineImageTrailMaterialProperty({
  color: Joint3d.Color.WHITE,
  image: '**/*.png',
  repeat: { x: 10, y: 1 },
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10,
  "image": "**/*.png",
  "repeat": { "x": 10, "y": 1 }
}

# properties

  • {Joint3d.Color} color
  • {Number} speed
  • {String} image
  • {Object} repeat

# Joint3d.PolylineLightingMaterialProperty

# example

let material = new Joint3d.PolylineLightingMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE
}

# properties

  • {Joint3d.Color} color

# Joint3d.PolylineLightingTrailMaterialProperty

# example

let material = new Joint3d.PolylineLightingTrailMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.PolylineTrailMaterialProperty

# example

let material = new Joint3d.PolylineTrailMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.RadarLineMaterialProperty

# example

let material = new Joint3d.RadarLineMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.RadarWaveMaterialProperty

# example

let material = new Joint3d.RadarWaveMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.WallImageTrailMaterialProperty

# example

let material = new Joint3d.WallImageTrailMaterialProperty({
  color: Joint3d.Color.WHITE,
  image: '**/*.png',
  repeat: { x: 10, y: 1 },
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns materialProperty
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10,
  "image": "**/*.png",
  "repeat": { "x": 10, "y": 1 }
}

# properties

  • {Joint3d.Color} color
  • {Number} speed
  • {String} image
  • {Object} repeat

# Joint3d.WallTrailMaterialProperty

# example

let material = new Joint3d.WallTrailMaterialProperty({
  color: Joint3d.Color.WHITE,
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns material
// options(optional)
{
  "color": Joint3d.Color.WHITE,
  "speed": 10
}

# properties

  • {Joint3d.Color} color
  • {Number} speed

# Joint3d.WaterMaterialProperty

# example

let material = new Joint3d.WaterMaterialProperty({
  baseWaterColor: Joint3d.Color.WHITE,
  normalMap: '**/**.png',
})

# creation

  • constructor([options])

    • parameters
      • {Object} options
    • returns material
// options(optional)
{
  "baseWaterColor": Joint3d.Color.WHITE,
  "blendColor": Joint3d.Color.WHITE,
  "specularMap": "",
  "normalMap": "",
  "frequency": 1000,
  "animationSpeed": 0.03,
  "amplitude": 10,
  "specularIntensity": 10
}

# properties

  • {Joint3d.Color} baseWaterColor
  • {Joint3d.Color} blendColor
  • {String} normalMap
  • {String} specularMap
Copyright © 2021-2022 厦门集恩图造信息科技股份有限公司
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式