|
|
2 年之前 | |
|---|---|---|
| .. | ||
| README.md | 2 年之前 | |
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.
let material = new DC.ColorMaterialProperty(DC.Color.RED)
constructor(color)
{DC.Color} colormateriallet material = new DC.ImageMaterialProperty({
image: '**/**.png',
transparent: true,
})
constructor([options])
{Object} optionsmaterial//options(optional)
{
"image": "",
"repeat": { "x": 1, "y": 1 },
"color": DC.Color.WHITE,
"transparent": false
}
{String} image{Object} repeat{DC.Color} color{Boolean} transparentlet material = new DC.CircleBlurMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CircleDiffuseMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CircleFadeMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CirclePulseMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CircleScanMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterial// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CircleSpiralMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CircleVaryMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterial// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.CircleWaveMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterial// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10,
"count": 5,
"gradient": 0.1
}
{Color} color{Number} speed{Number} count{Number} gradientlet material = new DC.EllipsoidElectricMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.EllipsoidTrailMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.PolylineDashMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"gapColor": DC.Color.TRANSPARENT,
"dashLength": 16.0
}
{DC.Color} color{DC.Color} gapColor{Number} dashLengthlet material = new DC.PolylineArrowMaterialProperty(DC.Color.WHITE)
constructor(color)
{DC.Color} colormaterialProperty{DC.Color} colorlet material = new DC.PolylineOutlineMaterialProperty({
color: DC.Color.WHITE,
outlineColor: DC.Color.BLACK,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"outlineColor": DC.Color.BLACK,
"outlineWidth": 1
}
{DC.Color} color{DC.Color} outlineColor{Number} outlineWidthlet material = new DC.PolylineGlowMaterialProperty({
color: DC.Color.WHITE,
glowPower: 0.25,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"glowPower": 0.25,
"taperPower": 1
}
{DC.Color} color{Number} glowPower{Number} taperPowerlet material = new DC.PolylineFlickerMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.PolylineFlowMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10,
"percent": 0.3,
"gradient": 0.1
}
{DC.Color} color{Number} speed{Number} percent{Number} gradientlet material = new DC.PolylineImageTrailMaterialProperty({
color: DC.Color.WHITE,
image: '**/*.png',
repeat: { x: 10, y: 1 },
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10,
"image": "**/*.png",
"repeat": { "x": 10, "y": 1 }
}
{DC.Color} color{Number} speed{String} image{Object} repeatlet material = new DC.PolylineLightingMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE
}
{DC.Color} colorlet material = new DC.PolylineLightingTrailMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.PolylineTrailMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.RadarLineMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.RadarWaveMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.WallImageTrailMaterialProperty({
color: DC.Color.WHITE,
image: '**/*.png',
repeat: { x: 10, y: 1 },
})
constructor([options])
{Object} optionsmaterialProperty// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10,
"image": "**/*.png",
"repeat": { "x": 10, "y": 1 }
}
{DC.Color} color{Number} speed{String} image{Object} repeatlet material = new DC.WallTrailMaterialProperty({
color: DC.Color.WHITE,
})
constructor([options])
{Object} optionsmaterial// options(optional)
{
"color": DC.Color.WHITE,
"speed": 10
}
{DC.Color} color{Number} speedlet material = new DC.WaterMaterialProperty({
baseWaterColor: DC.Color.WHITE,
normalMap: '**/**.png',
})
constructor([options])
{Object} optionsmaterial// options(optional)
{
"baseWaterColor": DC.Color.WHITE,
"blendColor": DC.Color.WHITE,
"specularMap": "",
"normalMap": "",
"frequency": 1000,
"animationSpeed": 0.03,
"amplitude": 10,
"specularIntensity": 10
}
{DC.Color} baseWaterColor{DC.Color} blendColor{String} normalMap{String} specularMap