feat: Proof of concept for displaying wrl files #10

Merged
glen merged 2 commits from first_wrl into main 2023-08-31 05:30:42 +00:00
12 changed files with 2827 additions and 0 deletions

569
public/assets/dart.wrl Normal file
View File

@ -0,0 +1,569 @@
#VRML V1.0 ascii
# copyright (c) 1995-1996 by 3D/EYE Inc., all rights reserved
DEF dart Separator {
Info {
string "from TriSpectives 2.0 - dart shape"
}
# world bboxSize 0.172563 0.0202318 0.0206037
# bboxCenter -2.60736 -0.0908677 2.91155
DEF BackgroundColor Info { string "0.498039 0.498039 0.498039" }
PerspectiveCamera {
position -2.27156 -0.0417016 2.51114
orientation -0.0170556 0.998755 0.0468797 2.44453
focalDistance 0.524887
heightAngle 0.274699
}
DirectionalLight {
on TRUE
intensity 0.65
color 1 1 1
direction -0.665558 0.015527 0.746185
}
DirectionalLight {
on TRUE
intensity 0.65
color 1 1 1
direction 0.295078 0.83414 -0.465982
}
DirectionalLight {
on TRUE
intensity 0.65
color 1 1 1
direction 0.65836 -0.681108 0.320396
}
DirectionalLight {
on TRUE
intensity 0.65
color 1 1 1
direction -0.612291 -0.470493 -0.635402
}
ShapeHints {
vertexOrdering COUNTERCLOCKWISE
shapeType SOLID
}
NormalBinding {
value PER_VERTEX_INDEXED
}
WWWAnchor {
name "http://www.eye.com/"
description "3D/EYE Inc. homepage"
Separator {
MatrixTransform {
matrix 5.80803e-005 -0.00229472 -0.00973298 0
-0.000422287 -0.00972502 0.00229032 0
-0.00999091 0.000397709 -0.000153386 0
-2.52075 -0.085636 2.9208 1
}
DEF dartMtl1d Material {
ambientColor 0 0 0
diffuseColor 0.8 0.835294 0.705882
shininess 0
}
Separator {
Coordinate3 {
point [ 0.989593 0.906293 2.51241,
1.18959 0.906293 4.25777,
0.982298 0.620977 4.25777,
0.889593 0.606294 4.25777,
0.889593 0.806293 2.51241,
0.920495 0.811188 2.51241,
0.889593 1.20629 4.25777,
0.889593 1.00629 2.51241,
0.808691 0.965071 2.51241,
0.789593 0.906293 2.51241,
0.589594 0.906293 4.25777,
0.646889 1.08263 4.25777,
0.920495 1.0014 2.51241,
0.982298 1.19161 4.25777,
0.808691 0.847515 2.51241,
0.646889 0.729958 4.25777,
0.889593 0.906293 0,
1.22511 0.906293 6.51174,
1.1611 0.906293 6.77778,
0.973494 0.648072 6.77778,
0.889593 0.634784 6.77778,
0.889593 0.570773 6.51174,
0.993274 0.587194 6.51174,
0.889593 1.1778 6.77778,
0.889593 1.24181 6.51174,
0.618151 1.10351 6.51174,
0.554073 0.906293 6.51174,
0.618084 0.906293 6.77778,
0.669937 1.06588 6.77778,
0.993274 1.22539 6.51174,
0.973494 1.16451 6.77778,
0.618151 0.709079 6.51174,
0.669937 0.746704 6.77778 ]
}
Normal {
vector [ 0.993499 0 -0.113844,
0.307008 -0.944873 -0.113844,
0 -0.993499 -0.113844,
0 0.993499 -0.113844,
-0.803757 0.583964 -0.113844,
-0.993499 0 -0.113844,
0.307008 0.944873 -0.113844,
-0.803757 -0.583964 -0.113844,
0 0 -1,
0 -0.999209 -0.0397709,
-0.808377 -0.58732 -0.0397709,
-0.999209 0 -0.0397709,
0.999209 0 -0.0397709,
0.308773 -0.950304 -0.0397709,
-0.808377 0.58732 -0.0397709,
0 0.999209 -0.0397709,
0.308773 0.950304 -0.0397709,
0.972254 0 0.233926,
0.300443 -0.924669 0.233926,
0 -0.972254 0.233926,
0 0.972254 0.233926,
-0.78657 0.571477 0.233926,
-0.972254 0 0.233926,
0.300443 0.924669 0.233926,
-0.78657 -0.571477 0.233926 ]
}
IndexedFaceSet {
coordIndex [ 0, 1, 2, 3, 4,
5, -1,
6, 7, 8, 9, 10,
10, 11, -1,
12, 7, 6, 13, 1,
0, -1,
14, 4, 3, 15, 10,
9, 9, -1,
16, 4, 14, 9, -1,
16, 0, 5, 4, -1,
8, 7, 16, 9, 9, -1,
12, 0, 16, 7, -1,
17, 18, 19, 20, 21,
22, -1,
23, 24, 25, 26, 27,
27, 28, -1,
29, 24, 23, 30, 18,
17, -1,
31, 21, 20, 32, 27,
26, 26, -1 ]
normalIndex [ 0, 0, 1, 2, 2,
1, -1,
3, 3, 4, 5, 5,
5, 4, -1,
6, 3, 3, 6, 0,
0, -1,
7, 2, 2, 7, 5,
5, 5, -1,
8, 9, 10, 11, -1,
8, 12, 13, 9, -1,
14, 15, 8, 11, 11, -1,
16, 12, 8, 15, -1,
17, 17, 18, 19, 19,
18, -1,
20, 20, 21, 22, 22,
22, 21, -1,
23, 20, 20, 23, 17,
17, -1,
24, 19, 19, 24, 22,
22, 22, -1 ]
}
}
DEF dartMtl2d Material {
ambientColor 0.12 0 0
diffuseColor 0.8 0 0
specularColor 0.9 0.9 0.9
shininess 1
}
Separator {
Coordinate3 {
point [ 0.926238 0.921313 17.1894,
1.73846 1.76036 15.1164,
1.7022 1.7948 15.1191,
0.890167 0.955937 17.1891,
0.98834 0.957566 13.0059,
0.955627 0.995742 13.0091,
0.891688 0.885223 17.22,
0.855618 0.919847 17.2197,
0.849297 0.913243 17.2251,
0.885515 0.878773 17.2253,
0.84394 0.806172 13.0536,
0.142778 0.084047 15.1599,
0.106593 0.118574 15.1628,
0.804232 0.837003 13.0573 ]
}
Normal {
vector [ 0.364048 0.388381 0.846539,
0.689256 0.72433 0.0165086,
0.689238 0.724319 0.0176914,
0.364107 0.388443 0.846486,
0.388914 0.402897 -0.828505,
0.390317 0.404381 -0.827121,
0.350215 0.373931 0.858793,
0.350274 0.373993 0.858742,
0.347743 0.371349 0.860915,
-0.419833 -0.446604 -0.790117,
-0.689344 -0.724173 0.019473,
-0.689331 -0.724151 0.0207002,
-0.421174 -0.448003 -0.78861,
-0.403852 -0.418698 0.813385 ]
}
IndexedFaceSet {
coordIndex [ 0, 1, 2, 3, -1,
1, 4, 5, 2, -1,
6, 7, 8, 9, -1,
10, 11, 12, 13, -1,
11, 9, 8, 12, -1 ]
normalIndex [ 0, 1, 2, 3, -1,
1, 4, 5, 2, -1,
6, 7, 8, 8, -1,
9, 10, 11, 12, -1,
10, 13, 13, 11, -1 ]
}
}
DEF dartMtl3d Material {
ambientColor 0 0 0
diffuseColor 0 0 0
specularColor 0.9 0.9 0.9
shininess 1
}
Separator {
Coordinate3 {
point [ 0.810005 0.845748 13.4438,
0.864541 0.905296 13.7679,
0.863498 0.906293 13.7657,
0.789593 0.906293 13.4438,
0.8059 0.961024 13.4438,
1.18959 0.906293 4.25777,
1.22511 0.906293 6.51174,
0.993274 0.587194 6.51174,
0.889593 0.570773 6.51174,
0.889593 0.606294 4.25777,
0.982298 0.620977 4.25777,
0.889593 1.24181 6.51174,
0.889593 1.20629 4.25777,
0.646889 1.08263 4.25777,
0.589594 0.906293 4.25777,
0.554073 0.906293 6.51174,
0.618151 1.10351 6.51174,
0.982298 1.19161 4.25777,
0.993274 1.22539 6.51174,
0.618151 0.709079 6.51174,
0.646889 0.729958 4.25777,
0.9477 0.824908 13.4438,
0.900686 0.870551 13.7395,
0.849475 0.814693 13.4438,
0.889593 0.806293 13.4438,
0.979097 0.95089 13.4438,
0.93521 0.906683 13.7189,
0.979888 0.863319 13.4438,
0.989593 0.906293 13.4438,
0.842963 0.994755 13.4438,
0.899078 0.941406 13.7421,
0.94613 0.988776 13.4438,
0.889593 1.00629 13.4438,
0.98834 0.957566 13.0059,
0.973494 1.16451 6.77778,
0.889593 1.1778 6.77778,
1.1611 0.906293 6.77778,
0.955627 0.995742 13.0091,
0.889593 0.634784 6.77778,
0.618084 0.906293 6.77778,
0.669937 0.746704 6.77778,
0.84394 0.806172 13.0536,
0.804232 0.837003 13.0573,
0.954894 0.817303 13.0404,
0.973494 0.648072 6.77778,
0.987531 0.855279 13.0385,
0.669937 1.06588 6.77778,
0.798046 0.967867 13.0424,
0.834653 1.00203 13.0402 ]
}
Normal {
vector [ -0.795617 -0.605254 0.0257197,
-0.908825 -0.0361586 0.415608,
-0.910774 0 0.412905,
-0.999669 0 0.0257197,
-0.836652 0.547131 0.0257197,
0.999876 0 -0.0157574,
0.308979 -0.950938 -0.0157574,
0 -0.999876 -0.0157574,
0 0.999876 -0.0157574,
-0.808917 0.587712 -0.0157574,
-0.999876 0 -0.0157574,
0.308979 0.950938 -0.0157574,
-0.808917 -0.587712 -0.0157574,
0.580882 -0.813582 0.0257197,
0.274002 -0.88286 0.381421,
-0.401043 -0.915698 0.0257197,
0 -0.999669 0.0257197,
0.894752 0.445822 0.0257197,
0.934224 0.0079833 0.356598,
0.902652 -0.429602 0.0257197,
0.999669 0 0.0257197,
-0.46615 0.884332 0.0257197,
0.240743 0.891191 0.384474,
0.565182 0.824565 0.0257197,
0 0.999669 0.0257197,
0.8872 0.460667 0.0257204,
0.308915 0.950742 0.0257204,
0 0.999669 0.0257204,
0.999669 0 0.0257204,
0.593723 0.804258 0.0257204,
0.565182 0.824565 0.0257204,
0.894752 0.445822 0.0257204,
0 -0.999669 0.0257204,
-0.999669 0 0.0257204,
-0.808749 -0.587591 0.0257204,
-0.414747 -0.909573 0.0257204,
-0.776149 -0.630025 0.0257204,
-0.401043 -0.915698 0.0257204,
-0.795617 -0.605254 0.0257204,
0.580882 -0.813582 0.0257204,
0.591414 -0.805958 0.0257204,
0.308915 -0.950742 0.0257204,
0.886604 -0.461814 0.0257204,
0.902652 -0.429602 0.0257204,
-0.808749 0.587591 0.0257204,
-0.836652 0.547131 0.0257204,
-0.829497 0.557919 0.0257204,
-0.497558 0.86705 0.0257204,
-0.46615 0.884332 0.0257204 ]
}
IndexedFaceSet {
coordIndex [ 0, 1, 2, 3, -1,
3, 2, 4, -1,
5, 6, 7, 8, 9,
10, -1,
11, 12, 13, 14, 15,
15, 16, -1,
17, 12, 11, 18, 6,
5, -1,
9, 8, 19, 15, 14,
14, 20, -1,
21, 22, 23, 24, -1,
25, 26, 27, 28, -1,
29, 30, 31, 32, -1,
33, 34, 35, -1,
33, 36, 34, -1,
37, 33, 35, -1,
31, 37, 35, -1,
28, 36, 33, -1,
32, 31, 35, -1,
25, 28, 33, -1,
38, 39, 40, -1,
41, 39, 38, -1,
42, 39, 41, -1,
3, 39, 42, -1,
23, 41, 38, -1,
24, 23, 38, -1,
0, 3, 42, -1,
21, 24, 38, -1,
43, 21, 38, -1,
44, 43, 38, -1,
45, 43, 44, -1,
28, 45, 44, -1,
28, 27, 45, -1,
36, 28, 44, -1,
32, 35, 46, 39, 3,
3, 4, 47, 48, 29, -1 ]
normalIndex [ 0, 1, 2, 3, -1,
3, 2, 4, -1,
5, 5, 6, 7, 7,
6, -1,
8, 8, 9, 10, 10,
10, 9, -1,
11, 8, 8, 11, 5,
5, -1,
7, 7, 12, 10, 10,
10, 12, -1,
13, 14, 15, 16, -1,
17, 18, 19, 20, -1,
21, 22, 23, 24, -1,
25, 26, 27, -1,
25, 28, 26, -1,
29, 25, 27, -1,
30, 29, 27, -1,
28, 28, 25, -1,
27, 30, 27, -1,
31, 28, 25, -1,
32, 33, 34, -1,
35, 33, 32, -1,
36, 33, 35, -1,
33, 33, 36, -1,
37, 35, 32, -1,
32, 37, 32, -1,
38, 33, 36, -1,
39, 32, 32, -1,
40, 39, 32, -1,
41, 40, 32, -1,
42, 40, 41, -1,
28, 42, 41, -1,
28, 43, 42, -1,
28, 28, 41, -1,
27, 27, 44, 33, 33,
33, 45, 46, 47, 48, -1 ]
}
}
DEF dartMtl4d Material {
ambientColor 0.12 0.12 0.12
diffuseColor 0.8 0.8 0.8
specularColor 0.9 0.9 0.9
shininess 1
}
Separator {
Coordinate3 {
point [ 0.0504182 1.68924 15.1813,
0.0850137 1.72533 15.1795,
0.834653 1.00203 13.0402,
0.798046 0.967867 13.0424,
0.871239 0.904941 17.2707,
0.905864 0.941012 17.2706,
0.954894 0.817303 13.0404,
0.987531 0.855279 13.0385,
1.79048 0.0882463 15.1872,
1.75582 0.0522095 15.189 ]
}
Normal {
vector [ -0.721211 0.692341 0.0227879,
-0.721222 0.692351 0.0221272,
-0.432899 0.414158 -0.800669,
-0.433662 0.414892 -0.799877,
-0.405511 0.390689 0.826392,
0.400778 -0.386154 -0.83082,
0.399983 -0.385392 -0.831557,
0.72116 -0.692205 0.0279388,
0.721147 -0.692191 0.0286011,
0.367316 -0.351099 0.861283 ]
}
IndexedFaceSet {
coordIndex [ 0, 1, 2, 3, -1,
4, 5, 1, 0, -1,
6, 7, 8, 9, -1,
9, 8, 5, 4, -1 ]
normalIndex [ 0, 1, 2, 3, -1,
4, 4, 1, 0, -1,
5, 6, 7, 8, -1,
8, 7, 9, 9, -1 ]
}
}
DEF dartMtl5d Material {
ambientColor 0.12 0 0
diffuseColor 0.8 0 0
specularColor 0.9 0.9 0.9
shininess 1
}
Separator {
Coordinate3 {
point [ 0.0850137 1.72533 15.1795,
0.899078 0.941406 13.7421,
0.842963 0.994755 13.4438,
0.834653 1.00203 13.0402,
1.79048 0.0882463 15.1872,
0.979888 0.863319 13.4438,
0.93521 0.906683 13.7189,
0.987531 0.855279 13.0385,
0.890167 0.955937 17.1891,
0.926238 0.921313 17.1894,
0.905864 0.941012 17.2706,
1.7022 1.7948 15.1191,
0.94613 0.988776 13.4438,
0.955627 0.995742 13.0091,
0.979097 0.95089 13.4438,
0.98834 0.957566 13.0059,
1.73846 1.76036 15.1164,
0.8059 0.961024 13.4438,
0.0504182 1.68924 15.1813,
0.798046 0.967867 13.0424,
0.855618 0.919847 17.2197,
0.863498 0.906293 13.7657,
0.864541 0.905296 13.7679,
0.871239 0.904941 17.2707,
0.891688 0.885223 17.22,
0.9477 0.824908 13.4438,
0.900686 0.870551 13.7395,
0.954894 0.817303 13.0404,
1.75582 0.0522095 15.189,
0.849475 0.814693 13.4438,
0.142778 0.084047 15.1599,
0.84394 0.806172 13.0536,
0.885515 0.878773 17.2253,
0.106593 0.118574 15.1628,
0.810005 0.845748 13.4438,
0.804232 0.837003 13.0573,
0.849297 0.913243 17.2251 ]
}
Normal {
vector [ 0.6925 0.721417 -0.00125102,
-0.724366 0.689399 -0.00477878,
0.724366 -0.689399 0.00477878,
-0.6925 -0.721417 0.00125102 ]
}
IndexedFaceSet {
coordIndex [ 0, 1, 2, -1,
0, 2, 3, -1,
4, 5, 6, -1,
4, 7, 5, -1,
8, 1, 0, -1,
9, 4, 6, -1,
10, 4, 9, -1,
10, 9, 8, -1,
10, 8, 0, -1,
11, 12, 1, -1,
11, 13, 12, -1,
8, 11, 1, -1,
14, 9, 6, -1,
15, 9, 14, -1,
16, 9, 15, -1,
17, 18, 19, -1,
20, 18, 17, -1,
21, 20, 17, -1,
22, 20, 21, -1,
23, 18, 20, -1,
24, 23, 20, -1,
25, 24, 26, -1,
27, 24, 25, -1,
28, 24, 27, -1,
28, 23, 24, -1,
29, 30, 31, -1,
26, 30, 29, -1,
32, 30, 26, -1,
24, 32, 26, -1,
33, 22, 34, -1,
33, 34, 35, -1,
20, 22, 33, -1,
36, 20, 33, -1 ]
normalIndex [ 0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
1, 1, 1, -1,
1, 1, 1, -1,
1, 1, 1, -1,
2, 2, 2, -1,
2, 2, 2, -1,
2, 2, 2, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
3, 3, 3, -1,
2, 2, 2, -1,
2, 2, 2, -1,
2, 2, 2, -1,
2, 2, 2, -1,
1, 1, 1, -1,
1, 1, 1, -1,
1, 1, 1, -1,
1, 1, 1, -1 ]
}
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

546
public/assets/hartPoly.wrl Normal file
View File

@ -0,0 +1,546 @@
#VRML V1.0 ascii
Separator {
DEF Title Info {
string "test"
}
DEF SceneInfo Info {
string "(c) George W. Hart, 1996. george@li.net"
string "Dept. Computer Science, Hofstra University."
string "Freely distributable for noncommercial purposes."
}
DEF BackgroundColor Info { # blue sky
string "0.2 0.5 1"
}
DEF Viewer Info {
string "examiner"
}
ShapeHints {
vertexOrdering UNKNOWN_ORDERING
creaseAngle 0
}
DirectionalLight {
direction -.5 -1 0
intensity 0.75
}
DirectionalLight {
direction .5 1 0
intensity 0.75
}
Separator {
Coordinate3 {
point [
-4.2301 0 0.081329,
-4.0293 -0.61803 1.1328,
-4.0293 0.61803 1.1328,
-3.9982 -0.71364 -0.90092,
-3.9982 0.71364 -0.90092,
-3.7663 0 -1.8832,
-3.6541 -1.7727 0.90091,
-3.6541 1.7727 0.90091,
-3.623 -1.8683 -1.1328,
-3.623 1.8683 -1.1328,
-3.4222 -1.0591 2.115,
-3.4222 1.0591 2.115,
-3.4222 -2.4864 -0.08133,
-3.4222 2.4864 -0.08133,
-3.3911 -1.1547 -2.115,
-3.3911 1.1547 -2.115,
-3.047 -2.2138 1.8832,
-3.047 2.2138 1.8832,
-3.0159 0 -2.8654,
-2.8965 2.8683 -1.1328,
-2.8965 -2.8683 -1.1328,
-2.8151 -0.61803 3.0973,
-2.8151 0.61803 3.0973,
-2.8151 -2.9274 0.90092,
-2.8151 2.9274 0.90092,
-2.6408 -1.1547 -3.0973,
-2.6408 1.1547 -3.0973,
-2.44 -1.7727 2.8654,
-2.44 1.7727 2.8654,
-2.1461 -2.8683 -2.115,
-2.1461 2.8683 -2.115,
-2.0648 -2.9274 2.115,
-2.0648 2.9274 2.115,
-1.9645 0 3.7471,
-1.9142 3.582 -0.90092,
-1.9142 -3.582 -0.90092,
-1.9142 2.1547 -3.0973,
-1.9142 -2.1547 -3.0973,
-1.8329 3.6411 1.1328,
-1.8329 -3.6411 1.1328,
-1.5893 1.1547 -3.7471,
-1.5893 -1.1547 -3.7471,
-1.4577 2.4864 3.0973,
-1.4577 -2.4864 3.0973,
-1.3072 4.023 0.08133,
-1.3072 -4.023 0.08133,
-1.2141 0 -3.979,
-1.1639 3.582 -1.8832,
-1.1639 -3.582 -1.8832,
-0.98225 -0.71364 3.979,
-0.98225 0.71364 3.979,
-0.93198 2.8683 -2.8654,
-0.93198 -2.8683 -2.8654,
-0.65733 4.023 1.1328,
-0.65733 -4.023 1.1328,
-0.60706 1.8683 3.7471,
-0.60706 -1.8683 3.7471,
-0.5568 4.023 -0.90092,
-0.5568 -4.023 -0.90092,
-0.37518 1.1547 -3.979,
-0.37518 -1.1547 -3.979,
-0.28214 2.8683 3.0973,
-0.28214 -2.8683 3.0973,
-0.050265 3.582 2.115,
-0.050265 -3.582 2.115,
0 0 4.2109,
0 0 -4.2109,
0.050265 3.582 -2.115,
0.050265 -3.582 -2.115,
0.28214 2.8683 -3.0973,
0.28214 -2.8683 -3.0973,
0.37518 1.1547 3.979,
0.37518 -1.1547 3.979,
0.5568 4.023 0.90092,
0.5568 -4.023 0.90092,
0.60706 1.8683 -3.7471,
0.60706 -1.8683 -3.7471,
0.65733 4.023 -1.1328,
0.65733 -4.023 -1.1328,
0.93198 2.8683 2.8654,
0.93198 -2.8683 2.8654,
0.98225 -0.71364 -3.979,
0.98225 0.71364 -3.979,
1.1639 3.582 1.8832,
1.1639 -3.582 1.8832,
1.2141 0 3.979,
1.3072 4.023 -0.08133,
1.3072 -4.023 -0.08133,
1.4577 2.4864 -3.0973,
1.4577 -2.4864 -3.0973,
1.5893 1.1547 3.7471,
1.5893 -1.1547 3.7471,
1.8329 3.6411 -1.1328,
1.8329 -3.6411 -1.1328,
1.9142 2.1547 3.0973,
1.9142 -2.1547 3.0973,
1.9142 3.582 0.90092,
1.9142 -3.582 0.90092,
1.9645 0 -3.7471,
2.0648 -2.9274 -2.115,
2.0648 2.9274 -2.115,
2.1461 -2.8683 2.115,
2.1461 2.8683 2.115,
2.44 -1.7727 -2.8654,
2.44 1.7727 -2.8654,
2.6408 -1.1547 3.0973,
2.6408 1.1547 3.0973,
2.8151 -2.9274 -0.90092,
2.8151 2.9274 -0.90092,
2.8151 -0.61803 -3.0973,
2.8151 0.61803 -3.0973,
2.8965 2.8683 1.1328,
2.8965 -2.8683 1.1328,
3.0159 0 2.8654,
3.047 -2.2138 -1.8832,
3.047 2.2138 -1.8832,
3.3911 -1.1547 2.115,
3.3911 1.1547 2.115,
3.4222 -2.4864 0.08133,
3.4222 2.4864 0.08133,
3.4222 -1.0591 -2.115,
3.4222 1.0591 -2.115,
3.623 -1.8683 1.1328,
3.623 1.8683 1.1328,
3.6541 -1.7727 -0.90091,
3.6541 1.7727 -0.90091,
3.7663 0 1.8832,
3.9982 -0.71364 0.90092,
3.9982 0.71364 0.90092,
4.0293 -0.61803 -1.1328,
4.0293 0.61803 -1.1328,
4.2301 0 -0.081329,
]
}
Material {
diffuseColor .9 .4 0.3 # 3-sided
}
IndexedFaceSet {
coordIndex [
2,0,1,-1,
13,19,9,-1,
33,22,21,-1,
36,40,26,-1,
53,44,38,-1,
55,61,42,-1,
86,92,77,-1,
88,75,69,-1,
90,106,94,-1,
123,119,111,-1,
12,8,20,-1,
25,41,37,-1,
39,45,54,-1,
56,43,62,-1,
87,78,93,-1,
89,70,76,-1,
91,95,105,-1,
110,109,98,-1,
122,112,118,-1,
131,129,130,-1,
]
}
Material {
diffuseColor .4 .5 0.9 # 4-sided
}
IndexedFaceSet {
coordIndex [
2,11,17,7,-1,
4,5,3,0,-1,
5,4,9,15,-1,
11,22,28,17,-1,
17,28,42,32,-1,
18,5,15,26,-1,
24,13,7,17,-1,
24,17,32,38,-1,
30,19,34,47,-1,
33,49,65,50,-1,
36,30,47,51,-1,
47,57,77,67,-1,
50,65,71,55,-1,
51,47,67,69,-1,
53,63,83,73,-1,
57,47,34,44,-1,
63,61,79,83,-1,
65,85,90,71,-1,
83,79,94,102,-1,
86,73,83,96,-1,
88,100,115,104,-1,
96,83,102,111,-1,
100,92,108,115,-1,
115,108,119,125,-1,
6,12,23,16,-1,
16,23,39,31,-1,
20,29,48,35,-1,
27,16,31,43,-1,
29,37,52,48,-1,
35,48,58,45,-1,
48,52,70,68,-1,
58,48,68,78,-1,
60,41,46,66,-1,
62,64,84,80,-1,
64,54,74,84,-1,
76,60,66,81,-1,
80,84,101,95,-1,
81,66,82,98,-1,
84,97,112,101,-1,
87,97,84,74,-1,
93,99,114,107,-1,
99,89,103,114,-1,
105,116,126,113,-1,
114,103,109,120,-1,
114,124,118,107,-1,
116,122,127,126,-1,
124,114,120,129,-1,
131,128,126,127,-1,
6,16,10,1,-1,
14,8,3,5,-1,
16,27,21,10,-1,
25,14,5,18,-1,
56,72,65,49,-1,
66,46,40,59,-1,
72,91,85,65,-1,
82,66,59,75,-1,
113,126,117,106,-1,
121,110,104,115,-1,
126,128,123,117,-1,
130,121,115,125,-1,
]
}
Material {
diffuseColor .9 .9 0.3 # 6-sided
}
IndexedFaceSet {
coordIndex [
2,1,10,21,22,11,-1,
13,9,4,0,2,7,-1,
19,13,24,38,44,34,-1,
22,33,50,55,42,28,-1,
36,26,15,9,19,30,-1,
40,36,51,69,75,59,-1,
53,38,32,42,61,63,-1,
61,55,71,90,94,79,-1,
86,77,57,44,53,73,-1,
88,69,67,77,92,100,-1,
92,86,96,111,119,108,-1,
123,111,102,94,106,117,-1,
12,20,35,45,39,23,-1,
25,37,29,20,8,14,-1,
37,41,60,76,70,52,-1,
39,54,64,62,43,31,-1,
56,62,80,95,91,72,-1,
70,89,99,93,78,68,-1,
78,87,74,54,45,58,-1,
87,93,107,118,112,97,-1,
89,76,81,98,109,103,-1,
109,110,121,130,129,120,-1,
112,122,116,105,95,101,-1,
129,131,127,122,118,124,-1,
75,88,104,110,98,82,-1,
131,130,125,119,123,128,-1,
8,12,6,1,0,3,-1,
33,21,27,43,56,49,-1,
41,25,18,26,40,46,-1,
91,105,113,106,90,85,-1,
]
}
Material {
diffuseColor 0 0 0 # black edges
}
IndexedLineSet {
coordIndex [
0,1,-1,
0,2,-1,
0,3,-1,
0,4,-1,
1,2,-1,
1,6,-1,
1,10,-1,
2,7,-1,
2,11,-1,
3,5,-1,
3,8,-1,
4,5,-1,
4,9,-1,
5,14,-1,
5,15,-1,
5,18,-1,
6,12,-1,
6,16,-1,
7,13,-1,
7,17,-1,
8,12,-1,
8,14,-1,
8,20,-1,
9,13,-1,
9,15,-1,
9,19,-1,
10,16,-1,
10,21,-1,
11,17,-1,
11,22,-1,
12,20,-1,
12,23,-1,
13,19,-1,
13,24,-1,
14,25,-1,
15,26,-1,
16,23,-1,
16,27,-1,
16,31,-1,
17,24,-1,
17,28,-1,
17,32,-1,
18,25,-1,
18,26,-1,
19,30,-1,
19,34,-1,
20,29,-1,
20,35,-1,
21,22,-1,
21,27,-1,
21,33,-1,
22,28,-1,
22,33,-1,
23,39,-1,
24,38,-1,
25,37,-1,
25,41,-1,
26,36,-1,
26,40,-1,
27,43,-1,
28,42,-1,
29,37,-1,
29,48,-1,
30,36,-1,
30,47,-1,
31,39,-1,
31,43,-1,
32,38,-1,
32,42,-1,
33,49,-1,
33,50,-1,
34,44,-1,
34,47,-1,
35,45,-1,
35,48,-1,
36,40,-1,
36,51,-1,
37,41,-1,
37,52,-1,
38,44,-1,
38,53,-1,
39,45,-1,
39,54,-1,
40,46,-1,
40,59,-1,
41,46,-1,
41,60,-1,
42,55,-1,
42,61,-1,
43,56,-1,
43,62,-1,
44,53,-1,
44,57,-1,
45,54,-1,
45,58,-1,
46,66,-1,
47,51,-1,
47,57,-1,
47,67,-1,
48,52,-1,
48,58,-1,
48,68,-1,
49,56,-1,
49,65,-1,
50,55,-1,
50,65,-1,
51,69,-1,
52,70,-1,
53,63,-1,
53,73,-1,
54,64,-1,
54,74,-1,
55,61,-1,
55,71,-1,
56,62,-1,
56,72,-1,
57,77,-1,
58,78,-1,
59,66,-1,
59,75,-1,
60,66,-1,
60,76,-1,
61,63,-1,
61,79,-1,
62,64,-1,
62,80,-1,
63,83,-1,
64,84,-1,
65,71,-1,
65,72,-1,
65,85,-1,
66,81,-1,
66,82,-1,
67,69,-1,
67,77,-1,
68,70,-1,
68,78,-1,
69,75,-1,
69,88,-1,
70,76,-1,
70,89,-1,
71,90,-1,
72,91,-1,
73,83,-1,
73,86,-1,
74,84,-1,
74,87,-1,
75,82,-1,
75,88,-1,
76,81,-1,
76,89,-1,
77,86,-1,
77,92,-1,
78,87,-1,
78,93,-1,
79,83,-1,
79,94,-1,
80,84,-1,
80,95,-1,
81,98,-1,
82,98,-1,
83,96,-1,
83,102,-1,
84,97,-1,
84,101,-1,
85,90,-1,
85,91,-1,
86,92,-1,
86,96,-1,
87,93,-1,
87,97,-1,
88,100,-1,
88,104,-1,
89,99,-1,
89,103,-1,
90,94,-1,
90,106,-1,
91,95,-1,
91,105,-1,
92,100,-1,
92,108,-1,
93,99,-1,
93,107,-1,
94,102,-1,
94,106,-1,
95,101,-1,
95,105,-1,
96,111,-1,
97,112,-1,
98,109,-1,
98,110,-1,
99,114,-1,
100,115,-1,
101,112,-1,
102,111,-1,
103,109,-1,
103,114,-1,
104,110,-1,
104,115,-1,
105,113,-1,
105,116,-1,
106,113,-1,
106,117,-1,
107,114,-1,
107,118,-1,
108,115,-1,
108,119,-1,
109,110,-1,
109,120,-1,
110,121,-1,
111,119,-1,
111,123,-1,
112,118,-1,
112,122,-1,
113,126,-1,
114,120,-1,
114,124,-1,
115,121,-1,
115,125,-1,
116,122,-1,
116,126,-1,
117,123,-1,
117,126,-1,
118,122,-1,
118,124,-1,
119,123,-1,
119,125,-1,
120,129,-1,
121,130,-1,
122,127,-1,
123,128,-1,
124,129,-1,
125,130,-1,
126,127,-1,
126,128,-1,
127,131,-1,
128,131,-1,
129,130,-1,
129,131,-1,
130,131,-1,
]
}
}
}

1096
public/assets/hartWings.wrl Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
#VRML V2.0 utf8
# X3D-to-VRML-97 XSL translation autogenerated by X3dToVrml97.xslt
# http://www.web3d.org/x3d/content/X3dToVrml97.xslt
# Generated using XSLT processor: SAXON 8.7 from Saxonica
# [X3D] VRML V3.2 utf8
# PROFILE Immersive
# [X3D] version=3.2
# [X3D] noNamespaceSchemaLocation=http://www.web3d.org/specifications/x3d-3.2.xsd
# [head]
# META "title" "HelloWorld.x3d"
# META "description" "Simple X3D example"
# META "created" "30 October 2000"
# META "modified" "15 February 2009"
# META "creator" "Don Brutzman"
# META "identifier" "http://www.web3d.org/x3d/content/examples/HelloWorld.x3d"
# META "image" "http://www.web3d.org/x3d/content/examples/HelloWorldTall.png"
# META "generator" "X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit"
# META "license" "http://www.web3d.org/x3d/content/examples/license.html"
# [Scene] ========== ========== ==========
NavigationInfo { type [ "EXAMINE" "ANY" ] } ### Default X3D NavigationInfo
# Example scene to illustrate X3D nodes and fields (XML elements and attributes)
Group {
children [
Viewpoint {
centerOfRotation 0 -1 0
description "Hello world!"
position 0 -1 7
}
Transform {
rotation 0 1 0 3
children [
Shape {
geometry Sphere {
}
appearance Appearance {
material Material {
diffuseColor 0 0.5 1
}
texture ImageTexture {
url [ "earth-topo.png" "earth-topo.jpg" "earth-topo-small.gif" "http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png" "http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg" "http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif" ]
}
}
}
]
}
Transform {
translation 0 -2 0
children [
Shape {
geometry Text {
### Warning: <Text solid="false" /> not supported in VRML97 encoding, solid field ignored
string [ "Hello" "world!" ]
fontStyle FontStyle {
justify [ "MIDDLE" "MIDDLE" ]
}
}
appearance Appearance {
material Material {
diffuseColor 0.1 0.5 1
}
}
}
]
}
]
}

14
public/hartPoly.html Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Archematics demo</title>
<script src="js/giveAwrl.js" type="module"></script>
</head>
<body>
<p>Here is a
<a href="http://127.0.0.1:8080/assets/hartWings.wrl">Hart polyhedron
</a>.
</p>
</body>
</html>

View File

@ -5,9 +5,17 @@
<title>Archematics demo</title>
</head>
<body>
<h2>Joyce Geometry Applet</h2>
<ul>
<li> <a href="inscribed-equilateral.html">Before</a> </li>
<li> <a href="inscribed-modified.html">After</a> </li>
</ul>
<h2>WRL Files</h2>
<ul><li> <a href="wrl_2.html">Target two</a></li>
<li> <a href="wrl_modified.html">Target modified</a></li>
<li> <a href="wrl_1.html">Older target</a></li>
<li> <a href="wrl_older.html">Older modified</a></li>
<li> <a href="hartPoly.html">Hart polyhedron</a></li>
</ul>
</body>
</html>

124
public/wrl_1.html Normal file
View File

@ -0,0 +1,124 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>
WRL Files - Version 1.0
</title>
</head>
<body vlink="#000055" link="#CC0000" bgcolor="#EEEEEE" alink="#FF3300">
<h1 align="center">
WRL Files - Version 1.0
</h1>
<hr>
<p>
<b>WRL_1</b> is a data directory which
contains examples of version 1.0 <b>WRL</b> files,
also known as VRML (Virtual Reality Modeling Language).
</p>
<p>
The <b>WRL</b> version 1.0 format has been superseded by the <b>WRL</b> version 2.0 format.
</p>
<h3 align="center">
WRL File characteristics:
</h3>
<p>
</p><ul>
<li>
ASCII
</li>
<li>
Color
</li>
<li>
3D
</li>
<li>
No compression
</li>
<li>
1 image
</li>
</ul>
<p></p>
<h3 align="center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href="https://people.math.sc.edu/Burkardt/txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align="center">
Sample Files:
</h3>
<p>
</p><ul>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/anchor.wrl">anchor.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/dart.wrl">dart.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/fish.wrl">fish.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/hourglas.wrl">hourglas.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/italiant.wrl">italiant.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/magnifier.wrl">magnifier.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/microscope.wrl">microscope.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/pencil.wrl">pencil.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/piggybank.wrl">piggybank.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/seashell.wrl">seashell.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/stellate.wrl">stellate.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/syringe.wrl">syringe.wrl</a>;
</li>
<li>
<a href="https://people.math.sc.edu/Burkardt/data/wrl_1/wthrvane.wrl">wthrvane.wrl</a>;
</li>
</ul>
<p></p>
<p>
You can go up one level to
<a href="https://people.math.sc.edu/Burkardt/data/data.html">the DATA page.</a>
</p>
<hr>
<i>
Last revised on 27 March 2009.
</i>
<!-- John Burkardt -->
</body></html>

126
public/wrl_2.html Normal file
View File

@ -0,0 +1,126 @@
<html>
<head>
<title>
WRL Files - Version 2.0
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055" >
<h1 align = "center">
WRL Files - Version 2.0
</h1>
<hr>
<p>
<b>WRL_2</b> is a data directory which
contains examples of WRL version 2.0 files, also known as VRML (Virtual
Reality Modeling Language).
</p>
<p>
The <b>WRL</b> version 2.0 format has been superseded by the <b>X3D</b> format.
</p>
<h3 align = "center">
WRL File characteristics:
</h3>
<p>
<ul>
<li>
ASCII
</li>
<li>
Color
</li>
<li>
3D
</li>
<li>
No compression
</li>
<li>
1 image
</li>
</ul>
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Sample Files:
</h3>
<p>
<ul>
<li>
<a href = "bridge.wrl">bridge.wrl</a>;
</li>
<li>
<a href = "cube.wrl">cube.wrl</a>;
</li>
<li>
<a href = "dodec.wrl">dodec.wrl</a>;
</li>
<li>
<a href = "dodec_texture.wrl">dodec_texture.wrl</a>;
</li>
<li>
<a href = "fish.wrl">fish.wrl</a>;
</li>
<li>
<a href = "hello_world.wrl">hello_world.wrl</a>;
</li>
<li>
<a href = "materials.wrl">materials.wrl</a>;
</li>
<li>
<a href = "red_chair.wrl">red_chair.wrl</a>,
an animation of a red chair, bouncing;
</li>
<li>
<a href = "red_sphere.wrl">red_sphere.wrl</a>;
</li>
<li>
<a href = "simplex.wrl">simplex.wrl</a>;
</li>
<li>
<a href = "sphere.wrl">sphere.wrl</a>;
</li>
<li>
<a href = "two_shapes.wrl">two_shapes.wrl</a>;
</li>
<li>
<a href = "vrml_balance3d.wrl">vrml_balance3d.wrl</a>
an animation of some objects on a balance, by Gary Hart;
</li>
</ul>
</p>
<p>
You can go up one level to
<a href = "../data.html">the DATA page.</a>
</p>
<hr>
<i>
Last revised on 30 March 2009.
</i>
<!-- John Burkardt -->
</body>
</html>

127
public/wrl_modified.html Normal file
View File

@ -0,0 +1,127 @@
<html>
<head>
<title>
WRL Files - Version 2.0
</title>
<script src="js/giveAwrl.js" type="module"></script>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055" >
<h1 align = "center">
WRL Files - Version 2.0
</h1>
<hr>
<p>
<b>WRL_2</b> is a data directory which
contains examples of WRL version 2.0 files, also known as VRML (Virtual
Reality Modeling Language).
</p>
<p>
The <b>WRL</b> version 2.0 format has been superseded by the <b>X3D</b> format.
</p>
<h3 align = "center">
WRL File characteristics:
</h3>
<p>
<ul>
<li>
ASCII
</li>
<li>
Color
</li>
<li>
3D
</li>
<li>
No compression
</li>
<li>
1 image
</li>
</ul>
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Sample Files:
</h3>
<p>
<ul>
<li>
<a href = "bridge.wrl">bridge.wrl</a>;
</li>
<li>
<a href = "cube.wrl">cube.wrl</a>;
</li>
<li>
<a href = "dodec.wrl">dodec.wrl</a>;
</li>
<li>
<a href = "dodec_texture.wrl">dodec_texture.wrl</a>;
</li>
<li>
<a href = "fish.wrl">fish.wrl</a>;
</li>
<li>
<a href = "http://127.0.0.1:8080/assets/hello_world.wrl">hello_world.wrl</a>;
</li>
<li>
<a href = "materials.wrl">materials.wrl</a>;
</li>
<li>
<a href = "red_chair.wrl">red_chair.wrl</a>,
an animation of a red chair, bouncing;
</li>
<li>
<a href = "red_sphere.wrl">red_sphere.wrl</a>;
</li>
<li>
<a href = "simplex.wrl">simplex.wrl</a>;
</li>
<li>
<a href = "sphere.wrl">sphere.wrl</a>;
</li>
<li>
<a href = "two_shapes.wrl">two_shapes.wrl</a>;
</li>
<li>
<a href = "vrml_balance3d.wrl">vrml_balance3d.wrl</a>
an animation of some objects on a balance, by Gary Hart;
</li>
</ul>
</p>
<p>
You can go up one level to
<a href = "../data.html">the DATA page.</a>
</p>
<hr>
<i>
Last revised on 30 March 2009.
</i>
<!-- John Burkardt -->
</body>
</html>

125
public/wrl_older.html Normal file
View File

@ -0,0 +1,125 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>
WRL Files - Version 1.0
</title>
<script src="js/giveAwrl.js" type="module"></script>
</head>
<body vlink="#000055" link="#CC0000" bgcolor="#EEEEEE" alink="#FF3300">
<h1 align="center">
WRL Files - Version 1.0
</h1>
<hr>
<p>
<b>WRL_1</b> is a data directory which
contains examples of version 1.0 <b>WRL</b> files,
also known as VRML (Virtual Reality Modeling Language).
</p>
<p>
The <b>WRL</b> version 1.0 format has been superseded by the <b>WRL</b> version 2.0 format.
</p>
<h3 align="center">
WRL File characteristics:
</h3>
<p>
</p><ul>
<li>
ASCII
</li>
<li>
Color
</li>
<li>
3D
</li>
<li>
No compression
</li>
<li>
1 image
</li>
</ul>
<p></p>
<h3 align="center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href="Burkardt/txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align="center">
Sample Files:
</h3>
<p>
</p><ul>
<li>
<a href="anchor.wrl">anchor.wrl</a>;
</li>
<li>
<a href="http://127.0.0.1:8080/assets/dart.wrl">dart.wrl</a>;
</li>
<li>
<a href="fish.wrl">fish.wrl</a>;
</li>
<li>
<a href="hourglas.wrl">hourglas.wrl</a>;
</li>
<li>
<a href="italiant.wrl">italiant.wrl</a>;
</li>
<li>
<a href="magnifier.wrl">magnifier.wrl</a>;
</li>
<li>
<a href="microscope.wrl">microscope.wrl</a>;
</li>
<li>
<a href="pencil.wrl">pencil.wrl</a>;
</li>
<li>
<a href="piggybank.wrl">piggybank.wrl</a>;
</li>
<li>
<a href="seashell.wrl">seashell.wrl</a>;
</li>
<li>
<a href="stellate.wrl">stellate.wrl</a>;
</li>
<li>
<a href="syringe.wrl">syringe.wrl</a>;
</li>
<li>
<a href="wthrvane.wrl">wthrvane.wrl</a>;
</li>
</ul>
<p></p>
<p>
You can go up one level to
<a href="/Burkardt/data/data.html">the DATA page.</a>
</p>
<hr>
<i>
Last revised on 27 March 2009.
</i>
<!-- John Burkardt -->
</body></html>

21
src/giveAwrl.civet Normal file
View File

@ -0,0 +1,21 @@
import https://code.jquery.com/jquery-3.7.1.js
certainlyHandled := '.x3d .gltf .glb .obj .stl .ply'.split ' '
jQuery.getScript 'https://create3000.github.io/code/x_ite/latest/x_ite.js',
async =>
canvas := X3D.createBrowser()
site := $('a[href^="http"]')
url := site.attr 'href'
if certainlyHandled.some((ext) => url.includes ext)
canvas.setAttribute 'src', site.attr 'href'
else if url.includes '.wrl'
// Need to obtain the text and check what level it is
response := await fetch url
text := await response.text()
if /#\s*VRML\s*V?1./i.test(text)
console.log('VRML 1 not yet supported')
else
browser := X3D.getBrowser canvas
scene := await browser.createX3DFromString text
browser.replaceWorld(scene)
site.after(canvas)