栅格体元数据图元
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
String | |||||||||||||||||||||||||||||||||||||
options |
Object |
|
Example:
var volxel = new Cesium.VoxelPrimitive(url, {
heightScale : 100,
loaded : function() {}
});
Members
高度缩放
不透明度
是否显示
步长
Methods
属性值查询
Name | Type | Description |
---|---|---|
screenCoordinates |
Cartesian2 |
Returns:
设置配色方案
Name | Type | Description |
---|---|---|
canvas2d |
HTMLCanvasElement |
Example:
var canvas2d = document.createElement('canvas');
canvas2d.width = 100;
canvas2d.height = 1;
var ctx = canvas2d.getContext("2d");
var gradient = ctx.createLinearGradient(0, 0, canvas2d.width, 0);
gradient.addColorStop(0, "rgba(254, 35, 10, 1)");
gradient.addColorStop(0.33, "rgba(242, 254, 30, 1)");
gradient.addColorStop(0.67, "rgba(22, 253, 255, 1)");
gradient.addColorStop(1, "rgba(92, 9, 252, 1)");
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, canvas2d.width, canvas2d.height);
volxel.setColorScheme(canvas2d);
设置过滤范围
Name | Type | Description |
---|---|---|
minValue |
Number | 最小值 |
maxValue |
Number | optional 最大值 |
设置播放帧
Name | Type | Description |
---|---|---|
frameIndex |
Number | 数据的帧索引 |