-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathindex.html
103 lines (96 loc) · 4.38 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
<title>Лабораторная работа 5</title>
<link rel="stylesheet" href="http://www.x3dom.org/download/x3dom.css" />
<script src="http://www.x3dom.org/download/x3dom.js"></script>
</head>
<body>
<x3d width='1300px' height='580px' >
<scene>
<Group DEF='threecolor'>
<transform>
<!-- Коробка сфетофора -->
<shape>
<appearance>
<material diffuseColor='#C0C0C0'> </material>
</appearance>
<box size='2 6 1'></box>
</shape>
</transform>
<transform scale='0.7 0.7 0.1' translation='0 2 0.5'>
<shape>
<!-- Красный сигнал -->
<appearance>
<material DEF='red_material' diffuseColor="#000000"/>
</appearance>
<sphere/>
</shape>
</transform>
<transform scale='0.7 0.7 0.1' translation='0 0 0.5'>
<!-- Желтый сигнал -->
<shape>
<appearance>
<material DEF='yellow_material' diffuseColor="#000000"/>
</appearance>
<sphere/>
</shape>
</transform>
<transform scale='0.7 0.7 0.1' translation='0 -2 0.5'>
<!-- Зеленый сигнал -->
<shape>
<appearance>
<material DEF='green_material' diffuseColor="#000000"/>
</appearance>
<sphere/>
</shape>
</transform>
</Group>
<transform DEF='change_position' translation='4 0 0'>
<shape USE="threecolor"/>
</transform>
<transform DEF='change_orientation' translation='-5 0 0'>
<shape USE='threecolor'/>
</transform>
<!--Интерполятор света -->
<timesensor loop="true" cycleinterval="5" def="Time" enabled="true"
first="true"></timesensor>
<!--Красный-->
<colorinterpolator def="RedInt" keyvalue="1 0 0, 1 0 0,0 0 0,0 0 0, 0 0 0, 1 0 0"
key="0 0.2 0.6 0.85 0.9 1"></colorinterpolator>
<route tofield="set_fraction" tonode="RedInt" fromfield="fraction_changed" fromnode="Time">
</route>
<route tofield="set_diffuseColor" tonode="red_material" fromfield="value_changed" fromnode="RedInt">
</route>
<!--Желтый-->
<colorinterpolator def="YellowInt" keyvalue="0 0 0, 1 1 0,0 0 0,1 1 0, 0 0 0, 0 0 0"
key="0 0.2 0.6 0.85 0.9 1"></colorinterpolator>
<route tofield="set_fraction" tonode="YellowInt" fromfield="fraction_changed" fromnode="Time">
</route>
<route tofield="set_diffuseColor" tonode="yellow_material" fromfield="value_changed" fromnode="YellowInt">
</route>
<!--Зеленый-->
<colorinterpolator def="GreenInt" keyvalue="0 0 0, 0 0 0,0 1 0,0 0 0, 0 0 0, 0 0 0"
key="0 0.2 0.6 0.85 0.9 1"></colorinterpolator>
<route tofield="set_fraction" tonode="GreenInt" fromfield="fraction_changed" fromnode="Time">
</route>
<route tofield="set_diffuseColor" tonode="green_material" fromfield="value_changed" fromnode="GreenInt">
</route>
<!-- Интерполятор ориентации -->
<OrientationInterpolator DEF="OrientInt" key='0 0.5 1' keyvalue='0 0 0 0, 0 0 1 1.5, 0 0 0 0 '/>
<route tofield="set_fraction" tonode="OrientInt" fromfield="fraction_changed" fromnode="Time">
</route>
<route tofield="set_rotation" tonode="change_orientation" fromfield="value_changed" fromnode="OrientInt">
</route>
<!-- Интерполятор позиции -->
<PositionInterpolator DEF="PosInt" key='0 0.5 1' keyvalue='4 0 0, 8 0 0, 4 0 0 '/>
<route tofield="set_fraction" tonode="PosInt" fromfield="fraction_changed" fromnode="Time">
</route>
<route tofield="set_translation" tonode="change_position" fromfield="value_changed" fromnode="PosInt">
</route>
</scene>
</x3d>
</body>
</html>