This commit is contained in:
ann 2023-03-20 17:33:53 +08:00
parent 043d869721
commit e9635f5cfb
2 changed files with 13 additions and 1 deletions

BIN
public/china_under.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 KiB

View File

@ -77,7 +77,9 @@ export default {
'1': 'statusIng',
'2': 'statusUn',
'3': 'statusEnd'
}
},
worldMapTexture: undefined,
chinaMapTexture: undefined
}
},
mounted() {
@ -151,6 +153,7 @@ export default {
const tweenL1 = new TWEEN.Tween(this.camera).to({ left: -s * this.k, right: s * this.k, top: s, bottom: -s }, 1000)
.easing(TWEEN.Easing.Sinusoidal.InOut).onUpdate(() => {
this.scene.getObjectByName('earth').material.color.copy(new Three.Color())
this.scene.getObjectByName('earth-cloud').visible = true
this.resetVisible()
})
tweenL1.start()
@ -201,6 +204,10 @@ export default {
// // this.scene.children[5].material.color.copy(new Three.Color(0x0a263e))
// })
const tweenL3 = new TWEEN.Tween(this.scene.getObjectByName('earth').material.color).to(new Three.Color(0x0a263e80), 1000).easing(TWEEN.Easing.Sinusoidal.InOut)
.onUpdate(() => {
this.scene.getObjectByName('earth-cloud').visible = false
this.scene.getObjectByName('earth').material.map = this.chinaMapTexture
})
// const tweenL4 = new TWEEN.Tween(this.scene.getObjectByName('chinaProvince').material.color).to(new Three.Color(0x0a263e80), 1000).easing(TWEEN.Easing.Sinusoidal.InOut)
this.scene.getObjectByName('chinaProvince').children.forEach(ele => {
ele.children[0].material.color = new Three.Color(0x0a315ab8)
@ -555,6 +562,8 @@ export default {
var geometry = new Three.SphereGeometry(100, 40, 40) //
//
var textureLoader = new Three.TextureLoader()
this.worldMapTexture = textureLoader.load(process.env.VUE_APP_PUBLIC_SOURCE_API + '/earth.jpg')
this.chinaMapTexture = textureLoader.load(process.env.VUE_APP_PUBLIC_SOURCE_API + '/china_under.jpg')
textureLoader.load(process.env.VUE_APP_PUBLIC_SOURCE_API + '/earth.jpg', (texture) => {
var material = new Three.MeshLambertMaterial({
// color: 0x0a263e,
@ -1064,6 +1073,9 @@ export default {
border: 0;
line-height: 3rem;
}
.el-button--default{
color: #efefef;
}
.active{ background-image: linear-gradient(rgba(#3EDFFC,.4),hsla(0,0%,100%,.1),hsla(0,0%,100%,0)); color: #fff;
}
}