projects size random, better light
This commit is contained in:
@@ -42,8 +42,8 @@ export default {
|
||||
// },
|
||||
block3d: null,
|
||||
block_opts: {
|
||||
side: THREE.DoubleSide,
|
||||
wireframe: false
|
||||
side: THREE.DoubleSide
|
||||
// wireframe: true,
|
||||
// transparent: true,
|
||||
// opacity: 0.6
|
||||
// renderOrder: 0
|
||||
@@ -76,26 +76,30 @@ export default {
|
||||
},
|
||||
created () {
|
||||
// console.log('this.index', this.index)
|
||||
// this.position = { x: 5, y: 5, z: 0 }
|
||||
this.size.y = 30 + Math.random() * 90
|
||||
this.position.y = -10 + Math.random() * this.size.y / 2
|
||||
// this.label_position.y = this.position.y + this.size.y / 2 - 5
|
||||
this.label_position.y = 5
|
||||
// randomize size and positions
|
||||
this.size.y = 100 + Math.random() * 90
|
||||
this.size.z = 10 + Math.random() * 30
|
||||
this.position.x = this.label_position.x = (-this.len + 1) / 2 * (this.size.x + 5) + (this.size.x + 5) * this.index
|
||||
this.label_position.z = this.size.z / 2 + 0.1
|
||||
this.position.y = -1 * this.size.y / 2 + 10 + Math.random() * 30// -10 + Math.random() * this.size.y / 2
|
||||
this.position.z = -10 + Math.random() * 10
|
||||
this.label_position.y = 5
|
||||
this.label_position.z = this.position.z + this.size.z / 2 + 0.1
|
||||
this.label_canvas = this.createLabelCanvas()
|
||||
// console.log('this.label_canvas', this.label_canvas)
|
||||
},
|
||||
mounted () {
|
||||
// console.log('project mounted', this)
|
||||
// mesh options
|
||||
this.block3d = this.$refs.block3d.curObj
|
||||
this.block3d.castShadow = true
|
||||
this.block3d.receiveShadow = true
|
||||
// record self references
|
||||
this.block3d.userData = {
|
||||
vnode: this
|
||||
}
|
||||
this.label3d = this.$refs.label3d.curObj
|
||||
},
|
||||
mounted () {
|
||||
// console.log('project mounted', this)
|
||||
|
||||
},
|
||||
methods: {
|
||||
createLabelCanvas () {
|
||||
// console.log('createLabelCanvas', this.data.Titre)
|
||||
|
||||
Reference in New Issue
Block a user