图片插入

This commit is contained in:
nicomacbookpro
2025-08-20 16:22:13 +08:00
parent 1f6e62a2db
commit 170634756f
11 changed files with 6 additions and 12 deletions

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -438,14 +438,6 @@ function buildVectorTicks({
} }
function insertPicture(parent, position, modelIndex, groupName) {
const ball = ballScene.children[modelIndex].clone(true);
ball.pointId = position.id;
const point = position.pointData;
ball.position.set(...point);
ball.userData = {
}
}
/* ========== Draco解压和GLTF加载器 ========== */ /* ========== Draco解压和GLTF加载器 ========== */
const dracoLoader = new DRACOLoader().setDecoderPath("/draco/"); // 设置Draco解码器路径 const dracoLoader = new DRACOLoader().setDecoderPath("/draco/"); // 设置Draco解码器路径
@@ -586,9 +578,11 @@ export function drawAxes(element, options = {}, ballCallBack) {
for (let i = 1; i <= 5; i++) { for (let i = 1; i <= 5; i++) {
const clone = mesh.clone(true); const clone = mesh.clone(true);
clone.position.set(sizeX / 5 * i, 0, 0); clone.position.set(sizeX / 5 * i, 0, 0);
setCss3dDOM(createDom("1"), clone.position); setCss3dDOM(createDom(i), clone.position);
const clone2 = clone.clone(true); const clone2 = clone.clone(true);
clone2.position.set(0, 0, sizeZ / 5 * i); clone2.position.set(0, 0, sizeZ / 5 * i);
setCss3dDOM(createDom(i), clone2.position);
gridGroup.add(clone); gridGroup.add(clone);
gridGroup.add(clone2); gridGroup.add(clone2);
} }
@@ -605,13 +599,13 @@ export function drawAxes(element, options = {}, ballCallBack) {
} }
// 创建dom // 创建dom
function createDom(text) { function createDom(i) {
const div = document.createElement('div') const div = document.createElement('div')
const img = document.createElement('img') const img = document.createElement('img')
img.src = `https://z2586300277.github.io/three-cesium-examples/` + '/files/author/z2586300277.png' img.src = `/icon_xz/x0${i}.png`
img.style.width = '10px' img.style.width = '10px'
@@ -619,7 +613,7 @@ export function drawAxes(element, options = {}, ballCallBack) {
div.appendChild(img) div.appendChild(img)
div.innerHTML += text // div.innerHTML += text
div.style.color = 'white' div.style.color = 'white'