飞线,光照

This commit is contained in:
2025-07-03 16:28:48 +08:00
parent 22a05c2c8c
commit 484fe70e16
23 changed files with 1959 additions and 66 deletions

View File

@ -529,6 +529,63 @@ class Tools {
color: Cesium.Color.fromCssColorString(color),
})
break
case 3: //尾迹光线
material = new Cesium.PolylineFlowMaterialProperty({
color: color
})
break
case 4: //多尾迹光线
material = new Cesium.PolylineFlowMultMaterialProperty({
color: color
})
break
case 5: //普通流动虚线
material = new Cesium.FlowDashedLineFlowMaterialProperty({
color: color,
uType: 0
})
break
case 6: //流动虚线2
material = new Cesium.FlowDashedLineFlowMaterialProperty({
color: color,
uType: 1
})
break
case 7: //流动箭头1
material = new Cesium.LineTextureMaterialProperty({
color: color,
image: this.getSourceRootPath() + '/img/arrow/2.png',
// imageW: 172
})
// let that = this
// var curCanvas = 'a';
// let i = 0;
// function drawCanvasImage(time, result) {
// let canvas = document.createElement('canvas');
// canvas.id = "canvas-" + curCanvas;
// // document.getElementById('app').appendChild(canvas)
// // var canvas = document.getElementById("canvas-" + curCanvas);
// let cwidth = 494;
// let cheight = 172;
// var ctx = canvas.getContext("2d");
// var img = new Image();
// img.src = that.getSourceRootPath() + '/img/arrow/1.png';
// ctx.clearRect(0, 0, cwidth, cheight);
// img.onload = function () {
// if (i <= cwidth) {
// ctx.drawImage(img, i, 0);
// } else
// i = 0;
// i += 3;
// }
// curCanvas = curCanvas === 'a' ? 'b' : 'a';
// return canvas;
// }
// material = new Cesium.ImageMaterialProperty({
// image: new Cesium.CallbackProperty(drawCanvasImage, false),
// transparent: true
// })
break
default:
material = Cesium.Color.fromCssColorString(color)
break
@ -982,8 +1039,8 @@ class Tools {
/**
* @desc cmyk转rbg
* @param {*} color
* @returns
* @param {*} color
* @returns
*/
cmykToRgb(color) {
let { c, m, y, k } = color