我在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文件: link