Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labels 标注模块 #135

Closed
GBinll opened this issue Nov 5, 2024 · 1 comment
Closed

labels 标注模块 #135

GBinll opened this issue Nov 5, 2024 · 1 comment

Comments

@GBinll
Copy link

GBinll commented Nov 5, 2024

vue2的项目中:
labels 使用动态添加是不是无法直接显示在模型上的? handleClick(event, intersected){
if (intersected.object.type == "Mesh"){
this.labels.push( let labes = {
image: image1,//自定义图标
// position: { x: -35, y: 40, z: -140 },
position: { x: intersected.point.x, y: intersected.point.y, z: intersected.point.z },
scale: { x: 20, y: 20, z: 20 },
sid: 2,
};)
}
}
直接这样是不是无法先添加的标注无法显示在模型上

@king2088
Copy link
Owner

vue2的项目中: labels 使用动态添加是不是无法直接显示在模型上的? handleClick(event, intersected){ if (intersected.object.type == "Mesh"){ this.labels.push( let labes = { image: image1,//自定义图标 // position: { x: -35, y: 40, z: -140 }, position: { x: intersected.point.x, y: intersected.point.y, z: intersected.point.z }, scale: { x: 20, y: 20, z: 20 }, sid: 2, };) } } 直接这样是不是无法先添加的标注无法显示在模型上

不能使用这种动态方式,你可以动态修改this.labels中的属性值即可,无需通过event进行设置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants