more colors

This commit is contained in:
2020-10-07 16:33:05 +02:00
parent 16b804be2b
commit 168a5e64ea
+20 -6
View File
@@ -264,12 +264,15 @@ export default {
// create a classical material for building
// let topColor = `hsla(201, 100%, 95%, 1)`
let hTop = Math.round(195 + Math.random() * 10)
let sTop = Math.round(100)
let lTop = Math.round(95)
let hFloor = Math.round(205 + Math.random() * 10)
let sFloor = Math.round(40 + Math.random() * 20)
let lFloor = Math.round(5 + Math.random() * 15)
let hTop = Math.round(190 + Math.random() * 20)
let sTop = Math.round(20 + Math.random() * 60)
let lTop = Math.round(75)
// let hFloor = Math.round(205 + Math.random() * 10)
let hFloor = hTop
// let sFloor = Math.round(30 + Math.random() * 40)
let sFloor = sTop
// let lFloor = Math.round(10 + Math.random() * 20)
let lFloor = Math.round(10)
let topColor = `hsla(${hTop}, ${sTop}%, ${lTop}%, 1)`
commit('setTopColor', topColor)
let floorColor = `hsla(${hFloor}, ${sFloor}%, ${lFloor}%, 1)`
@@ -332,6 +335,17 @@ export default {
commit('setLevels3dObj', levelsMesh)
let levelsPos = { ...state.position }
commit('setLevelsPos', levelsPos)
// // repère
// let repGeom = new THREE.BoxGeometry(1, 1, 1)
// let repMesh = new THREE.Mesh(repGeom)
// let repOpts = {
// color: 0x0000ff,
// shininess: 30
// }
// repMesh.material = new THREE.MeshPhongMaterial(repOpts)
// repMesh.position = { ...state.position, ...{ y: 0 } }
// commit('setRep3dObj', levelsMesh)
},
loadContents ({ dispatch, commit, state }) {
console.log('loadContents')