图片插入
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
@@ -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'
|
||||||
|
|
||||||
|
|||||||