This commit is contained in:
ann 2023-03-03 23:27:02 +08:00
parent fe9baeb6e4
commit f6f5db632b
4 changed files with 500 additions and 24198 deletions

2
.gitignore vendored
View File

@ -4,6 +4,8 @@ node_modules
*.zip *.zip
*.rar *.rar
package-lock.json
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local

24646
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -149,7 +149,7 @@ export default {
}, },
created() { created() {
this.getTend() this.getTend()
this.getAccrueCenter() // this.getAccrueCenter()
this.getTrainJob() this.getTrainJob()
}, },
mounted() { mounted() {
@ -215,16 +215,16 @@ export default {
}) })
}, },
getTaskTotal() { getTaskTotal() {
getAccrueCenter().then((res) => { // getAccrueCenter().then((res) => {
if (res.perCenterComputerPowers) { // if (res.perCenterComputerPowers) {
const data = res.accOtJobInfo // const data = res.accOtJobInfo
this.accrueData = { // this.accrueData = {
config1: data.accCardRunSec, // config1: data.accCardRunSec,
config2: data.accOtJobNum, // config2: data.accOtJobNum,
config3: data.accRunSec // config3: data.accRunSec
} // }
} // }
}) // })
}, },
getAccrueCenter() { getAccrueCenter() {
getAccrueCenter().then((res) => { getAccrueCenter().then((res) => {

View File

@ -25,7 +25,8 @@ export default {
mouse: undefined, mouse: undefined,
aniId: '', aniId: '',
saaniId: '', saaniId: '',
groupDots: [] groupDots: [],
dynamicMaterial: undefined
} }
}, },
mounted() { mounted() {
@ -191,17 +192,24 @@ export default {
texture.wrapS = Three.RepeatWrapping texture.wrapS = Three.RepeatWrapping
texture.wrapT = Three.RepeatWrapping texture.wrapT = Three.RepeatWrapping
const material = new MeshLineMaterial({ this.dynamicMaterial = new MeshLineMaterial({
map: texture, // map: texture, //
useMap: true, // 使 useMap: 0, // 使
lineWidth: 2, // 线 color: color,
sizeAttenuation: false, // lineWidth: 0.5, // 线
transparent: true // sizeAttenuation: 1, //
transparent: true, //
dashOffset: 0,
dashArray: 0.5,
dashRatio: 0.1,
repeat: new Three.Vector2(2, 1)
}) })
this.flyLineAnimate()
// const { width, height } = getCanvasSize() // const { width, height } = getCanvasSize()
// material.uniforms.resolution.value.set(width, height) // material.uniforms.resolution.value.set(width, height)
const mesh = new Three.Mesh(meshLine.geometry, material) const mesh = new Three.Mesh(meshLine.geometry, this.dynamicMaterial)
// const tween = new TWEEN.Tween(material.uniforms.offset.value) // 线 // const tween = new TWEEN.Tween(material.uniforms.offset.value) // 线
// .to({ x: material.uniforms.offset.value.x - 1 }, duration) // .to({ x: material.uniforms.offset.value.x - 1 }, duration)
@ -211,6 +219,12 @@ export default {
return mesh return mesh
}, },
flyLineAnimate() {
requestAnimationFrame(this.flyLineAnimate)
if (this.dynamicMaterial) {
this.dynamicMaterial.uniforms.dashOffset.value -= 0.005
}
},
zoomAnimate() { zoomAnimate() {
this.render() this.render()
// this.controls.update() // this.controls.update()