优化入场动画
This commit is contained in:
parent
c1d66f0e07
commit
0fb534ecca
@ -308,7 +308,7 @@ export default {
|
|||||||
// 自旋转
|
// 自旋转
|
||||||
gsap.to(this.group.rotation, {
|
gsap.to(this.group.rotation, {
|
||||||
y: -Math.PI * 2,
|
y: -Math.PI * 2,
|
||||||
duration: 2,
|
duration: 5,
|
||||||
// yoyo: true,
|
// yoyo: true,
|
||||||
// repeat: -1,
|
// repeat: -1,
|
||||||
onUpdate: () => {
|
onUpdate: () => {
|
||||||
@ -316,10 +316,37 @@ export default {
|
|||||||
// this.params.exposure,
|
// this.params.exposure,
|
||||||
// 4.0
|
// 4.0
|
||||||
// );
|
// );
|
||||||
this.render();
|
// this.render();
|
||||||
// console.log(this.params.scene);
|
// console.log(this.params.scene);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// 球体自动
|
||||||
|
this.group.children.map((item, index) => {
|
||||||
|
let op = item.position;
|
||||||
|
gsap.fromTo(
|
||||||
|
item.position,
|
||||||
|
{
|
||||||
|
x: () => {
|
||||||
|
return Math.random() * 40 - 20;
|
||||||
|
},
|
||||||
|
y: () => {
|
||||||
|
return Math.random() * 20 - 10;
|
||||||
|
},
|
||||||
|
z: () => {
|
||||||
|
return Math.random() * 40 - 20;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
x: op.x,
|
||||||
|
y: op.y,
|
||||||
|
z: op.z,
|
||||||
|
duration: 5,
|
||||||
|
onUpdate: () => {
|
||||||
|
if (index == 1) this.render();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
// 光闪烁
|
// 光闪烁
|
||||||
// gsap.to(this.params, {
|
// gsap.to(this.params, {
|
||||||
// exposure: 1.1,
|
// exposure: 1.1,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user