猫史档案馆


某个旋转代码

用户:小屑鹿小屑鹿查看:445 回复: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


评论

direction我也不知道什么意思,反正是和方向有关(-1与1决定旋转方向)


鸽王懒狗鸽王懒狗

留爪

点赞0


评论


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

路过~

点赞0


评论