-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (76 loc) · 2.18 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My first three.js app</title>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API = Tawk_API || {},
Tawk_LoadStart = new Date()
window.Tawk_API.visitor = {
name: 'Test name',
email: '[email protected]',
place: 'redZone',
};
(function () {
var s1 = document.createElement('script'),
s0 = document.getElementsByTagName('script')[0]
s1.async = true
s1.src = 'https://embed.tawk.to/6290bff2b0d10b6f3e745713/1g42mrk3d'
s1.charset = 'UTF-8'
s1.setAttribute('crossorigin', '*')
s0.parentNode.insertBefore(s1, s0)
})()
console.log(window.Tawk_API)
window.Tawk_API.onLoad = function () {
console.log('started')
window.Tawk_API.setAttributes(
{
name: 'Name',
email: '[email protected]',
hash: 'hash value',
place: 'redZone',
},
function (error) {
console.log('responce')
if (error) console.log('err' + error)
else console.log('works twak')
},
)
}
</script>
<!--End of Tawk.to Script-->
<script src="https://threejs.org/build/three.js"></script>
<script>
const scene = new THREE.Scene()
const camera = new THREE.PerspectiveCamera(
75,
window.innerWidth / window.innerHeight,
0.1,
1000,
)
const renderer = new THREE.WebGLRenderer()
renderer.setSize(window.innerWidth, window.innerHeight)
document.body.appendChild(renderer.domElement)
const geometry = new THREE.BoxGeometry()
const material = new THREE.MeshBasicMaterial({ color: 0xffff00 })
const cube = new THREE.Mesh(geometry, material)
scene.add(cube)
camera.position.z = 3
function animate() {
requestAnimationFrame(animate)
cube.rotation.x += 0.01
cube.rotation.y += 0.01
renderer.render(scene, camera)
}
animate()
</script>
</body>
</html>