-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodelrendering.html
More file actions
70 lines (56 loc) · 2.87 KB
/
modelrendering.html
File metadata and controls
70 lines (56 loc) · 2.87 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
<!--
EYE FREE MODEL 3D BY Oscar creativo by OSCAR CREATIVO is licensed under Creative Commons Attribution.
Juvenile Teratophoneus curriei byrankinstudio is licensed under Creative Commons Attribution.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="./renderingstyle.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap">
<link rel="icon" type="image/x-icon" href="/icons/BotW_Linkda.png">
<title>CyberRendering</title>
</head>
<body>
<main>
<div class="top">
<div class="sitelogo">
<img src="./icons/BotW_Linkda.png">
<h1><a href="./index.html">CyberHub</a></h1>
</div>
</div>
<div id="container3D"></div>
<button class="minus" id="-" style="display: none; background: none; cursor: pointer; border: none; position: fixed; transform-origin: center; top:50%; width:3%; height:auto;"><img src="https://www.nicepng.com/png/full/47-473745_arrow-simple-left-arrow-simple-left-arrow-simple.png" style="width: 100%; filter:invert(1.0);"></button>
<button class="plus" id="+" style="background: none; z-index:25; cursor: pointer; border: none; position: fixed; transform-origin: center; right:0;top:50%; width:3%; height:auto;"><img src="https://www.nicepng.com/png/full/47-473745_arrow-simple-left-arrow-simple-left-arrow-simple.png" style="width: 100%; filter:invert(1.0); transform: scaleX(-1);"></button>
<button class="wireframe" id="Wireframe">Wireframe</button>
</main>
<script type="module" src="./modelrendering.js"></script>
<script type="module">
// Import the function from the module
import { changeModel } from './modelrendering.js';
import { changeWireframe } from './modelrendering.js';
// Get a reference to the button
const myButton = document.getElementById('+');
// Add a click event listener
myButton.addEventListener('click', function() {
// Call the function when the button is clicked
console.log("done");
changeModel(1); // Example: pass some parameter to the function
});
const myButton2 = document.getElementById('-');
// Add a click event listener
myButton2.addEventListener('click', function() {
// Call the function when the button is clicked
console.log("done");
changeModel(-1); // Example: pass some parameter to the function
});
const wireFrameButton = document.getElementById('Wireframe');
// Add a click event listener
wireFrameButton.addEventListener('click', function() {
// Call the function when the button is clicked
console.log("done");
changeWireframe(); // Example: pass some parameter to the function
});
</script>
</body>
</html>