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

通过threelayer添加一个glb模型 默认的比例总是不对 需要缩放大概0.01左右 请问大概是什么原因呢? #644

Open
lzp0070007 opened this issue Sep 9, 2024 · 0 comments

Comments

@lzp0070007
Copy link

function addModel(modelUrl){
var loader = new GLTFLoader();
loader.load(modelUrl, function (gltf) { //'./gltf/xxx.glb'
let model = gltf.scene;
model.rotation.x = Math.PI / 2;
model.scale.set(0.015, 0.015, 0.015);
let postion = _this.map.getCenter();
_this.baseObjectModel = threeLayer.toModel(model, { coordinate: postion });
threeLayer.addMesh(_this.baseObjectModel);
}, undefined, function (e) {
console.error(e);
});
}

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

1 participant