Compare commits
2 Commits
f1230335b9
...
fadefa649b
Author | SHA1 | Date | |
---|---|---|---|
fadefa649b | |||
208f47c7ca |
52
app.js
52
app.js
@ -337,7 +337,7 @@ const minoCamera = new THREE.CubeCamera(1, 1000, minoRenderTarget)
|
||||
minoCamera.position.set(5, 10)
|
||||
Tetromino.prototype.lockedMaterial = new THREE.MeshBasicMaterial({
|
||||
color: 0xffffff,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.85,
|
||||
envMap: minoRenderTarget.texture
|
||||
})
|
||||
|
||||
@ -356,18 +356,18 @@ I.prototype.srs = [
|
||||
]
|
||||
I.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xafeff9,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
I.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
color: 0xafeff9,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class J extends Tetromino {}
|
||||
@ -379,18 +379,18 @@ J.prototype.minoesPosition = [
|
||||
]
|
||||
J.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xb8b4ff,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
J.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
side: THREE.DoubleSide,
|
||||
color: 0xb8b4ff,
|
||||
envMap: minoRenderTarget.texture,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class L extends Tetromino {}
|
||||
@ -402,18 +402,18 @@ L.prototype.minoesPosition = [
|
||||
]
|
||||
L.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xfdd0b7,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
L.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
side: THREE.DoubleSide,
|
||||
color: 0xfdd0b7,
|
||||
envMap: minoRenderTarget.texture,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class O extends Tetromino {}
|
||||
@ -425,18 +425,18 @@ O.prototype.srs = [
|
||||
]
|
||||
O.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xffedac,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
O.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
side: THREE.DoubleSide,
|
||||
color: 0xffedac,
|
||||
envMap: minoRenderTarget.texture,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class S extends Tetromino {}
|
||||
@ -448,18 +448,18 @@ S.prototype.minoesPosition = [
|
||||
]
|
||||
S.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xC8FBA8,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
S.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
side: THREE.DoubleSide,
|
||||
color: 0xC8FBA8,
|
||||
envMap: minoRenderTarget.texture,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class T extends Tetromino {
|
||||
@ -489,18 +489,18 @@ T.prototype.tSlots = [
|
||||
]
|
||||
T.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xedb2ff,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
T.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
side: THREE.DoubleSide,
|
||||
color: 0xedb2ff,
|
||||
envMap: minoRenderTarget.texture,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class Z extends Tetromino {}
|
||||
@ -512,18 +512,18 @@ Z.prototype.minoesPosition = [
|
||||
]
|
||||
Z.prototype.material = new THREE.MeshBasicMaterial({
|
||||
color: 0xffb8c5,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.95,
|
||||
envMap: minoRenderTarget.texture,
|
||||
side: THREE.DoubleSide,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
opacity: 0.6
|
||||
})
|
||||
Z.prototype.ghostMaterial = new THREE.MeshBasicMaterial({
|
||||
side: THREE.DoubleSide,
|
||||
color: 0xffb8c5,
|
||||
envMap: minoRenderTarget.texture,
|
||||
transparent: true,
|
||||
opacity: 0.3
|
||||
opacity: 0.4
|
||||
})
|
||||
|
||||
class Ghost extends Tetromino {
|
||||
@ -818,7 +818,7 @@ const renderer = new THREE.WebGLRenderer({
|
||||
depth: false
|
||||
})
|
||||
renderer.setSize(window.innerWidth, window.innerHeight)
|
||||
renderer.setClearColor(0x000000, 0)
|
||||
renderer.setClearColor(0x000000, 10)
|
||||
document.body.appendChild(renderer.domElement)
|
||||
|
||||
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 400)
|
||||
@ -845,11 +845,11 @@ const GLOBAL_ROTATION = 0.0025
|
||||
|
||||
const darkTextureRotation = 0.0006
|
||||
const darkMoveForward = -0.0007
|
||||
const darkOpacity = 0.3
|
||||
const darkOpacity = 0.15
|
||||
|
||||
const colorFullTextureRotation = 0.0006
|
||||
const colorFullMoveForward = -0.0012
|
||||
const colorFullOpacity = 0.3
|
||||
const colorFullOpacity = 0.15
|
||||
|
||||
const commonCylinderGeometry = new THREE.CylinderGeometry(25, 25, 500, 12, 1, true)
|
||||
|
||||
@ -896,7 +896,7 @@ const edgeMaterial = new THREE.MeshBasicMaterial({
|
||||
color: 0x88abe0,
|
||||
transparent: true,
|
||||
opacity: 0.5,
|
||||
reflectivity: 0.9,
|
||||
reflectivity: 0.85,
|
||||
envMap: minoRenderTarget.texture
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user