serviceWorker in html
This commit is contained in:
parent
a0893fd881
commit
aa2475dc3a
4
app.js
4
app.js
@ -343,7 +343,3 @@ window.onbeforeunload = function (event) {
|
||||
localStorage["teTraHighScore"] = stats.highScore
|
||||
return !game.playing
|
||||
}
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('./jsm/service-worker.js');
|
||||
}
|
@ -35,5 +35,6 @@
|
||||
<audio id="music" src="audio/benevolence.m4a" loop></audio>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
|
||||
<script type="module" src="app.js"></script>
|
||||
<script>navigator?.serviceWorker.register('./jsm/service-worker.js')</script>
|
||||
</body>
|
||||
</html>
|
@ -54,8 +54,8 @@ export class TetraGUI extends GUI {
|
||||
scene.vortex.colorFullTextureRotation = 0.006
|
||||
scene.vortex.colorFullMoveForward = 0.025
|
||||
|
||||
//scene.ambientLight.intensity = 1
|
||||
scene.directionalLight.intensity = 1.8
|
||||
scene.ambientLight.intensity = 0.6
|
||||
scene.directionalLight.intensity = 5
|
||||
|
||||
Mino.mesh.material.opacity = 0.7
|
||||
Mino.mesh.material.roughness = 0.48
|
||||
@ -81,16 +81,16 @@ export class TetraGUI extends GUI {
|
||||
|
||||
scene.vortex.globalRotation = 0.028
|
||||
scene.vortex.darkTextureRotation = 0.006
|
||||
scene.vortex.darkMoveForward = 0.02
|
||||
scene.vortex.darkMoveForward = 0.03
|
||||
scene.vortex.colorFullTextureRotation = 0.006
|
||||
scene.vortex.colorFullMoveForward = 0.007
|
||||
scene.vortex.colorFullMoveForward = 0.012
|
||||
|
||||
scene.ambientLight.intensity = 20
|
||||
scene.directionalLight.intensity = 10
|
||||
|
||||
Mino.mesh.material.opacity = 0.6
|
||||
Mino.mesh.material.roughness = 0.08
|
||||
Mino.mesh.material.metalness = 0.98
|
||||
//Mino.mesh.material.opacity = 0.6
|
||||
//Mino.mesh.material.roughness = 0.08
|
||||
//Mino.mesh.material.metalness = 0.98
|
||||
}
|
||||
break
|
||||
}
|
||||
@ -138,7 +138,7 @@ export class TetraGUI extends GUI {
|
||||
cameraPosition.add(scene.camera, "fov", 0, 200).onChange(() => scene.camera.updateProjectionMatrix())
|
||||
|
||||
let light = dev.addFolder("lights intensity").close()
|
||||
//light.add(scene.ambientLight, "intensity").name("ambient").min(0).max(20)
|
||||
light.add(scene.ambientLight, "intensity").name("ambient").min(0).max(20)
|
||||
light.add(scene.directionalLight, "intensity").name("directional").min(0).max(20)
|
||||
|
||||
let directionalLightPosition = dev.addFolder("directionalLight.position").close()
|
||||
|
@ -12,10 +12,10 @@ export class TetraScene extends THREE.Scene {
|
||||
this.vortex = new Vortex(loadingManager)
|
||||
this.add(this.vortex)
|
||||
|
||||
/*this.ambientLight = new THREE.AmbientLight(0xffffff, 1)
|
||||
this.add(this.ambientLight)*/
|
||||
this.ambientLight = new THREE.AmbientLight(0xffffff, 1)
|
||||
this.add(this.ambientLight)
|
||||
|
||||
this.directionalLight = new THREE.DirectionalLight(0xffffff, 1.8)
|
||||
this.directionalLight = new THREE.DirectionalLight(0xffffff, 5)
|
||||
this.directionalLight.position.set(5, -20, 20)
|
||||
this.add(this.directionalLight)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user