This commit is contained in:
贾宛龙 2025-08-27 17:56:36 +08:00
parent 2822d935ad
commit d95419f5d1
14 changed files with 2308 additions and 0 deletions

View File

@ -83,6 +83,8 @@
| 佚名 | 5 | 2025.08.06 | | 佚名 | 5 | 2025.08.06 |
| 寂寞、无痕 | 1 | 2025.08.11 | | 寂寞、无痕 | 1 | 2025.08.11 |
| 匆匆. | 10 | 2025.08.11 | | 匆匆. | 10 | 2025.08.11 |
| 一杯茶 | 100 | 2025.08.25 |
| M Y M | 8.88 | 2025.08.27 |
### 关于打赏 ### 关于打赏
- 您的每一笔打赏,我都会原封不动以**您的名义**捐赠到腾讯公益。 - 您的每一笔打赏,我都会原封不动以**您的名义**捐赠到腾讯公益。

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View File

@ -40,6 +40,8 @@
<img src="./150930984120250806FAC5EZNELD.jpg"> <img src="./150930984120250806FAC5EZNELD.jpg">
<img src="./159816452120250814FACCMN14JH.jpg"> <img src="./159816452120250814FACCMN14JH.jpg">
<img src="./160009256720250814E8CCSBV8JK.jpg"> <img src="./160009256720250814E8CCSBV8JK.jpg">
<img src="./159308476120250827E9KER945HV.jpg">
<img src="./159308476120250827E5KEYBVL5Y.jpg">
</body> </body>
</html> </html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -0,0 +1,193 @@
<!--********************************************************************
* by jiawanlong
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="./../../libs/cesium/Cesium1.98/Widgets/widgets.css">
<script type="text/javascript" src="./../../libs/cesium/Cesium1.98/Cesium.js"></script>
</head>
<body style="margin: 0; overflow: hidden; background: #fff; width: 100%; height: 100%; position: absolute; top: 0">
<div id="map" style="margin: 0 auto; width: 100%; height: 100%"></div>
<script type="text/javascript">
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwNDljNWFmZC03MzRlLTRiMDMtYWIwMi00Yjk4YWQ4NzQwZGEiLCJpZCI6MjU5LCJpYXQiOjE3NTEzNzkyMzR9.OTqPNs3UGNnT1LYkPTavV80wN8Es_YphpJgQcpdnqWc'
const viewer = new Cesium.Viewer('map', {
imageryProvider: false,
baseLayerPicker: false,
});
var xyz = new Cesium.UrlTemplateImageryProvider({
"credit": "mapbox",
"url": 'https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.webp?sku=1016Ab1dNMw2X&access_token=pk.eyJ1IjoidHJhbXBqd2wiLCJhIjoiY2xhYXIxbHExMDN3dzN3cGliOHdrMThxMiJ9.6er2aYb1EBjSsK1-t9d2-w'
})
viewer.imageryLayers.addImageryProvider(xyz)
// Primitive
// 1、GeometryInstance
// 2、Apperance
// 3、modelMatrix
// 开启帧率
viewer.scene.debugShowFramesPerSecond = true;
function showPoint(x, y, z, p) {
viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(x, y, z),
point: {
pixelSize: 5,
color: Cesium.Color.RED,
outlineColor: Cesium.Color.WHITE,
outlineWidth: 2,
},
id: '' + p,
label: {
text: p,
font: '14pt monospace',
outlineWidth: 2,
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
pixelOffset: new Cesium.Cartesian2(10, 0),
}
})
}
showPoint(121.41777777777779, 31.233333333333334, -1961.6396551739094, '111')
showPoint(121.41777777777779, 31.242222222222225, -1961.6396551739094, '2')
showPoint(121.41777777777779, 31.242222222222225, -980.8952536478324, '3')
showPoint(121.41777777777779, 31.233333333333334, -980.8952536478324, '4')
// 多边形
var polygonInstance = new Cesium.GeometryInstance({
id: {
"name": 'polygon'
},
geometry: new Cesium.PolygonGeometry({
polygonHierarchy: new Cesium.PolygonHierarchy(
Cesium.Cartesian3.fromDegreesArrayHeights([
121.41777777777779, 31.233333333333334, -1961.6396551739094,
121.41777777777779, 31.242222222222225, -1961.6396551739094,
121.41777777777779, 31.242222222222225, -980.8952536478324,
121.41777777777779, 31.233333333333334, -980.8952536478324,
])
),
perPositionHeight: true,
// extrudedHeight:2000
}),
});
viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: [polygonInstance],
appearance: new Cesium.MaterialAppearance({
material: Cesium.Material.fromType('Color', {
color: Cesium.Color.CYAN.withAlpha(1),
})
})
}));
const wall = new Cesium.WallGeometry({
positions: Cesium.Cartesian3.fromDegreesArrayHeights([
121.41777777777779, 31.233333333333334, -1961.6396551739094,
121.41777777777779, 31.242222222222225, -1961.6396551739094,
121.41777777777779, 31.242222222222225, -980.8952536478324,
121.41777777777779, 31.233333333333334, -980.8952536478324,
])
});
const geometry = Cesium.WallGeometry.createGeometry(wall);
var polygonInstance = new Cesium.GeometryInstance({
id: {
"name": 'polygon'
},
geometry: geometry,
});
viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: [polygonInstance],
appearance: new Cesium.MaterialAppearance({
material: Cesium.Material.fromType('Color', {
color: Cesium.Color.CYAN.withAlpha(1),
})
})
}));
// 线
var lineInstance = new Cesium.GeometryInstance({
id: {
"name": 'line'
},
geometry: new Cesium.PolylineGeometry({
positions: Cesium.Cartesian3.fromDegreesArray([
-100, 40,
-90, 40,
-120, 60,
]),
width: 15,
vertexFormat: Cesium.PolylineColorAppearance.VERTEX_FORMAT,
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString("#001aff").withAlpha(0.5))
}
})
viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: [lineInstance],
appearance: new Cesium.PolylineColorAppearance()
}))
// 发光的线
viewer.scene.primitives.add(new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: new Cesium.PolylineGeometry({
positions: Cesium.Cartesian3.fromDegreesArray([
-110, 40,
-100, 40,
-130, 60,
]),
width: 20.0,
vertexFormat: Cesium.PolylineMaterialAppearance.VERTEX_FORMAT
}),
id: {
"name": '发光的线'
},
}),
appearance: new Cesium.PolylineMaterialAppearance({
material: Cesium.Material.fromType(Cesium.Material.PolylineGlowType, {
color: new Cesium.Color(1.0, 0.0, 0.0, 1.0)
})
})
}));
// -------Primitive点击事件-------------
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function (clickEvent) {
var ray1 = viewer.camera.getPickRay(clickEvent.position);
var cartesian = viewer.scene.globe.pick(ray1, viewer.scene);
var pick = viewer.scene.pickPosition(clickEvent.position);
var pickEd = viewer.scene.pick(clickEvent.position);
if (pickEd && pick) {
console.log(pickEd.id)
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
var flag = false;
var models = viewer.scene.primitives._primitives;
for (let i = 0; i < models.length; i++) {
if (models[i]._url) {
flag = true;
}
}
console.log(flag)
</script>
</body>
</html>

View File

@ -38,6 +38,36 @@
// viewer.scene.primitives.remove(tileset) // viewer.scene.primitives.remove(tileset)
// viewer.scene.primitives.removeAll() // viewer.scene.primitives.removeAll()
const highlighted = {
feature: undefined,
originalColor: new Cesium.Color()
};
// 设置屏幕空间事件处理器(鼠标点击事件)
viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(event) {
// 通过鼠标点击位置获取选中的要素
const pickedFeature = viewer.scene.pick(event.position);
// 如果之前有高亮要素,则恢复其原始颜色
if (Cesium.defined(highlighted.feature)) {
highlighted.feature.color = highlighted.originalColor;
highlighted.feature = undefined;
}
// 如果未选中任何要素,则直接返回
if (!Cesium.defined(pickedFeature)) {
return;
}
// 存储当前选中要素的原始颜色,并应用新的高亮颜色
highlighted.feature = pickedFeature;
if (Cesium.defined(pickedFeature.color)) { // 确保feature有color属性
Cesium.Color.clone(pickedFeature.color, highlighted.originalColor);
pickedFeature.color = Cesium.Color.YELLOW; // 设置为高亮颜色,例如黄色
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
</script> </script>
</body> </body>

View File

@ -0,0 +1,11 @@
Model Information:
* title: Dji Tello
* source: https://sketchfab.com/3d-models/dji-tello-36365bad0ebd46428e6241676725dcec
* author: Temoor (https://sketchfab.com/Temooor)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "Dji Tello" (https://sketchfab.com/3d-models/dji-tello-36365bad0ebd46428e6241676725dcec) by Temoor (https://sketchfab.com/Temooor) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
Model Information:
* title: uAV
* source: https://sketchfab.com/3d-models/uav-97650de1d69a4a04b46ad6aaa85aebf9
* author: Phoenix... (https://sketchfab.com/projectend0005)
Model License:
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
* requirements: Author must be credited. Commercial use is allowed.
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
This work is based on "uAV" (https://sketchfab.com/3d-models/uav-97650de1d69a4a04b46ad6aaa85aebf9) by Phoenix... (https://sketchfab.com/projectend0005) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)

Binary file not shown.

View File

@ -0,0 +1,191 @@
{
"accessors": [
{
"bufferView": 2,
"componentType": 5126,
"count": 616,
"max": [
4.320809841156006,
4.614296913146973,
0.01696999929845333
],
"min": [
-4.170945167541504,
-4.316296100616455,
-3.313577890396118
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 7392,
"componentType": 5126,
"count": 616,
"max": [
0.9997856020927429,
0.9998632669448853,
0.41080519556999207
],
"min": [
-0.999992847442627,
-0.9999668598175049,
-0.9999254941940308
],
"type": "VEC3"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 616,
"max": [
1.9958289861679077,
0.99651700258255
],
"min": [
0.004155000206083059,
0.00318100000731647
],
"type": "VEC2"
},
{
"bufferView": 0,
"componentType": 5125,
"count": 1134,
"type": "SCALAR"
}
],
"asset": {
"extras": {
"author": "Phoenix... (https://sketchfab.com/projectend0005)",
"license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)",
"source": "https://sketchfab.com/3d-models/uav-97650de1d69a4a04b46ad6aaa85aebf9",
"title": "uAV"
},
"generator": "Sketchfab-12.64.0",
"version": "2.0"
},
"bufferViews": [
{
"buffer": 0,
"byteLength": 4536,
"name": "floatBufferViews",
"target": 34963
},
{
"buffer": 0,
"byteLength": 4928,
"byteOffset": 4536,
"byteStride": 8,
"name": "floatBufferViews",
"target": 34962
},
{
"buffer": 0,
"byteLength": 14784,
"byteOffset": 9464,
"byteStride": 12,
"name": "floatBufferViews",
"target": 34962
}
],
"buffers": [
{
"byteLength": 24248,
"uri": "scene.bin"
}
],
"images": [
{
"uri": "textures/PickUp_UAV_D_baseColor.png"
}
],
"materials": [
{
"doubleSided": true,
"name": "PickUp_UAV_D",
"pbrMetallicRoughness": {
"baseColorTexture": {
"index": 0
},
"metallicFactor": 0.09291264615216242,
"roughnessFactor": 0.6
}
}
],
"meshes": [
{
"name": "Object_0",
"primitives": [
{
"attributes": {
"NORMAL": 1,
"POSITION": 0,
"TEXCOORD_0": 2
},
"indices": 3,
"material": 0,
"mode": 4
}
]
}
],
"nodes": [
{
"children": [
1
],
"matrix": [
2.220446049250313e-16,
-6.123234262925839e-17,
1.0,
0.0,
-1.0,
2.2204460492503126e-16,
2.2204460492503136e-16,
0.0,
-2.220446049250313e-16,
-1.0,
-6.123234262925839e-17,
0.0,
0.2239222526550293,
-3.2966091632843018,
-0.22392225265503002,
1.0
],
"name": "Sketchfab_model"
},
{
"children": [
2
],
"name": "fcf82abd7db64d99bd0b5ee5dfd0398c.obj.cleaner.materialmerger.gles"
},
{
"mesh": 0,
"name": "Object_2"
}
],
"samplers": [
{
"magFilter": 9729,
"minFilter": 9987,
"wrapS": 10497,
"wrapT": 10497
}
],
"scene": 0,
"scenes": [
{
"name": "Sketchfab_Scene",
"nodes": [
0
]
}
],
"textures": [
{
"sampler": 0,
"source": 0
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB