我在 ThreeJS 中的 VRMLLoader 遇到问题,我像这样加载文件:
var loader = new THREE.VRMLLoader();
loader.load( 'testscan.wrl', function ( object ) {
object.position.set(0,0,0);
scene.add( object );
//console.log(object)
//console.log("done loading");
} );
我不断收到以下警告:
VRMLLoader.js:406 ["color", "Color"]
parseProperty @ VRMLLoader.js:406
getTree @ VRMLLoader.js:571
parseV2 @ VRMLLoader.js:1048
parse @ VRMLLoader.js:1098
(anonymous) @ VRMLLoader.js:36
(anonymous) @ three.min.js:618
VRMLLoader.js:407 Invalid color format detected for color
parseProperty @ VRMLLoader.js:407
getTree @ VRMLLoader.js:571
parseV2 @ VRMLLoader.js:1048
parse @ VRMLLoader.js:1098
(anonymous) @ VRMLLoader.js:36
(anonymous) @ three.min.js:618
VRMLLoader.js:406 ["color"]
parseProperty @ VRMLLoader.js:406
getTree @ VRMLLoader.js:571
parseV2 @ VRMLLoader.js:1048
parse @ VRMLLoader.js:1098
(anonymous) @ VRMLLoader.js:36
(anonymous) @ three.min.js:618
VRMLLoader.js:407 Invalid color format detected for color
但是模型在完成加载后根本不会出现在场景中。即使没有颜色
.wrl 文件中的颜色定义如下:
geomery IndexedFaceSet
{
...
color Color
{
color
[
0.196078 0.0823529 0.130846,
...
0.152271 0.188965 0.317428
]
}
...
}
任何帮助,将不胜感激
我正在尝试加载的 .wrl 文件: 链接