猫史档案馆


某个旋转代码

用户:小屑鹿小屑鹿查看:2 回复:4 评论:2 创建时间:2022-10-15T18:26:10


这传送门还不错:

center_image


回复

上一页1 页 / 共 1下一页
KeluoKeluo

代码交出来

点赞1


评论


小屑鹿小屑鹿

async function rotateX(mesh,speed,direction){
    const entity=world.querySelector(mesh)
    while(1){
        entity.meshOrientation=entity.meshOrientation.rotateX(Math.PI/100*direction)
        await sleep(speed)
    }
}
async function rotateY(mesh,speed,direction){
    const entity=world.querySelector(mesh)
    while(1){
        entity.meshOrientation=entity.meshOrientation.rotateY(Math.PI/100*direction)
        await sleep(speed)
    }
}
async function rotateZ(mesh,speed,direction){
    const entity=world.querySelector(mesh)
    while(1){
        entity.meshOrientation=entity.meshOrientation.rotateZ(Math.PI/100*direction)
        await sleep(speed)
    }
}

点赞0


评论


鸽王懒狗鸽王懒狗

留爪

点赞0


评论


Mecat⁧~喵呜⁧Mecat⁧~喵呜⁧

路过~

点赞0


评论