mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
100.67k stars 35.22k forks source link

VRMLLoader don't work? #3979

Closed jedidcad closed 8 years ago

jedidcad commented 10 years ago

dear mrdoob, I have a problem with the VRMLLoader and my vrml 2 model because don't work. I work on MacOS 10.6 with Firefox. Can you help me please because your past examples (issue "VRMLLoader?") I do not have solved the problem? (below the vrml 2 file):

#VRML V2.0 utf8
#This document was created with DCAD optimizer v.5.0.0
#DCAD optimizer (C) 2005-2013 - Virtual Lab Sas-DOTgroup
#PTF 3D file name: P02_simple_scene.PTF
#Total 3D Objects: 9 - Lights sources: 1
#Date: mercoledì 16 ottobre 2013-4:48:37 PM
#===========================================
#Blocco Oggetto 3D
#DEF Elemento3D_9
Shape {
appearance DEF MTR_Elemento3D_9
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.000000 0.820000 0.000000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Elemento3D_9
IndexedFaceSet {
ccw FALSE
solid FALSE
#creaseAngle 1.571
coord Coordinate {
point [
4.800000 2.600000 3.000000,
4.800000 4.600000 3.000000,
5.400000 4.600000 3.000000,
5.400000 2.600000 3.000000,
4.800000 5.400000 3.000000,
7.600000 5.400000 3.000000,
7.600000 4.600000 3.000000,
4.800000 8.400000 3.000000,
5.400000 8.400000 3.000000,
5.400000 5.400000 3.000000,
4.800000 2.600000 0.000000,
5.400000 2.600000 0.000000,
5.400000 8.400000 0.000000,
4.800000 8.400000 0.000000,
5.400000 4.600000 0.000000,
7.600000 4.600000 0.000000,
7.600000 5.400000 0.000000,
5.400000 5.400000 0.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
1, 4, 5, 1, -1,
1, 5, 6, 1, -1,
4, 7, 8, 4, -1,
4, 8, 9, 4, -1,
10, 11, 12, 10, -1,
10, 12, 13, 10, -1,
14, 15, 16, 14, -1,
14, 16, 17, 14, -1,
10, 13, 7, 10, -1,
10, 7, 0, 10, -1,
13, 12, 8, 13, -1,
13, 8, 7, 13, -1,
12, 17, 9, 12, -1,
12, 9, 8, 12, -1,
14, 11, 3, 14, -1,
14, 3, 2, 14, -1,
11, 10, 0, 11, -1,
11, 0, 3, 11, -1,
17, 16, 5, 17, -1,
17, 5, 9, 17, -1,
16, 15, 6, 16, -1,
16, 6, 5, 16, -1,
15, 14, 2, 15, -1,
15, 2, 6, 15, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Murature_con_archi_2
Shape {
appearance DEF MTR_Murature_con_archi
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.600000 0.600000 0.600000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Murature_con_archi_2
IndexedFaceSet {
ccw FALSE
solid FALSE
creaseAngle 1.047
coord Coordinate {
point [
-3.200000 -2.800000 0.000000,
-4.000000 -2.800000 0.000000,
-4.000000 -2.800000 4.600000,
-3.200000 -2.800000 4.600000,
-3.121700 -2.800000 3.094400,
-3.200000 -2.800000 2.600000,
-3.121700 -2.800000 4.600000,
-2.894400 -2.800000 3.540500,
-2.894400 -2.800000 4.600000,
-2.540500 -2.800000 3.894400,
-2.540500 -2.800000 4.600000,
-2.094400 -2.800000 4.121700,
-2.094400 -2.800000 4.600000,
-1.600000 -2.800000 4.200000,
-1.600000 -2.800000 4.600000,
-1.105600 -2.800000 4.121700,
-1.105600 -2.800000 4.600000,
-0.659500 -2.800000 3.894400,
-0.659500 -2.800000 4.600000,
-0.305600 -2.800000 3.540500,
-0.305600 -2.800000 4.600000,
-0.078300 -2.800000 3.094400,
-0.078300 -2.800000 4.600000,
0.000000 -2.800000 2.600000,
0.000000 -2.800000 4.600000,
0.600000 -2.800000 0.000000,
0.000000 -2.800000 0.000000,
0.600000 -2.800000 4.600000,
0.678300 -2.800000 3.094400,
0.600000 -2.800000 2.600000,
0.678300 -2.800000 4.600000,
0.905600 -2.800000 3.540500,
0.905600 -2.800000 4.600000,
1.259500 -2.800000 3.894400,
1.259500 -2.800000 4.600000,
1.705600 -2.800000 4.121700,
1.705600 -2.800000 4.600000,
2.200000 -2.800000 4.200000,
2.200000 -2.800000 4.600000,
2.694400 -2.800000 4.121700,
2.694400 -2.800000 4.600000,
3.140500 -2.800000 3.894400,
3.140500 -2.800000 4.600000,
3.494400 -2.800000 3.540500,
3.494400 -2.800000 4.600000,
3.721700 -2.800000 3.094400,
3.721700 -2.800000 4.600000,
3.800000 -2.800000 2.600000,
3.800000 -2.800000 4.600000,
4.400000 -2.800000 0.000000,
3.800000 -2.800000 0.000000,
4.400000 -2.800000 4.600000,
-4.000000 -2.200000 0.000000,
-3.200000 -2.200000 0.000000,
-3.200000 -2.200000 4.600000,
-4.000000 -2.200000 4.600000,
-3.200000 -2.200000 2.600000,
-3.121700 -2.200000 3.094400,
-3.121700 -2.200000 4.600000,
-2.894400 -2.200000 3.540500,
-2.894400 -2.200000 4.600000,
-2.540500 -2.200000 3.894400,
-2.540500 -2.200000 4.600000,
-2.094400 -2.200000 4.121700,
-2.094400 -2.200000 4.600000,
-1.600000 -2.200000 4.200000,
-1.600000 -2.200000 4.600000,
-1.105600 -2.200000 4.121700,
-1.105600 -2.200000 4.600000,
-0.659500 -2.200000 3.894400,
-0.659500 -2.200000 4.600000,
-0.305600 -2.200000 3.540500,
-0.305600 -2.200000 4.600000,
-0.078300 -2.200000 3.094400,
-0.078300 -2.200000 4.600000,
0.000000 -2.200000 2.600000,
0.000000 -2.200000 4.600000,
0.000000 -2.200000 0.000000,
0.600000 -2.200000 0.000000,
0.600000 -2.200000 4.600000,
0.600000 -2.200000 2.600000,
0.678300 -2.200000 3.094400,
0.678300 -2.200000 4.600000,
0.905600 -2.200000 3.540500,
0.905600 -2.200000 4.600000,
1.259500 -2.200000 3.894400,
1.259500 -2.200000 4.600000,
1.705600 -2.200000 4.121700,
1.705600 -2.200000 4.600000,
2.200000 -2.200000 4.200000,
2.200000 -2.200000 4.600000,
2.694400 -2.200000 4.121700,
2.694400 -2.200000 4.600000,
3.140500 -2.200000 3.894400,
3.140500 -2.200000 4.600000,
3.494400 -2.200000 3.540500,
3.494400 -2.200000 4.600000,
3.721700 -2.200000 3.094400,
3.721700 -2.200000 4.600000,
3.800000 -2.200000 2.600000,
3.800000 -2.200000 4.600000,
3.800000 -2.200000 0.000000,
4.400000 -2.200000 0.000000,
4.400000 -2.200000 4.600000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
4, 5, 3, 4, -1,
4, 3, 6, 4, -1,
7, 4, 6, 7, -1,
7, 6, 8, 7, -1,
9, 7, 8, 9, -1,
9, 8, 10, 9, -1,
11, 9, 10, 11, -1,
11, 10, 12, 11, -1,
13, 11, 12, 13, -1,
13, 12, 14, 13, -1,
15, 13, 14, 15, -1,
15, 14, 16, 15, -1,
17, 15, 16, 17, -1,
17, 16, 18, 17, -1,
19, 17, 18, 19, -1,
19, 18, 20, 19, -1,
21, 19, 20, 21, -1,
21, 20, 22, 21, -1,
23, 21, 22, 23, -1,
23, 22, 24, 23, -1,
25, 26, 24, 25, -1,
25, 24, 27, 25, -1,
28, 29, 27, 28, -1,
28, 27, 30, 28, -1,
31, 28, 30, 31, -1,
31, 30, 32, 31, -1,
33, 31, 32, 33, -1,
33, 32, 34, 33, -1,
35, 33, 34, 35, -1,
35, 34, 36, 35, -1,
37, 35, 36, 37, -1,
37, 36, 38, 37, -1,
39, 37, 38, 39, -1,
39, 38, 40, 39, -1,
41, 39, 40, 41, -1,
41, 40, 42, 41, -1,
43, 41, 42, 43, -1,
43, 42, 44, 43, -1,
45, 43, 44, 45, -1,
45, 44, 46, 45, -1,
47, 45, 46, 47, -1,
47, 46, 48, 47, -1,
49, 50, 48, 49, -1,
49, 48, 51, 49, -1,
52, 53, 54, 52, -1,
52, 54, 55, 52, -1,
56, 57, 58, 56, -1,
56, 58, 54, 56, -1,
57, 59, 60, 57, -1,
57, 60, 58, 57, -1,
59, 61, 62, 59, -1,
59, 62, 60, 59, -1,
61, 63, 64, 61, -1,
61, 64, 62, 61, -1,
63, 65, 66, 63, -1,
63, 66, 64, 63, -1,
65, 67, 68, 65, -1,
65, 68, 66, 65, -1,
67, 69, 70, 67, -1,
67, 70, 68, 67, -1,
69, 71, 72, 69, -1,
69, 72, 70, 69, -1,
71, 73, 74, 71, -1,
71, 74, 72, 71, -1,
73, 75, 76, 73, -1,
73, 76, 74, 73, -1,
77, 78, 79, 77, -1,
77, 79, 76, 77, -1,
80, 81, 82, 80, -1,
80, 82, 79, 80, -1,
81, 83, 84, 81, -1,
81, 84, 82, 81, -1,
83, 85, 86, 83, -1,
83, 86, 84, 83, -1,
85, 87, 88, 85, -1,
85, 88, 86, 85, -1,
87, 89, 90, 87, -1,
87, 90, 88, 87, -1,
89, 91, 92, 89, -1,
89, 92, 90, 89, -1,
91, 93, 94, 91, -1,
91, 94, 92, 91, -1,
93, 95, 96, 93, -1,
93, 96, 94, 93, -1,
95, 97, 98, 95, -1,
95, 98, 96, 95, -1,
97, 99, 100, 97, -1,
97, 100, 98, 97, -1,
101, 102, 103, 101, -1,
101, 103, 100, 101, -1,
1, 52, 55, 1, -1,
1, 55, 2, 1, -1,
51, 2, 55, 51, -1,
51, 55, 103, 51, -1,
102, 49, 51, 102, -1,
102, 51, 103, 102, -1,
50, 49, 102, 50, -1,
50, 102, 101, 50, -1,
26, 25, 78, 26, -1,
26, 78, 77, 26, -1,
1, 0, 53, 1, -1,
1, 53, 52, 1, -1,
56, 5, 4, 56, -1,
56, 4, 57, 56, -1,
57, 4, 7, 57, -1,
57, 7, 59, 57, -1,
59, 7, 9, 59, -1,
59, 9, 61, 59, -1,
61, 9, 11, 61, -1,
61, 11, 63, 61, -1,
63, 11, 13, 63, -1,
63, 13, 65, 63, -1,
65, 13, 15, 65, -1,
65, 15, 67, 65, -1,
67, 15, 17, 67, -1,
67, 17, 69, 67, -1,
69, 17, 19, 69, -1,
69, 19, 71, 69, -1,
21, 73, 71, 21, -1,
21, 71, 19, 21, -1,
23, 75, 73, 23, -1,
23, 73, 21, 23, -1,
53, 0, 5, 53, -1,
53, 5, 56, 53, -1,
26, 77, 75, 26, -1,
26, 75, 23, 26, -1,
80, 29, 28, 80, -1,
80, 28, 81, 80, -1,
81, 28, 31, 81, -1,
81, 31, 83, 81, -1,
83, 31, 33, 83, -1,
83, 33, 85, 83, -1,
85, 33, 35, 85, -1,
85, 35, 87, 85, -1,
87, 35, 37, 87, -1,
87, 37, 89, 87, -1,
89, 37, 39, 89, -1,
89, 39, 91, 89, -1,
91, 39, 41, 91, -1,
91, 41, 93, 91, -1,
93, 41, 43, 93, -1,
93, 43, 95, 93, -1,
45, 97, 95, 45, -1,
45, 95, 43, 45, -1,
47, 99, 97, 47, -1,
47, 97, 45, 47, -1,
78, 25, 29, 78, -1,
78, 29, 80, 78, -1,
50, 101, 99, 50, -1,
50, 99, 47, 50, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Murature_con_archi_3
Shape {
appearance DEF MTR_Murature_con_archi
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.600000 0.600000 0.600000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Murature_con_archi_3
IndexedFaceSet {
ccw FALSE
solid FALSE
creaseAngle 1.047
coord Coordinate {
point [
-3.200000 4.000000 0.000000,
-4.000000 4.000000 0.000000,
-4.000000 4.000000 4.600000,
-3.200000 4.000000 4.600000,
-3.121700 4.000000 3.094400,
-3.200000 4.000000 2.600000,
-3.121700 4.000000 4.600000,
-2.894400 4.000000 3.540500,
-2.894400 4.000000 4.600000,
-2.540500 4.000000 3.894400,
-2.540500 4.000000 4.600000,
-2.094400 4.000000 4.121700,
-2.094400 4.000000 4.600000,
-1.600000 4.000000 4.200000,
-1.600000 4.000000 4.600000,
-1.105600 4.000000 4.121700,
-1.105600 4.000000 4.600000,
-0.659500 4.000000 3.894400,
-0.659500 4.000000 4.600000,
-0.305600 4.000000 3.540500,
-0.305600 4.000000 4.600000,
-0.078300 4.000000 3.094400,
-0.078300 4.000000 4.600000,
0.000000 4.000000 2.600000,
0.000000 4.000000 4.600000,
0.600000 4.000000 0.000000,
0.000000 4.000000 0.000000,
0.600000 4.000000 4.600000,
0.678300 4.000000 3.094400,
0.600000 4.000000 2.600000,
0.678300 4.000000 4.600000,
0.905600 4.000000 3.540500,
0.905600 4.000000 4.600000,
1.259500 4.000000 3.894400,
1.259500 4.000000 4.600000,
1.705600 4.000000 4.121700,
1.705600 4.000000 4.600000,
2.200000 4.000000 4.200000,
2.200000 4.000000 4.600000,
2.694400 4.000000 4.121700,
2.694400 4.000000 4.600000,
3.140500 4.000000 3.894400,
3.140500 4.000000 4.600000,
3.494400 4.000000 3.540500,
3.494400 4.000000 4.600000,
3.721700 4.000000 3.094400,
3.721700 4.000000 4.600000,
3.800000 4.000000 2.600000,
3.800000 4.000000 4.600000,
4.400000 4.000000 0.000000,
3.800000 4.000000 0.000000,
4.400000 4.000000 4.600000,
-4.000000 4.600000 0.000000,
-3.200000 4.600000 0.000000,
-3.200000 4.600000 4.600000,
-4.000000 4.600000 4.600000,
-3.200000 4.600000 2.600000,
-3.121700 4.600000 3.094400,
-3.121700 4.600000 4.600000,
-2.894400 4.600000 3.540500,
-2.894400 4.600000 4.600000,
-2.540500 4.600000 3.894400,
-2.540500 4.600000 4.600000,
-2.094400 4.600000 4.121700,
-2.094400 4.600000 4.600000,
-1.600000 4.600000 4.200000,
-1.600000 4.600000 4.600000,
-1.105600 4.600000 4.121700,
-1.105600 4.600000 4.600000,
-0.659500 4.600000 3.894400,
-0.659500 4.600000 4.600000,
-0.305600 4.600000 3.540500,
-0.305600 4.600000 4.600000,
-0.078300 4.600000 3.094400,
-0.078300 4.600000 4.600000,
0.000000 4.600000 2.600000,
0.000000 4.600000 4.600000,
0.000000 4.600000 0.000000,
0.600000 4.600000 0.000000,
0.600000 4.600000 4.600000,
0.600000 4.600000 2.600000,
0.678300 4.600000 3.094400,
0.678300 4.600000 4.600000,
0.905600 4.600000 3.540500,
0.905600 4.600000 4.600000,
1.259500 4.600000 3.894400,
1.259500 4.600000 4.600000,
1.705600 4.600000 4.121700,
1.705600 4.600000 4.600000,
2.200000 4.600000 4.200000,
2.200000 4.600000 4.600000,
2.694400 4.600000 4.121700,
2.694400 4.600000 4.600000,
3.140500 4.600000 3.894400,
3.140500 4.600000 4.600000,
3.494400 4.600000 3.540500,
3.494400 4.600000 4.600000,
3.721700 4.600000 3.094400,
3.721700 4.600000 4.600000,
3.800000 4.600000 2.600000,
3.800000 4.600000 4.600000,
3.800000 4.600000 0.000000,
4.400000 4.600000 0.000000,
4.400000 4.600000 4.600000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
4, 5, 3, 4, -1,
4, 3, 6, 4, -1,
7, 4, 6, 7, -1,
7, 6, 8, 7, -1,
9, 7, 8, 9, -1,
9, 8, 10, 9, -1,
11, 9, 10, 11, -1,
11, 10, 12, 11, -1,
13, 11, 12, 13, -1,
13, 12, 14, 13, -1,
15, 13, 14, 15, -1,
15, 14, 16, 15, -1,
17, 15, 16, 17, -1,
17, 16, 18, 17, -1,
19, 17, 18, 19, -1,
19, 18, 20, 19, -1,
21, 19, 20, 21, -1,
21, 20, 22, 21, -1,
23, 21, 22, 23, -1,
23, 22, 24, 23, -1,
25, 26, 24, 25, -1,
25, 24, 27, 25, -1,
28, 29, 27, 28, -1,
28, 27, 30, 28, -1,
31, 28, 30, 31, -1,
31, 30, 32, 31, -1,
33, 31, 32, 33, -1,
33, 32, 34, 33, -1,
35, 33, 34, 35, -1,
35, 34, 36, 35, -1,
37, 35, 36, 37, -1,
37, 36, 38, 37, -1,
39, 37, 38, 39, -1,
39, 38, 40, 39, -1,
41, 39, 40, 41, -1,
41, 40, 42, 41, -1,
43, 41, 42, 43, -1,
43, 42, 44, 43, -1,
45, 43, 44, 45, -1,
45, 44, 46, 45, -1,
47, 45, 46, 47, -1,
47, 46, 48, 47, -1,
49, 50, 48, 49, -1,
49, 48, 51, 49, -1,
52, 53, 54, 52, -1,
52, 54, 55, 52, -1,
56, 57, 58, 56, -1,
56, 58, 54, 56, -1,
57, 59, 60, 57, -1,
57, 60, 58, 57, -1,
59, 61, 62, 59, -1,
59, 62, 60, 59, -1,
61, 63, 64, 61, -1,
61, 64, 62, 61, -1,
63, 65, 66, 63, -1,
63, 66, 64, 63, -1,
65, 67, 68, 65, -1,
65, 68, 66, 65, -1,
67, 69, 70, 67, -1,
67, 70, 68, 67, -1,
69, 71, 72, 69, -1,
69, 72, 70, 69, -1,
71, 73, 74, 71, -1,
71, 74, 72, 71, -1,
73, 75, 76, 73, -1,
73, 76, 74, 73, -1,
77, 78, 79, 77, -1,
77, 79, 76, 77, -1,
80, 81, 82, 80, -1,
80, 82, 79, 80, -1,
81, 83, 84, 81, -1,
81, 84, 82, 81, -1,
83, 85, 86, 83, -1,
83, 86, 84, 83, -1,
85, 87, 88, 85, -1,
85, 88, 86, 85, -1,
87, 89, 90, 87, -1,
87, 90, 88, 87, -1,
89, 91, 92, 89, -1,
89, 92, 90, 89, -1,
91, 93, 94, 91, -1,
91, 94, 92, 91, -1,
93, 95, 96, 93, -1,
93, 96, 94, 93, -1,
95, 97, 98, 95, -1,
95, 98, 96, 95, -1,
97, 99, 100, 97, -1,
97, 100, 98, 97, -1,
101, 102, 103, 101, -1,
101, 103, 100, 101, -1,
1, 52, 55, 1, -1,
1, 55, 2, 1, -1,
51, 2, 55, 51, -1,
51, 55, 103, 51, -1,
102, 49, 51, 102, -1,
102, 51, 103, 102, -1,
50, 49, 102, 50, -1,
50, 102, 101, 50, -1,
26, 25, 78, 26, -1,
26, 78, 77, 26, -1,
1, 0, 53, 1, -1,
1, 53, 52, 1, -1,
56, 5, 4, 56, -1,
56, 4, 57, 56, -1,
57, 4, 7, 57, -1,
57, 7, 59, 57, -1,
59, 7, 9, 59, -1,
59, 9, 61, 59, -1,
61, 9, 11, 61, -1,
61, 11, 63, 61, -1,
63, 11, 13, 63, -1,
63, 13, 65, 63, -1,
65, 13, 15, 65, -1,
65, 15, 67, 65, -1,
67, 15, 17, 67, -1,
67, 17, 69, 67, -1,
69, 17, 19, 69, -1,
69, 19, 71, 69, -1,
21, 73, 71, 21, -1,
21, 71, 19, 21, -1,
23, 75, 73, 23, -1,
23, 73, 21, 23, -1,
53, 0, 5, 53, -1,
53, 5, 56, 53, -1,
26, 77, 75, 26, -1,
26, 75, 23, 26, -1,
80, 29, 28, 80, -1,
80, 28, 81, 80, -1,
81, 28, 31, 81, -1,
81, 31, 83, 81, -1,
83, 31, 33, 83, -1,
83, 33, 85, 83, -1,
85, 33, 35, 85, -1,
85, 35, 87, 85, -1,
87, 35, 37, 87, -1,
87, 37, 89, 87, -1,
89, 37, 39, 89, -1,
89, 39, 91, 89, -1,
91, 39, 41, 91, -1,
91, 41, 93, 91, -1,
93, 41, 43, 93, -1,
93, 43, 95, 93, -1,
45, 97, 95, 45, -1,
45, 95, 43, 45, -1,
47, 99, 97, 47, -1,
47, 97, 45, 47, -1,
78, 25, 29, 78, -1,
78, 29, 80, 78, -1,
50, 101, 99, 50, -1,
50, 99, 47, 50, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Cubotto_1_Blu_4
Shape {
appearance DEF MTR_Cubotto_1_Blu
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.470000 0.800000 0.840000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Cubotto_1_Blu_4
IndexedFaceSet {
ccw FALSE
solid FALSE
#creaseAngle 1.571
coord Coordinate {
point [
-0.400000 1.000000 3.000000,
-1.400000 1.000000 3.000000,
-1.400000 3.400000 3.000000,
-0.400000 3.400000 3.000000,
-1.400000 1.000000 0.000000,
-0.400000 1.000000 0.000000,
-0.400000 3.400000 0.000000,
-1.400000 3.400000 0.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
4, 5, 6, 4, -1,
4, 6, 7, 4, -1,
4, 7, 2, 4, -1,
4, 2, 1, 4, -1,
7, 6, 3, 7, -1,
7, 3, 2, 7, -1,
6, 5, 0, 6, -1,
6, 0, 3, 6, -1,
5, 4, 1, 5, -1,
5, 1, 0, 5, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Cubotto_1_5
Shape {
appearance DEF MTR_Cubotto_1
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.470000 0.800000 0.840000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Cubotto_1_5
IndexedFaceSet {
ccw FALSE
solid FALSE
#creaseAngle 1.571
coord Coordinate {
point [
-3.200000 1.000000 3.000000,
-4.200000 1.000000 3.000000,
-4.200000 3.400000 3.000000,
-3.200000 3.400000 3.000000,
-4.200000 1.000000 0.000000,
-3.200000 1.000000 0.000000,
-3.200000 3.400000 0.000000,
-4.200000 3.400000 0.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
4, 5, 6, 4, -1,
4, 6, 7, 4, -1,
4, 7, 2, 4, -1,
4, 2, 1, 4, -1,
7, 6, 3, 7, -1,
7, 3, 2, 7, -1,
6, 5, 0, 6, -1,
6, 0, 3, 6, -1,
5, 4, 1, 5, -1,
5, 1, 0, 5, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Blocco_cilindrico
Shape {
appearance DEF MTR_Blocco_cilindrico
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.880000 0.000000 0.000000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Blocco_cilindrico
IndexedFaceSet {
ccw FALSE
solid FALSE
creaseAngle 1.047
coord Coordinate {
point [
1.600000 5.600000 6.800000,
1.229200 5.658700 6.800000,
1.970800 5.658700 6.800000,
0.894700 5.829200 6.800000,
2.305300 5.829200 6.800000,
0.629200 6.094700 6.800000,
2.570800 6.094700 6.800000,
0.458700 6.429200 6.800000,
2.741300 6.429200 6.800000,
0.400000 6.800000 6.800000,
2.800000 6.800000 6.800000,
0.404900 6.830900 6.800000,
2.795100 6.830900 6.800000,
0.409300 6.858700 6.800000,
2.970800 6.858700 6.800000,
0.436300 7.029200 6.800000,
3.305300 7.029200 6.800000,
0.458700 7.170800 6.800000,
3.446900 7.170800 6.800000,
0.521900 7.294700 6.800000,
3.570800 7.294700 6.800000,
0.629200 7.505300 6.800000,
3.678100 7.505300 6.800000,
0.753100 7.629200 6.800000,
3.741300 7.629200 6.800000,
0.894700 7.770800 6.800000,
3.763700 7.770800 6.800000,
1.229200 7.941300 6.800000,
3.790700 7.941300 6.800000,
1.404900 7.969100 6.800000,
3.795100 7.969100 6.800000,
1.400000 8.000000 6.800000,
3.800000 8.000000 6.800000,
1.458700 8.370800 6.800000,
3.741300 8.370800 6.800000,
1.629200 8.705300 6.800000,
3.570800 8.705300 6.800000,
1.894700 8.970800 6.800000,
3.305300 8.970800 6.800000,
2.229200 9.141300 6.800000,
2.970800 9.141300 6.800000,
2.600000 9.200000 6.800000,
0.431700 7.000000 0.000000,
0.458700 7.000000 0.000000,
0.458700 7.170800 0.000000,
0.629200 7.000000 0.000000,
0.629200 7.505300 0.000000,
0.894700 7.000000 0.000000,
0.894700 7.770800 0.000000,
1.229200 7.000000 0.000000,
1.229200 7.941300 0.000000,
1.400000 7.000000 0.000000,
1.400000 7.968300 0.000000,
1.404900 7.000000 0.000000,
1.404900 7.969100 0.000000,
1.400000 8.000000 0.000000,
1.404900 8.031000 0.000000,
1.458700 7.000000 0.000000,
1.458700 8.370800 0.000000,
1.629200 7.000000 0.000000,
1.629200 8.705300 0.000000,
1.894700 7.000000 0.000000,
1.894700 8.970800 0.000000,
2.229200 7.000000 0.000000,
2.229200 9.141300 0.000000,
2.600000 7.000000 0.000000,
2.600000 9.200000 0.000000,
2.970800 7.000000 0.000000,
2.970800 9.141300 0.000000,
3.248100 7.000000 0.000000,
3.248100 9.000000 0.000000,
3.305300 7.029200 0.000000,
3.305300 8.970800 0.000000,
3.570800 7.294700 0.000000,
3.570800 8.705300 0.000000,
3.741300 7.629200 0.000000,
3.741300 8.370800 0.000000,
3.800000 8.000000 0.000000,
2.741300 6.429200 3.000000,
2.800000 6.800000 3.000000,
2.570800 6.094700 3.000000,
2.305300 5.829200 3.000000,
1.970800 5.658700 3.000000,
1.600000 5.600000 3.000000,
1.229200 5.658700 3.000000,
0.894700 5.829200 3.000000,
0.629200 6.094700 3.000000,
0.458700 6.429200 3.000000,
0.400000 6.800000 3.000000,
0.431700 7.000000 3.000000,
0.458700 7.170800 3.000000,
2.795100 6.830900 3.000000,
3.248100 7.000000 3.000000,
3.305300 7.029200 3.000000,
2.970800 6.858700 3.000000,
0.431700 6.599800 3.000000,
0.458700 7.000000 3.000000,
0.629200 7.000000 3.000000,
0.894700 7.000000 3.000000,
1.229200 7.000000 3.000000,
1.600000 7.000000 3.000000,
1.970800 7.000000 3.000000,
2.305300 7.000000 3.000000,
2.570800 7.000000 3.000000,
2.741300 7.000000 3.000000,
2.795100 6.769000 3.000000,
2.795100 7.000000 3.000000,
2.800000 6.831700 3.000000,
2.800000 7.000000 3.000000,
2.970800 7.000000 3.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
1, 3, 4, 1, -1,
1, 4, 2, 1, -1,
3, 5, 6, 3, -1,
3, 6, 4, 3, -1,
5, 7, 8, 5, -1,
5, 8, 6, 5, -1,
7, 9, 10, 7, -1,
7, 10, 8, 7, -1,
9, 11, 12, 9, -1,
9, 12, 10, 9, -1,
11, 13, 14, 11, -1,
11, 14, 12, 11, -1,
13, 15, 16, 13, -1,
13, 16, 14, 13, -1,
15, 17, 18, 15, -1,
15, 18, 16, 15, -1,
17, 19, 20, 17, -1,
17, 20, 18, 17, -1,
19, 21, 22, 19, -1,
19, 22, 20, 19, -1,
21, 23, 24, 21, -1,
21, 24, 22, 21, -1,
23, 25, 26, 23, -1,
23, 26, 24, 23, -1,
25, 27, 28, 25, -1,
25, 28, 26, 25, -1,
27, 29, 30, 27, -1,
27, 30, 28, 27, -1,
29, 31, 32, 29, -1,
29, 32, 30, 29, -1,
31, 33, 34, 31, -1,
31, 34, 32, 31, -1,
33, 35, 36, 33, -1,
33, 36, 34, 33, -1,
35, 37, 38, 35, -1,
35, 38, 36, 35, -1,
37, 39, 40, 37, -1,
37, 40, 38, 37, -1,
39, 41, 40, 39, -1,
42, 43, 44, 42, -1,
42, 44, 42, 42, -1,
43, 45, 46, 43, -1,
43, 46, 44, 43, -1,
45, 47, 48, 45, -1,
45, 48, 46, 45, -1,
47, 49, 50, 47, -1,
47, 50, 48, 47, -1,
49, 51, 52, 49, -1,
49, 52, 50, 49, -1,
51, 53, 54, 51, -1,
51, 54, 52, 51, -1,
55, 54, 56, 55, -1,
53, 57, 58, 53, -1,
53, 58, 56, 53, -1,
57, 59, 60, 57, -1,
57, 60, 58, 57, -1,
59, 61, 62, 59, -1,
59, 62, 60, 59, -1,
61, 63, 64, 61, -1,
61, 64, 62, 61, -1,
63, 65, 66, 63, -1,
63, 66, 64, 63, -1,
65, 67, 68, 65, -1,
65, 68, 66, 65, -1,
67, 69, 70, 67, -1,
67, 70, 68, 67, -1,
69, 71, 72, 69, -1,
69, 72, 70, 69, -1,
71, 73, 74, 71, -1,
71, 74, 72, 71, -1,
73, 75, 76, 73, -1,
73, 76, 74, 73, -1,
75, 77, 76, 75, -1,
78, 8, 10, 78, -1,
78, 10, 79, 78, -1,
80, 6, 8, 80, -1,
80, 8, 78, 80, -1,
81, 4, 6, 81, -1,
81, 6, 80, 81, -1,
82, 2, 4, 82, -1,
82, 4, 81, 82, -1,
83, 0, 2, 83, -1,
83, 2, 82, 83, -1,
84, 1, 0, 84, -1,
84, 0, 83, 84, -1,
85, 3, 1, 85, -1,
85, 1, 84, 85, -1,
86, 5, 3, 86, -1,
86, 3, 85, 86, -1,
5, 86, 87, 5, -1,
5, 87, 7, 5, -1,
7, 87, 88, 7, -1,
7, 88, 9, 7, -1,
89, 42, 44, 89, -1,
89, 44, 90, 89, -1,
9, 88, 90, 9, -1,
9, 90, 17, 9, -1,
17, 44, 46, 17, -1,
17, 46, 21, 17, -1,
21, 46, 48, 21, -1,
21, 48, 25, 21, -1,
25, 48, 50, 25, -1,
25, 50, 27, 25, -1,
27, 50, 54, 27, -1,
27, 54, 29, 27, -1,
79, 10, 12, 79, -1,
79, 12, 91, 79, -1,
75, 24, 32, 75, -1,
75, 32, 77, 75, -1,
73, 20, 24, 73, -1,
73, 24, 75, 73, -1,
71, 16, 20, 71, -1,
71, 20, 73, 71, -1,
69, 92, 93, 69, -1,
69, 93, 71, 69, -1,
94, 14, 16, 94, -1,
94, 16, 93, 94, -1,
91, 12, 14, 91, -1,
91, 14, 94, 91, -1,
29, 54, 55, 29, -1,
29, 55, 31, 29, -1,
31, 55, 58, 31, -1,
31, 58, 33, 31, -1,
33, 58, 60, 33, -1,
33, 60, 35, 33, -1,
35, 60, 62, 35, -1,
35, 62, 37, 35, -1,
37, 62, 64, 37, -1,
37, 64, 39, 37, -1,
39, 64, 66, 39, -1,
39, 66, 41, 39, -1,
41, 66, 68, 41, -1,
41, 68, 40, 41, -1,
40, 68, 72, 40, -1,
40, 72, 38, 40, -1,
74, 36, 38, 74, -1,
74, 38, 72, 74, -1,
76, 34, 36, 76, -1,
76, 36, 74, 76, -1,
77, 32, 34, 77, -1,
77, 34, 76, 77, -1,
88, 95, 89, 88, -1,
95, 87, 96, 95, -1,
95, 96, 89, 95, -1,
87, 86, 97, 87, -1,
87, 97, 96, 87, -1,
86, 85, 98, 86, -1,
86, 98, 97, 86, -1,
85, 84, 99, 85, -1,
85, 99, 98, 85, -1,
84, 83, 100, 84, -1,
84, 100, 99, 84, -1,
83, 82, 101, 83, -1,
83, 101, 100, 83, -1,
82, 81, 102, 82, -1,
82, 102, 101, 82, -1,
81, 80, 103, 81, -1,
81, 103, 102, 81, -1,
80, 78, 104, 80, -1,
80, 104, 103, 80, -1,
78, 105, 106, 78, -1,
78, 106, 104, 78, -1,
105, 79, 91, 105, -1,
91, 107, 108, 91, -1,
91, 108, 106, 91, -1,
107, 94, 109, 107, -1,
107, 109, 108, 107, -1,
94, 92, 109, 94, -1,
69, 42, 89, 69, -1,
69, 89, 92, 69, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Base
Shape {
appearance DEF MTR_Base
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 1.000000 0.800000 0.000000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Base
IndexedFaceSet {
ccw FALSE
solid FALSE
#creaseAngle 1.571
coord Coordinate {
point [
10.600000 -4.600000 0.000000,
-7.200000 -4.600000 0.000000,
-7.200000 12.400000 0.000000,
10.600000 -4.600000 0.000000,
10.600000 -4.600000 0.000000,
-7.200000 12.400000 0.000000,
10.600000 12.400000 0.000000,
10.600000 -4.600000 0.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
4, 5, 6, 4, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Cubotto_1_8
Shape {
appearance DEF MTR_Cubotto_1
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.470000 0.800000 0.840000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Cubotto_1_8
IndexedFaceSet {
ccw FALSE
solid FALSE
#creaseAngle 1.571
coord Coordinate {
point [
4.300000 1.000000 3.000000,
3.300000 1.000000 3.000000,
3.300000 3.400000 3.000000,
4.300000 3.400000 3.000000,
3.300000 1.000000 0.000000,
4.300000 1.000000 0.000000,
4.300000 3.400000 0.000000,
3.300000 3.400000 0.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
4, 5, 6, 4, -1,
4, 6, 7, 4, -1,
4, 7, 2, 4, -1,
4, 2, 1, 4, -1,
7, 6, 3, 7, -1,
7, 3, 2, 7, -1,
6, 5, 0, 6, -1,
6, 0, 3, 6, -1,
5, 4, 1, 5, -1,
5, 1, 0, 5, -1
]}}
#===========================================
#Blocco Oggetto 3D
#DEF Cubotto_1_Blu_9
Shape {
appearance DEF MTR_Cubotto_1_Blu
Appearance { 
material Material {
ambientIntensity 0
diffuseColor 0.470000 0.800000 0.840000
specularColor 0.500000 0.500000 0.500000
emissiveColor 0.033333 0.033333 0.033333
shininess 0
transparency 0
}
texture ImageTexture {
url ""
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform {
rotation 0
scale 1 1
}}
geometry DEF Cubotto_1_Blu_9
IndexedFaceSet {
ccw FALSE
solid FALSE
#creaseAngle 1.571
coord Coordinate {
point [
1.500000 1.000000 3.000000,
0.500000 1.000000 3.000000,
0.500000 3.400000 3.000000,
1.500000 3.400000 3.000000,
0.500000 1.000000 0.000000,
1.500000 1.000000 0.000000,
1.500000 3.400000 0.000000,
0.500000 3.400000 0.000000
 ]}
coordIndex [
0, 1, 2, 0, -1,
0, 2, 3, 0, -1,
4, 5, 6, 4, -1,
4, 6, 7, 4, -1,
4, 7, 2, 4, -1,
4, 2, 1, 4, -1,
7, 6, 3, 7, -1,
7, 3, 2, 7, -1,
6, 5, 0, 6, -1,
6, 0, 3, 6, -1,
5, 4, 1, 5, -1,
5, 1, 0, 5, -1
]}}

And here is the code of three.js:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>three.js webgl - loaders - vrml loader</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Lucida Grande;
                font-size:12px;
                background-color: #000;
                color: #fff;
                margin: 0px;
                overflow: hidden;
            }
            #info {
                color: #fff;
                position: absolute;
                top: 10px;
                width: 100%;
                text-align: center;
                z-index: 100;
                display:block;
            }
            #info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer }
        </style>
    </head>

    <body>
        <div id="info">Test vrml Loader - DCAD optimizer - (c) 2013 Virtual Lab Sas - Virtual Lab Australia Pty Ltd</div>

        <script src="../js-r61/build/three.min.js"></script>

        <script src="../js-r61/js/loaders/VRMLLoader.js"></script>

        <script src="../js-r61/js/Detector.js"></script>
        <script src="../js-r61/js/libs/stats.min.js"></script>

        <script src="../js-r61/js/controls/TrackballControls.js"></script>

        <script>

            var container, stats;

            var camera, scene, renderer;

            var mouseX = 0, mouseY = 0;

            var windowHalfX = window.innerWidth / 2;
            var windowHalfY = window.innerHeight / 2;
            var skyboxMesh;

            init();
            animate();

// ===============================================
            function init() {

                container = document.createElement( 'div' );
                document.body.appendChild( container );

                camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 1, 100000 );
                camera.position.x = 0;
                camera.position.y = 20;
                camera.position.z = 4;

                controls = new THREE.TrackballControls( camera );

                controls.rotateSpeed = 2.0;
                controls.zoomSpeed = 5.0;
                controls.panSpeed = 0.8;

                controls.noZoom = false;
                controls.noPan = false;

                controls.staticMoving = false;
                controls.dynamicDampingFactor = 0.3;

// ===============================================
                // scene

                scene = new THREE.Scene();

// ===============================================
// ===============================================
// Light

var Light_01 = new THREE.SpotLight();

    Light_01.position.set( -30, 47.5, 10 );
    Light_01.target.position.set( 0, 0, 0 );
    Light_01.color.setRGB( 1, 1, 1 );

    Light_01.castShadow = true;

    Light_01.intensity = 1;
    Light_01.shadowDarkness = 0.6;
    Light_01.shadowBias = 0.001;

    Light_01.shadowCameraNear = 50;
    Light_01.shadowCameraFar = 10000;
        // Light_01.shadowCameraFov = 1000;

    Light_01.shadowMapWidth = 2048;
    Light_01.shadowMapHeight = 2048;

    Light_01.shadowCameraVisible = true;

scene.add( Light_01 );

// ===============================================
// ===============================================
    // load model

         var loader = new THREE.VRMLLoader();
         loader.addEventListener( 'load', function ( event ) {

          var geometry = event.content;

          var mesh = new THREE.Mesh( geometry );

mesh.castShadow = true;
mesh.receiveShadow = true;

          scene.add( mesh );
          scene = event.content;

         } );
         loader.load( "models/vrml_models/P02_simple_scene.wrl" );

// ===============================================
// ===============================================
    // Render engine

    renderer = new THREE.WebGLRenderer( { antialias: true } );
    renderer.setSize( window.innerWidth, window.innerHeight );

    renderer.shadowMapEnabled = true;
    renderer.shadowMapSoft = true;
    renderer.shadowMapType = THREE.PCFSoftShadowMap;
    renderer.shadowMapAutoUpdate = true;

    renderer.setClearColor(0x313131, 1);

                container.appendChild( renderer.domElement );
                document.addEventListener( 'mousemove', onDocumentMouseMove, false );

                window.addEventListener( 'resize', onWindowResize, false );
            }

// ===============================================
            function onWindowResize() {

                windowHalfX = window.innerWidth / 2;
                windowHalfY = window.innerHeight / 2;

                camera.aspect = window.innerWidth / window.innerHeight;
                camera.updateProjectionMatrix();

                renderer.setSize( window.innerWidth, window.innerHeight );

            }

// ===============================================
            function onDocumentMouseMove( event ) {

                mouseX = ( event.clientX - windowHalfX ) / 2;
                mouseY = ( event.clientY - windowHalfY ) / 2;
            }

// ===============================================
            function animate() {

                requestAnimationFrame( animate );
                render();
                controls.update();

            }

// ===============================================
            function render() {

                renderer.render( scene, camera );

            }

// ===============================================
        </script>
    </body>
</html>
mrdoob commented 10 years ago

VRMLLoader doesn't support IndexedFaceSet yet.

jedidcad commented 10 years ago

thanks for your answer and in my case what is the way to describe an vrml object?

mrdoob commented 10 years ago

Your vrml is fine. I currently don't have time to implement IndexedFaceSet into VRMLLoader so you'll have to wait until someone does it, or try yourself.

mrdoob commented 10 years ago

/ping @bartmcleod

jedidcad commented 10 years ago

thanks for your indication, I will check the examples

bartmcleod commented 10 years ago

@jedidcad There is a working loader now, for IndexedFaceSet. But the implementation does not yet meet the full spec. I am working on that (see my github). You need the dev branch. Background branch is current working branch. There will be major changes in how the tree is loaded. I want to mirror the VRML structure as close as possible in the parsed tree (not just have string lines in there).

jedidcad commented 10 years ago

Hi bartmcleod, many thanks for your great and hard work. I will wait for your next steps and for the moment my best from Italy.

mrdoob commented 10 years ago

@jedidcad could you try with the latest version?

darius-vrintelligence commented 9 years ago

hi mrdoob and bartmcleod

has anyone added the indexed face set and texture support to the vrml loader code yet ?

bartmcleod commented 9 years ago

Indexed face set is supported. Textures are not (yet) supported.

ibarbarisi commented 9 years ago

Dear Mrdoob and bartmcleod,

It is two days I am super stuck with this .wrl, I cannot open it with the latest version of VRNLLoader in github and I don't find the error. Could you please be so kind to give me a hand? Many thanks in advance! Cheers, Isa

http://pdssbn.astro.umd.edu/holdings/dif-c-hriv_its_mri-5-tempel1-shape-v2.0/data/tempel1_2012_cart.wrl

bartmcleod commented 9 years ago

Hi Isa,

My guess is that it breaks on these (I can try for myself tonight, this is just my first guess). The parser probably doesn't anticipate these comments:

Number of vertices and number of facets:

16022 32040

0.0000 0.0000 -2.1632 # 1
0.0755 -0.0026 -2.1637 # 1
0.0754 -0.0053 -2.1636 # 1
0.0751 -0.0079 -2.1635 # 1
0.0748 -0.0105 -2.1634 # 1
0.0744 -0.0131 -2.1633 # 1
0.0739 -0.0157 -2.1632 # 1
Cheers,

Bart McLeod

Op 19 feb. 2015, om 15:23 heeft ibarbarisi notifications@github.com het volgende geschreven:

Dear Mrdoob and bartmcleod,

It is two days I am super stuck with this .wrl, I cannot open it with the latest version of VRNLLoader in github and I don't find the error. Could you please be so kind to give me a hand? Many thanks in advance! Cheers, Isa

http://pdssbn.astro.umd.edu/holdings/dif-c-hriv_its_mri-5-tempel1-shape-v2.0/data/tempel1_2012_cart.wrl http://pdssbn.astro.umd.edu/holdings/dif-c-hriv_its_mri-5-tempel1-shape-v2.0/data/tempel1_2012_cart.wrl — Reply to this email directly or view it on GitHub https://github.com/mrdoob/three.js/issues/3979#issuecomment-75059135.

ibarbarisi commented 9 years ago

Hi, thanks for your answer, it is really much appreciated. Removing all comments and cleaning the model is one of the first things I have tried :-( but unfortunately there must be something else. Sorry to bother. I am quite new with three.js (I love it by the way, see the beautiful Comet 67PGerasimenko) (https://cloud.githubusercontent.com/assets/11073812/6274700/a8761342-b879-11e4-8b1a-12c1d6b03684.png) Cheers! Isa

bartmcleod commented 9 years ago

Hi,

It wasn't in the comments indeed. For the current implementation of the loader, it is assumed that every node is declared on it's own line.

For your model, that means it should start with:

Shape {
        geometry IndexedFaceSet {
            coord Coordinate {
            point [

Then, you will encouter the next error, but at least adding the newlines on top of the file gets the parser a little further.

ibarbarisi commented 9 years ago

This is great!! I managed to display it, just giving all parenthesis their own new line!! Thank you so much, I could have spent ages here.

Cheers, Isa

bartmcleod commented 9 years ago

Good to hear that! Maybe that is something we can build into the parser.

mrdoob commented 9 years ago

@bartmcleod Yeah. We should try making the parser more robust...

ibarbarisi commented 9 years ago

Hi. That would be fantastic. This shape models come from datasets already validated from institutes and space instruments teams. So changing the content, even if minor corrections, may suppose a problem. Thank you again so much! Cheers!

bartmcleod commented 8 years ago

Is it closed because someone made the parser more robust, or is it closed because of lack of interest?

mrdoob commented 8 years ago

Lack of activity...

tribe84 commented 8 years ago

@mrdoob @bartmcleod - I believe I am suffering from the issue above.

bartmcleod commented 8 years ago

@tribe84 @ibarbarisi There is a new parser now, that you can already use with my fork of ThreeJS, or independently. It will be less forgiving in some respect, but far more accurate. Please try it. If you encounter any errors with my parser based on the PEG.js grammar, please report these at https://github.com/bartmcleod/VrmlParser.

btw, my fork can be found here: https://github.com/bartmcleod/three.js

bartmcleod commented 7 years ago

@ibarbarisi I know it is very late after the fact, but I can load your comet with the new loader, if I get rid of the script nodes and the appearance at the end of the file. The downside is that it then renders as one purple cloud without lighting, as if it has an emissive color only. I will work on the parser to make it load correctly, if possible. The Script node might or might not be supported in the future. [Edit]The appearance did not load, because of the (unexpected) formatting of the float values, written as 1. and 0. I will add support for these, but after writing them as 1.0 and 0.0 the comet loaded just fine. However, the amount of detail is somewhat limited.