Advertisement
Dimique

Untitled

Jun 25th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.05 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  
  3. <html lang="ru">
  4. <head>
  5. <meta charset="utf-8"></meta>
  6. <title>lab5</title>
  7. <link rel="stylesheet" href="https://www.x3dom.org/download/dev/x3dom.css"></link>
  8. <script src="https://www.x3dom.org/download/dev/x3dom.js"></script>
  9. <script>
  10. var index = 0;
  11. var e = true;
  12.  
  13. function move() {
  14. if (e) {
  15. var point;
  16. switch (index) {
  17. case 0: point = "-0.52161 -0.83868 -0.15668 1.60429";
  18. break;
  19. case 1: point = "-0.48574 0.87368 0.02715 0.79526";
  20. break;
  21. case 2: point = "-0.22463 -0.97088 -0.08324 1.78638 ";
  22. break;
  23. case 3: point = "0.80440 0.52183 -0.28396 1.60368";
  24. break;
  25. default: point = "0.80440 0.52183 -0.28396 1.60368";
  26. break;
  27. }
  28. document.getElementById("OrChaser").setAttribute("set_destination", point);
  29. setTimeout("alert('Vi priehali v tochku naznacheniya. Benzin konchilsya')", 4000);
  30. document.getElementById("337").setAttribute("enabled", false);
  31. e = false;
  32. }
  33. }
  34. function select(i) {
  35. index = i;
  36. }
  37. function sleep(ms) {
  38. return new Promise(resolve => setTimeout(resolve, ms));
  39. }
  40.  
  41. </script>
  42.  
  43. </head>
  44. <body>
  45. <select onchange="select(this.selectedIndex)">
  46. <option>В Южную Корею</option>
  47. <option>На Оляску</option>
  48. <option>В Тойгу</option>
  49. <option>в Эфиопию</option>
  50. </select>
  51. <button id="337" onclick = "move()">Свалить</button>
  52. <x3d>
  53. <scene>
  54. <Viewpoint position="10.42087 19.19802 7.00361" orientation="-0.48574 0.87368 0.02715 0.79526" centerOfRotation="0.00000 0.00000 0.00000" fieldOfView="0.78540" description="defaultX3DViewpointNode"></Viewpoint>
  55. <Viewpoint position="-21.27027 2.27914 -5.39412" orientation="0.17767 -0.95637 0.23192 2.07960" centerOfRotation="0.00000 0.00000 0.00000" fieldOfView="0.78540" description="defaultX3DViewpointNode"></Viewpoint>
  56. <transform center="0 -14.20 0" translation="3 14.20 3" rotation="0 1 0 1.570796326794897">
  57.  
  58. <transform translation="0 2.97 0">
  59. <shape>
  60. <appearance><material diffusecolor="white"></material></appearance>
  61. <text string="My"></text>
  62. </shape>
  63. </transform> <!-- My -->
  64.  
  65. <transform translation="0 2.2 0">
  66. <shape>
  67. <appearance><material diffusecolor="blue"></material></appearance>
  68. <text string="Lovely"></text>
  69. </shape>
  70. </transform> <!-- Lovely -->
  71.  
  72. <transform translation="0 1.45 0">
  73. <shape>
  74. <appearance><material diffusecolor="red"></material></appearance>
  75. <text string="Russia"></text>
  76. </shape>
  77. </transform> <!-- Russia -->
  78.  
  79. <transform>
  80. <transform>
  81. <shape>
  82. <appearance><ImageTexture url="rashka.png"></ImageTexture></appearance>
  83. <box size="3.78 .62 0.02"></box>
  84. </shape>
  85. </transform>
  86.  
  87. <transform translation="0 0 -0.01">
  88. <shape>
  89. <appearance><ImageTexture url="rashkaon.png"></ImageTexture></appearance>
  90. <box size="3.78 .62 0.02"></box>
  91. </shape>
  92. </transform>
  93.  
  94. <transform translation="0 -1.337 0">
  95. <shape>
  96. <appearance><ImageTexture url="wood.png"></ImageTexture></appearance>
  97. <box size=".222 2.22 0.222"></box>
  98. </shape>
  99. </transform>
  100. </transform>
  101. </transform>
  102.  
  103. <transform DEF="popup" center="0 -14.20 0" translation="0 14.20 0">
  104. <transform rotation="0 1 0 3.14159265358979">
  105. <transform translation="1.5 -0.37 0.5" rotation="0 1 0 3.14159265358979">
  106. <Shape>
  107. <IndexedFaceSet coordIndex= "0 1 2 -1
  108. 0 2 3 -1
  109.  
  110. 3 4 5 -1
  111. 5 3 0 -1
  112.  
  113. 0 1 5 -1
  114. 1 5 8 -1
  115.  
  116. 4 3 2 -1
  117. 2 7 4 -1
  118.  
  119. 7 8 1 -1
  120. 1 2 7 -1
  121.  
  122. 4 5 12 -1
  123. 5 12 11 -1
  124.  
  125. 10 12 13 -1
  126. 10 11 12 -1
  127.  
  128. 10 13 6 -1
  129. 6 9 10 -1"
  130. solid="false">
  131. <Coordinate point="0 0 0, 3 0 0, 3 0 1, 0 0 1, 0 1.2 1, 0 1.2 0, 3 0.6 1, 3 1.2 1,
  132. 3 1.2 0, 3 0.6 0, 1.5 0.6 0, 1.5 1.2 0, 1.5 1.2 1, 1.5 0.6 1"></Coordinate>
  133. </IndexedFaceSet>
  134. <Appearance><Material diffuseColor="red"></Material></Appearance>
  135. </Shape>
  136. </transform>
  137.  
  138. <transform translation="-1 -.25 0">
  139. <group DEF="rear_wheel">
  140. <transform translation="0 0 0.85">
  141. <shape>
  142. <appearance>
  143. <material diffusecolor="#181818">
  144. </material>
  145. </appearance>
  146. <torus outerRadius=".5" innerRadius=".3">
  147. </torus>
  148. </shape>
  149. </transform> <!-- Шина заднего колеса -->
  150.  
  151. <transform translation="0 0 .99" rotation="1 0 0 1.570796326794897">
  152. <shape>
  153. <appearance>
  154. <material diffusecolor="gray">
  155. </material>
  156. </appearance>
  157. <cylinder radius=".5" height=".3">
  158. </cylinder>
  159. </shape>
  160. </transform> <!-- Диск заднего колеса -->
  161.  
  162. <transform translation="0 0 .8" rotation="1 0 0 1.570796326794897">
  163. <shape>
  164. <appearance>
  165. <material diffusecolor="black">
  166. </material>
  167. </appearance>
  168. <cylinder radius=".3" height=".3">
  169. </cylinder>
  170. </shape>
  171. </transform> <!-- Ступица -->
  172.  
  173. <transform translation="0 -.05 -0.027">
  174. <group DEF="bolts">
  175. <transform translation="0 .35 1.145" rotation="1 0 0 1.570796326794897">
  176. <shape DEF="bolt">
  177. <appearance>
  178. <material diffusecolor="white">
  179. </material>
  180. </appearance>
  181. <cylinder radius=".07" height=".05">
  182. </cylinder>
  183. </shape>
  184. </transform> <!-- Болт 1 -->
  185.  
  186. <transform translation="-.315 .1225 1.145" rotation="1 0 0 1.570796326794897">
  187. <shape USE="bolt"></shape>
  188. </transform> <!-- Болт 2 -->
  189.  
  190. <transform translation=".315 .1225 1.145" rotation="1 0 0 1.570796326794897">
  191. <shape USE="bolt"></shape>
  192. </transform> <!-- Болт 3 -->
  193.  
  194. <transform translation="-.1575 -.245 1.145" rotation="1 0 0 1.570796326794897">
  195. <shape USE="bolt"></shape>
  196. </transform> <!-- Болт 4 -->
  197.  
  198. <transform translation=".1575 -.245 1.145" rotation="1 0 0 1.570796326794897">
  199. <shape USE="bolt"></shape>
  200. </transform> <!-- Болт 5 -->
  201. </group>
  202. </transform> <!-- Болты -->
  203. </group>
  204.  
  205. <transform rotation="1 0 0 3.1415926535">
  206. <group USE="rear_wheel"></group>
  207. </transform>
  208.  
  209. <transform rotation="1 0 0 1.570796326794897">
  210. <shape>
  211. <appearance>
  212. <material diffusecolor="black">
  213. </material>
  214. </appearance>
  215. <cylinder radius=".13" height="2.29">
  216. </cylinder>
  217. </shape>
  218. </transform> <!-- Задний мост -->
  219.  
  220. </transform> <!-- Задняя подвеска -->
  221.  
  222. <transform translation="2.28 -.1 0">
  223.  
  224. <transform translation="-1 -.25 0" rotation="1 0 0 1.570796326794897">
  225. <shape>
  226. <appearance>
  227. <material diffusecolor="black">
  228. </material>
  229. </appearance>
  230. <cylinder radius=".13" height="1.7">
  231. </cylinder>
  232. </shape>
  233. </transform> <!-- Передняя ось -->
  234.  
  235. <transform translation="-1 -.32 -.8" rotation="1 0 0 1.570796326794897">
  236. <shape DEF="reductor">
  237. <appearance>
  238. <material diffusecolor="black">
  239. </material>
  240. </appearance>
  241. <cylinder radius=".2" height=".3">
  242. </cylinder>
  243. </shape>
  244. </transform> <!-- Редуктор 1 -->
  245.  
  246. <transform translation="-1 -.32 .8" rotation="1 0 0 1.570796326794897">
  247. <shape USE="reductor"></shape>
  248. </transform> <!-- Редуктор 2 -->
  249.  
  250. </transform> <!-- Передний мост -->
  251.  
  252. <transform translation="1.28 -.41 0">
  253. <group DEF="front_wheel">
  254. <transform translation="0 0 .99" rotation="1 0 0 1.570796326794897">
  255. <shape>
  256. <appearance>
  257. <material diffusecolor="gray">
  258. </material>
  259. </appearance>
  260. <cylinder radius=".4" height=".25">
  261. </cylinder>
  262. </shape>
  263. </transform> <!-- Диск -->
  264.  
  265. <transform translation="0 0 .99" rotation="1 0 0 1.570796326794897">
  266. <shape>
  267. <appearance>
  268. <material diffusecolor="black">
  269. </material>
  270. </appearance>
  271. <cylinder radius=".13" height=".26">
  272. </cylinder>
  273. </shape>
  274. </transform> <!-- Центральный колпак -->
  275.  
  276. <transform translation="0 0 .94">
  277. <shape>
  278. <appearance>
  279. <material diffusecolor="#181818">
  280. </material>
  281. </appearance>
  282. <torus outerRadius=".33" innerRadius=".2">
  283. </torus>
  284. </shape>
  285. </transform> <!-- Шина переднего колеса -->
  286. </group>
  287.  
  288. <transform rotation="1 0 0 3.1415926535">
  289. <group USE="front_wheel"></group>
  290. </transform>
  291. </transform> <!-- Передняя подвеска -->
  292.  
  293. <transform translation="1.1 1.1 0" rotation="1 0 0 0">
  294. <shape>
  295. <appearance>
  296. <material diffusecolor="red">
  297. </material>
  298. </appearance>
  299. <cylinder radius=".1322" height="1">
  300. </cylinder>
  301. </shape>
  302. </transform> <!-- Тело трубы -->
  303.  
  304. <transform translation="1.1 1.7 0" rotation="1 0 0 0">
  305. <shape>
  306. <appearance>
  307. <material diffusecolor="red">
  308. </material>
  309. </appearance>
  310. <cylinder radius=".199" height="0.3">
  311. </cylinder>
  312. </shape>
  313. </transform> <!-- Наконечник трубы -->
  314.  
  315. <transform translation="-0.2 1 0" rotation="0 0 1 0.7853981633974485">
  316. <transform translation="0 0 0" rotation="1 0 0 1.570796326794897">
  317. <shape>
  318. <appearance>
  319. <material diffusecolor="#181818">
  320. </material>
  321. </appearance>
  322. <torus outerRadius=".337" innerRadius=".07">
  323. </torus>
  324. </shape>
  325. </transform> <!-- Руль -->
  326.  
  327. <transform translation="0 -0.5 0" rotation="1 0 0 0">
  328. <shape>
  329. <appearance>
  330. <material diffusecolor="black">
  331. </material>
  332. </appearance>
  333. <cylinder radius=".1" height="0.95">
  334. </cylinder>
  335. </shape>
  336. </transform> <!-- Рулевая колонка -->
  337.  
  338. <transform translation="0 0 0" rotation="1 0 0 0">
  339. <shape>
  340. <appearance>
  341. <material diffusecolor="black">
  342. </material>
  343. </appearance>
  344. <cylinder radius=".179" height="0.17">
  345. </cylinder>
  346. </shape>
  347. <transform translation="0 0 0" rotation="1 0 0 1.570796326794897">
  348. <shape>
  349. <appearance>
  350. <material diffusecolor="black">
  351. </material>
  352. </appearance>
  353. <cylinder radius=".05" height=".674">
  354. </cylinder>
  355. </shape>
  356. </transform> <!-- Перегородка руля -->
  357. </transform> <!-- Подушка безопасности -->
  358. </transform> <!-- Рулевой механизм -->
  359.  
  360. <transform translation="-1.4 .75 0" rotation="0 0 -1 -0.39269908169">
  361. <shape>
  362. <appearance>
  363. <material diffusecolor="#181818">
  364. </material>
  365. </appearance>
  366. <box size=".02 1.2 .97">
  367. </box>
  368. </shape>
  369. </transform> <!-- Спиbнка -->
  370.  
  371. <transform translation="-1.14 .5 0" rotation="0 0 -1 -1.570796326794897"> <!-- Сидалище -->
  372. <shape>
  373. <appearance>
  374. <material diffusecolor="#181818">
  375. </material>
  376. </appearance>
  377. <box size=".02 0.7 .97">
  378. </box>
  379. </shape>
  380. </transform> <!-- Сидалище -->
  381.  
  382. <transform rotation="0 1 0 1.570796326794897" translation="-.72 1.18 0" scale =".444 .444 .444">
  383. <transform rotation="1 0 0 1.570796326794897">
  384.  
  385. <transform translation="0 0 0">
  386. <shape>
  387. <appearance>
  388. <material diffusecolor="#FFC0CB"></material>
  389. </appearance>
  390. <cone height="0.68" bottomRadius=".73" topRadius=".2"></cone>
  391. </shape>
  392. </transform>
  393.  
  394. <transform translation="0 -.74 0">
  395. <shape>
  396. <appearance>
  397. <ImageTexture url="ZlAWXT7ii3Q.jpg"></ImageTexture>
  398. </appearance>
  399. <sphere radius="1"></sphere>
  400. </shape>
  401. </transform>
  402.  
  403. <transform translation="0 .377 0">
  404. <transform translation="0 .05 0" rotation="0 0 0 1.570796326794897">
  405. <shape>
  406. <appearance>
  407. <material diffusecolor="#FFC0CB">
  408. </material>
  409. </appearance>
  410. <cylinder radius=".1" height=".1">
  411. </cylinder>
  412. </shape>
  413. </transform>
  414.  
  415. <transform translation="0 0 0" rotation="1 0 0 1.570796326794897">
  416. <shape>
  417. <appearance>
  418. <material diffusecolor="#FFC0CB">
  419. </material>
  420. </appearance>
  421. <torus outerRadius=".1" innerRadius=".1">
  422. </torus>
  423. </shape>
  424. </transform>
  425.  
  426. <transform translation="-.05 .0666 0" rotation="1 0 0 1.570796326794897">
  427. <shape>
  428. <appearance>
  429. <material diffusecolor="#0000000"></material>
  430. </appearance>
  431. <sphere radius=".05"></sphere>
  432. </shape>
  433. </transform>
  434.  
  435. <transform translation=".05 .0666 0" rotation="1 0 0 1.570796326794897">
  436. <shape>
  437. <appearance>
  438. <material diffusecolor="#0000000"></material>
  439. </appearance>
  440. <sphere radius=".05"></sphere>
  441. </shape>
  442. </transform>
  443.  
  444. </transform>
  445.  
  446. <transform translation="-.8 -.7 0" rotation="1 0 0 -1.570796326794897" scale =".5 .5 .5">
  447. <transform rotation="0 0 1 .3">
  448. <shape DEF="uho">
  449. <appearance><material diffusecolor="#FFC0CB"></material></appearance>
  450. <IndexedTriangleSet Index = "0 1 9 9 1 8 8 1 2 2 8 7 7 2 3 3 4 5 5 3 7 7 5 6" solid = "false" colorpervertex = "true" normalpervertex = "true">
  451. <coordinate point = "0 0 0, -.5 .75 0, -.25 1.5 0, .25 2 0, .25 2.5 0, .75 2 0, 1.5 1.75 0, 1.75 1 0, 1.5 .25 0, 1.25 0 0"></coordinate>
  452. </IndexedTriangleSet>
  453. </shape>
  454. </transform>
  455. </transform>
  456.  
  457. <transform translation="-.8 -.6999 0" rotation="1 0 0 -1.570796326794897" scale =".5 .5 .5">
  458. <transform rotation="0 0 1 .3">
  459. <shape DEF="pereponka">
  460. <appearance><material diffusecolor="#aaaaaa"></material></appearance>
  461. <IndexedTriangleSet Index = "0 1 7 7 1 2 2 7 6 6 2 3 3 4 6 6 4 5" solid = "false" colorpervertex = "true" normalpervertex = "true">
  462. <coordinate point = "0.5 0 0, 0 .75 0, .25 1.5 0, .75 1.75 0, 1 1.75 0, 1.25 1 0, 1 .25 0, .75 0 0"></coordinate>
  463. </IndexedTriangleSet>
  464. </shape>
  465. </transform>
  466. </transform>
  467.  
  468. <transform rotation="0 0 0 -3.14">
  469. <transform rotation="0 1 0 -1.570796326794897">
  470. <transform>
  471. <transform translation="-.8 -.7 0" rotation="1 0 0 -1.570796326794897" scale =".5 .5 .5">
  472. <transform rotation="0 0 1 .3">
  473. <shape USE="uho"></shape>
  474. </transform>
  475. </transform>
  476.  
  477. <transform translation="-.8 -.69999 0" rotation="1 0 0 -1.570796326794897" scale =".5 .5 .5">
  478. <transform rotation="0 0 1 .3">
  479. <shape USE="pereponka"></shape>
  480. </transform>
  481. </transform>
  482. </transform>
  483. </transform>
  484. </transform>
  485.  
  486. <transform translation="-.4 0 -.5" rotation="1 0 0 1.570796326794897">
  487. <shape>
  488. <appearance>
  489. <material diffusecolor="#FFFFFF"></material>
  490. </appearance>
  491. <sphere radius=".222"></sphere>
  492. </shape>
  493. </transform>
  494.  
  495. <transform translation="-.4 .134 -.5" rotation="1 0 0 1.570796326794897">
  496. <shape>
  497. <appearance>
  498. <material diffusecolor="#0000000"></material>
  499. </appearance>
  500. <sphere radius=".1"></sphere>
  501. </shape>
  502. </transform>
  503.  
  504. <transform translation=".4 0 -.5" rotation="1 0 0 1.570796326794897">
  505. <shape>
  506. <appearance>
  507. <material diffusecolor="#FFFFFF"></material>
  508. </appearance>
  509. <sphere radius=".222"></sphere>
  510. </shape>
  511. </transform>
  512.  
  513. <transform translation=".4 .134 -.5" rotation="1 0 0 1.570796326794897">
  514. <shape>
  515. <appearance>
  516. <material diffusecolor="#0000000"></material>
  517. </appearance>
  518. <sphere radius=".1"></sphere>
  519. </shape>
  520. </transform>
  521. </transform>
  522. </transform>
  523. </transform>
  524. </transform>
  525.  
  526. <transform translation="0 0 0">
  527. <shape>
  528. <appearance>
  529. <ImageTexture url="earth.jpg"></ImageTexture>
  530. </appearance>
  531. <sphere radius="13.37"></sphere>
  532. </shape>
  533. </transform>
  534.  
  535. <background backUrl = "back.jpg" ></background>
  536. <DirectionalLight direction="0 14 0" intensity="0.3"></DirectionalLight>
  537. <OrientationChaser DEF="OrChaser" id="OrChaser" duration="3" initialDestination="0.26593 0.91370 -0.30730 1.15308"></OrientationChaser>
  538. <ROUTE fromNode="OrChaser" fromField="value_changed" toNode="popup" toField="set_rotation"></ROUTE>
  539. </scene>
  540. </x3d>
  541. </body>
  542. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement