FlowWallMaterialProperty

FlowWallMaterialProperty

new FlowWallMaterialProperty(options) → {Object}

数据流材质

Examples
1. Entity 使用材质
  let material = new Cesium.FlowDigitalMaterialProperty() // 默认参数
       let entity = viewer.entities.add({
           position: Cesium.Cartesian3.fromDegrees(117.090795612294, 31.14224105521026, 50),
           plane: {
               plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_Y, 0),
               dimensions: new Cesium.Cartesian2(1000, 50),
               material: material
           }
       })

 
2. Primitive 使用材质
       const instance = new Cesium.GeometryInstance({
           geometry: new Cesium.PlaneGeometry({
               vertexFormat: Cesium.VertexFormat.DEFAULT
           })
       });
       let eunMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
           Cesium.Cartesian3.fromDegrees(117.090795612294, 31.13224105521026, 50))
       let scaleMatrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(1000, 50, 1))
       let rotationMatrix = Cesium.Matrix4.fromRotationTranslation(
           Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90)));
       Cesium.Matrix4.multiply(eunMatrix, rotationMatrix, eunMatrix)
       Cesium.Matrix4.multiply(eunMatrix, scaleMatrix, eunMatrix)
       viewer.scene.primitives.add(new Cesium.Primitive({
           geometryInstances: instance,
           appearance: new Cesium.MaterialAppearance({
               material: Cesium.Material.fromType(Cesium.Material.FlowWallMaterialType)
           }),
           modelMatrix: eunMatrix
       }));
Parameters:
Name Type Description
options *

具有以下属性:

Properties
Name Type Attributes Default Description
color Color <optional>
new Cesium.Color(0.0, 0.0, 0.0, 0.8)

颜色

glow Number <optional>
1.0

发光亮度

speed Number <optional>
1.0

运动速率

flowGlow Number <optional>
1.0 | 0.0

流动光开关

segment Number <optional>
3.0

重复段数

Returns:

材质实例

Type
Object

FlowWallMaterialProperty

new FlowWallMaterialProperty(options, options) → {Object}

流动墙材质

Examples
1. Entity 使用材质
let material = new Cesium.FlowWallMaterialProperty() // 默认参数
viewer.entities.add({
   position: Cesium.Cartesian3.fromDegrees(117.090795612294, 31.13224105521026, 100),
   plane: {
          plane: new Cesium.CallbackProperty(function () {
                  return new Cesium.Plane(Cesium.Cartesian3.UNIT_Y, 0)
          }, false),
          dimensions:  new Cesium.Cartesian2(1000, 50),
          material: material
       }
})
2. Primitive 使用材质
const instance = new Cesium.GeometryInstance({
  geometry : new Cesium.PlaneGeometry({
         vertexFormat : Cesium.VertexFormat.POSITION_ONLY
     });
});
viewer.scene.primitives.add(new Cesium.Primitive({
     geometryInstances : instance,
     appearance : new Cesium.MaterialAppearance({
         material : Cesium.Material.fromType(Cesium.Material.FlowWallMaterialType)
     }),
     modelMatrix:Cesium.Matrix4.multiply(
             Cesium.Transforms.eastNorthUpToFixedFrame(
             Cesium.Cartesian3.fromDegrees(117.090795612294, 31.13224105521026, 100)),
             Cesium.Matrix4.fromScale(new Cesium.Cartesian3(1000, 1, 50)),
             new Cesium.Matrix4());
         }));
Parameters:
Name Type Description
options *
options *

具有以下属性:

Properties
Name Type Attributes Default Description
color Color <optional>
new Cesium.Color(0.0, 0.0, 0.0, 0.8)

颜色

glow Number <optional>
1.0

发光亮度

speed Number <optional>
1.0

运动速率

segment Number <optional>
3.0

重复段数

Returns:

材质实例

Type
Object