猫史档案馆


怎么改成可以先暂停一秒在播放动画QwQ

用户:小屑鹿小屑鹿查看:1 回复:4 评论:1 创建时间:2023-01-19T16:59:58


async function ani(idname, ix, iy, iz, id){
    world.querySelectorAll('*').forEach(async(e)=>{
        if (e.id == (idname)){
            e.collides = true;
            e.fixed = true;
            let s_l = `${ix},${iy},${iz},${id}`;let [x, y, z, d] = s_l.split(',').map(e => Number(e))
            x /= d;y /= d;z /= d;d *= 9;
            e.animate([
                { velocity: [-x, -y, -z].map(e => e), easeIn: Box3Easing.LINEAR, easeOut: Box3Easing.LINEAR, },
                { velocity: [x, y, z].map(e => e), easeIn: Box3Easing.LINEAR, easeOut: Box3Easing.LINEAR, },
            ], {
                duration : d,
                iterations: Infinity,
                direction: Box3AnimationDirection.WRAP_REVERSE,
                iterationStart: 0,
            });
        };
    });
};


回复

上一页1 页 / 共 1下一页
小屑鹿小屑鹿

代码是鸭子写的可他回老家了()

点赞0


评论


yee剑走天下yee剑走天下

加一个await sleep(1000)不行吗(

点赞0


评论


小屑鹿小屑鹿

来图里也可以():

https://box3.codemao.cn/e/9c07ec07de8d4bb99c15

点赞0


评论


屑羽yee屑羽yee

你6)

center_image

点赞0


评论