-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (78 loc) · 8.28 KB
/
Copy pathindex.html
File metadata and controls
94 lines (78 loc) · 8.28 KB
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
<html>
<head>
<title>Лабораторная №6</title>
<link rel="stylesheet" type="text/css" href="https://x3dom.org/download/dev/x3dom.css"></link>
<script type="text/javascript" src="https://x3dom.org/download/dev/x3dom-full.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<style type="text/css">
body{padding:0;margin:0;}
X3D{left:0px; top:0px; width:100%; height:100%; border:none;}
</style>
<X3D onkeypress="key_press(event)">
<Scene>
<Transform scale='2 2 2'>
<Transform translation='-1 -1 0' DEF='work_area'>
<Transform class='block' translation='0 0 0' DEF='point_work_0_0' data-x='0' data-y='0'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_0_0'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='0 0 0.11' DEF='point_0_0' data-x='0' data-y='0'><Shape><Appearance><ImageTexture url='o.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_0_0' id='BoxChaser_0_0' duration='0.3' initialDestination='#666'></ColorChaser>
<ROUTE fromNode='BoxChaser_0_0' fromField='value_changed' toNode='work_color_0_0' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='1 0 0' DEF='point_work_1_0' data-x='1' data-y='0'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_1_0'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='1 0 0.11' DEF='point_1_0' data-x='1' data-y='0'><Shape><Appearance><ImageTexture url='x.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_1_0' id='BoxChaser_1_0' duration='0.3' initialDestination='#eee'></ColorChaser>
<ROUTE fromNode='BoxChaser_1_0' fromField='value_changed' toNode='work_color_1_0' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='2 0 0' DEF='point_work_2_0' data-x='2' data-y='0'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_2_0'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='2 0 0.11' DEF='point_2_0' data-x='2' data-y='0'><Shape><Appearance><ImageTexture url='o.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_2_0' id='BoxChaser_2_0' duration='0.3' initialDestination='#666'></ColorChaser>
<ROUTE fromNode='BoxChaser_2_0' fromField='value_changed' toNode='work_color_2_0' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='0 1 0' DEF='point_work_0_1' data-x='0' data-y='1'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_0_1'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='0 1 0.11' DEF='point_0_1' data-x='0' data-y='1'><Shape><Appearance><ImageTexture url='x.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_0_1' id='BoxChaser_0_1' duration='0.3' initialDestination='#eee'></ColorChaser>
<ROUTE fromNode='BoxChaser_0_1' fromField='value_changed' toNode='work_color_0_1' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='1 1 0' DEF='point_work_1_1' data-x='1' data-y='1'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_1_1'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='1 1 0.11' DEF='point_1_1' data-x='1' data-y='1'><Shape><Appearance><ImageTexture url='o.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_1_1' id='BoxChaser_1_1' duration='0.3' initialDestination='#666'></ColorChaser>
<ROUTE fromNode='BoxChaser_1_1' fromField='value_changed' toNode='work_color_1_1' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='2 1 0' DEF='point_work_2_1' data-x='2' data-y='1'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_2_1'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='2 1 0.11' DEF='point_2_1' data-x='2' data-y='1'><Shape><Appearance><ImageTexture url='x.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_2_1' id='BoxChaser_2_1' duration='0.3' initialDestination='#eee'></ColorChaser>
<ROUTE fromNode='BoxChaser_2_1' fromField='value_changed' toNode='work_color_2_1' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='0 2 0' DEF='point_work_0_2' data-x='0' data-y='2'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_0_2'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='0 2 0.11' DEF='point_0_2' data-x='0' data-y='2'><Shape><Appearance><ImageTexture url='o.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_0_2' id='BoxChaser_0_2' duration='0.3' initialDestination='#666'></ColorChaser>
<ROUTE fromNode='BoxChaser_0_2' fromField='value_changed' toNode='work_color_0_2' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='1 2 0' DEF='point_work_1_2' data-x='1' data-y='2'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_1_2'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='1 2 0.11' DEF='point_1_2' data-x='1' data-y='2'><Shape><Appearance><ImageTexture url='x.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_1_2' id='BoxChaser_1_2' duration='0.3' initialDestination='#eee'></ColorChaser>
<ROUTE fromNode='BoxChaser_1_2' fromField='value_changed' toNode='work_color_1_2' toField='set_diffuseColor'></ROUTE>
<Transform class='block' translation='2 2 0' DEF='point_work_2_2' data-x='2' data-y='2'><Shape><Appearance><material diffuseColor='#fff' DEF='work_color_2_2'></material></Appearance><box size='1 1 0.2'></box></Shape></Transform><Transform onClick='block_click(this)' class='symb' onmouseover='block_hover(this)' onmouseout='block_out(this)' translation='2 2 0.11' DEF='point_2_2' data-x='2' data-y='2'><Shape><Appearance><ImageTexture url='o.png'></ImageTexture></Appearance><box size='1 1 0'></box></Shape></Transform>
<ColorChaser DEF='BoxChaser_2_2' id='BoxChaser_2_2' duration='0.3' initialDestination='#666'></ColorChaser>
<ROUTE fromNode='BoxChaser_2_2' fromField='value_changed' toNode='work_color_2_2' toField='set_diffuseColor'></ROUTE>
</Transform> <Transform rotation='0 0 0 0' scale='0.3 0.3 1' translation='0 2 0'>
<Shape onClick="restart()">
<Appearance><material diffuseColor='#0f0'></material></Appearance>
<Text string='Новая игра'></Text>
</Shape>
</Transform>
<Transform rotation='0 1 0 3.14' scale='0.3 0.3 1' translation='0 2 0'>
<Shape>
<Appearance><material diffuseColor='#f00'></material></Appearance>
<Text string='Поверни доску)'></Text>
</Shape>
</Transform>
<Transform rotation='0 0 0 0' scale='0.2 0.2 1' translation='0 -1.7 0'>
<Shape>
<Appearance><material diffuseColor='#222'></material></Appearance>
<Text string='Хорошей игры!' id="status"></Text>
</Shape>
</Transform>
</Transform>
<Viewpoint id="front" position="0 0 11" orientation="0 0 0 0" centerOfRotation="0 0 0" description="front camera"></Viewpoint>
</Scene>
</X3D>
<script type="text/javascript" src="script.js"></script>
<script type="text/javascript">
var game=false;
var def_game ={
'win':false,
'hod':'O',
'size_x':3,
'size_y':3,
'pole':[['','','',],['','','',],['','','',],]
}
</script>
</body>
</html>