我已将 Collada 模型用于我的产品 3D 预览之一,其中画布作为纹理,通常它工作正常,但对于某些角度,3D 角落部分渲染不正确。
我附上了画布和 3D 模态的屏幕截图以及 DAE 模态。
模态有问题吗?请在此处找到 Collada 模型
请在下面找到我的代码:
width = 256, height = 256;
camera = new THREE.PerspectiveCamera( 1, width / height, 0.01, 300 );
camera.position.set( 8, 10, 8 );
camera.lookAt( 0, 3, 0 );
scene = new THREE.Scene();
scene.background = new THREE.Color( 0xffffff );
loadingManager = new THREE.LoadingManager( function () {
scene.add(collada.scene ); // while loading collada model i am updating scene and assign new collada.scene to it
});
loader = new ColladaLoader( loadingManager );
ambientLight = new THREE.AmbientLight( 0xffffff, 1 );
scene.add( ambientLight );
spotLight = new THREE.SpotLight( 0xffffff, 1 );
spotLight.target = scene;
spotLight.position.set(0, 0, 0);
spotLight.castShadow = !0;
spotLight.shadow && spotLight.shadow.mapSize.set(width, height);

