猫史档案馆


超能枫叶

超能枫叶

Lv.1

我回来啦!(本人是原超能枫叶的小号,因为大号账号丢失,所以注册了个小号)

获赞:46收藏:5浏览:991作品收藏:2
回复帖子评论
上一页1 页 / 共 2下一页

【岛3搞事情】本周玩什么?极限创作大挑战! 中回复

我都不会3.0,2.0还差不多。

emotion_编程猫_搓头

等等,我怎么进不去?

center_image

2021-03-25T14:07:20 点赞:0

《儿童画报·KITTEN》有奖征稿啦!!! 中回复

emotion_雷电猴_摇椅子

2021-05-09T11:41:54 点赞:0

《儿童画报·KITTEN》有奖征稿啦!!! 中回复

不知道投什么好,我的代表作一大堆,可是要么是kittn4,要么就是box2的。

emotion_编程猫_伤心

2021-05-09T11:44:55 点赞:0

【活动总结】荣耀百年·薪火相传——社区“100s说党史”作品征集活动回顾 中回复

热烈庆祝祖国成立100周年!

emotion_编程猫_嗨起来

2021-07-02T17:50:51 点赞:0

噫!好!我中了! 中回复

emotion_编程猫_加油

2021-07-19T15:42:03 点赞:0

一起和作! 中回复

报名的的话,记得发一下个人主页的网址,否则报名无效!!

emotion_星能猫_欢迎

2021-07-20T20:00:54 点赞:0

一起和作! 中回复

恭喜@皮卡_战丘加入了合作!!

emotion_编程猫_厉害了

2021-07-21T13:29:04 点赞:0

找创作节合作 中回复

你来https://box3.fun/e/bd4077552aff041711bc吧,但不是创作节的,希望你也能来!!!

2021-10-31T18:11:57 点赞:0

我的box3新作开源啦!! 中回复

                             imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%86%B7%E6%BC%A0.gif"alt="emotion_编程猫_冷漠" 哎,现在的编程猫网站好像有毛病啊,里面有4处被喵的地方 他们分别改成:喵,喵,喵,喵

2021-11-14T13:37:24 点赞:0

我的box3新作开源啦!! 中回复

改改,这是即将发布的版本

//弹出一个欢迎对话框
world.onPlayerJoin(async ({ entity }) => {
    // 玩家进入游戏时,弹出一个欢迎对话框
    if(TEST_PLAYER.includes(entity.player.name)) return;
    const dialog = entity.player.dialog({
        type: Box3DialogType.TEXT,
        title: "系统",
        content: `你好,${entity.player.name},很高兴认识你。`,
    });

    // 等待任何一个 [玩家点击或关闭对话框, 3秒后自动把对话框关闭]
    Promise.race([
        dialog,
        (async () => {
            await sleep(3000);  
            dialog.cancel();
        })()
    ]).then( /* 任何一个函数返回 */ ); 
})

const TEST_PLAYER = ['吉吉喵','超能枫叶重置版','冲锋者',"迷你世界742813666","sans招生部晴天霹雳"]
//这里是作者特权的代码!!!
world.onPlayerJoin(({ entity }) => {
    if (!TEST_PLAYER.includes(entity.player.name)) return; // 如果玩家名称不在列表里,则跳过后续脚本。
    world.say(`${entity.player.name}(地图创作者)出现了!`)
    entity.player.walkSpeed = 0.3;
    entity.player.walkAcceleration = 0.3
    entity.player.runSpeed = 20;
    entity.player.runAcceleration = 0.4;
    entity.player.scale *= 1.5;
    entity.player.emissive = 4;
    entity.player.doubleJumpPower = 1.25
    entity.player.canFly = true
    

    world.onTick((tick) => { 
        PlayerUpdate(entity)
    });
});



// 蓝色粒子
const particle_blueCrystal = {
    particleRate: 1000,
    particleLifetime: 2,
    particleSize: [8, 6, 4, 2, 0.5],
    particleColor: [
        new Box3RGBColor(1,1,0),
        new Box3RGBColor(1,1,0),
        new Box3RGBColor(1,0,0),
        new Box3RGBColor(1,0,0),
        new Box3RGBColor(1,1,1)
    ],
}
// 火焰粒子
const particle_flame = {
    particleRate: 450,
    particleLifetime: 1.75,
    particleSize: [2, 0.65, 0.23],
    particleColor: [
        new Box3RGBColor(0,0,1),
        new Box3RGBColor(0,1,1),
        new Box3RGBColor(1,1,1)
    ],
}
//发射粒子
function PlayerUpdate(entity) {
    // 判断行走状态
    switch (entity.player.walkState) {
        // 正在奔跑
        case Box喵layerWalkState.RUN:
            Object.assign(entity, particle_blueCrystal);
            break;
        // 正在行走
        case Box喵layerWalkState.WALK:
            Object.assign(entity, particle_flame);
            break;
        // 在其他行走状态不显示粒子
        default:
            Object.assign(entity, {
                particleRate: 0 
        });
    };
};
//作者快捷指令
world.onChat(({ entity, message }) => {
     if (entity && entity.isPlayer) {
         if (message[0] === '/') {
             if (TEST_PLAYER.includes(entity.player.name)) {
                world.say('<~' + message.slice(1, message.length - 8));
                try{
                    eval(message.slice(1, message.length));
                } catch (error) {
                    entity.player.directMessage('Error:' + error + '     ' +entity.player.name + '请注意');
                };
            }else{
                entity.player.directMessage('<~你不是管喵!');
            };
        }else{
            if(message[0] === "*"){
                voxel = message.slice(1, message.length)
                entity.player.directMessage(message.slice(1, message.length))
            }
        }
    }
});

//放置方块
world.onPress(({ raycast, button }) => {
    if (button === Box3ButtonType.ACTION0) {
        const pos = raycast.voxelIndex.add(raycast.normal)
        voxels.setVoxel(pos.x, pos.y, pos.z, voxel)
    }
})
world.onPress(({ raycast, button }) => {
    if (button === Box3ButtonType.ACTION1) {
        const pos = raycast.voxelIndex
        voxels.setVoxel(pos.x, pos.y, pos.z, '')
    }
})

//打开光标
world.onPlayerJoin(({ entity }) => {
    entity.player.enable3DCursor = true
    voxel = 'stone' 
})

//报仇
const 喵 = ["黄金劳斯莱斯"]

world.onPlayerJoin(({ entity }) => {
    if(喵.includes(entity.player.name)){
        while(true){
            entity.player.directMessage(`${name}你个喵!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!`)
        }
    }
    entity.player.directMessage("登录一下更好哦")
})

world.onPlayerJoin(async({ entity }) => {
    while(true){
        entity.player.directMessage("【公告】现在有切换方块的功能了!在聊天框输入*(英文)+方块(也是英文)即可切换!!!")
        await sleep(600000)
    }
})


//迷你世界742813666编写
world.onPlayerJoin(({ entity }) => {
    entity.player.message1 = "";
    entity.player.interactTimes = 0;
    entity.enableInteract = true;
    entity.interactRadius = 10;
    entity.interactHint = "与 " + entity.player.name + " 私聊";
    entity.onInteract(async ({ entity, targetEntity }) => {
        if(!targetEntity.player.name === "超能枫叶重置版"){
            const result = await entity.player.dialog({
                type: Box3DialogType.SELECT,
                title: targetEntity.player.name,
                content: `和   ${targetEntity.player.name}  互动`,
                options: ['和TA私聊', '退出互动'],   // 将提供玩家选择的选项放入数组里。
            })
            // 如果玩家点击了屏幕其他区域,取消了对话框。
            if (!result || result === null) {
                entity.player.directMessage('已为你取消互动!');
                return;
            }
            if (result.index == 0) {
                const dialog = await entity.player.dialog({
                    type: Box3DialogType.INPUT,
                    title: "向 " + targetEntity.player.name + " 发送私聊信息",
                    content: `${entity.player.name},请输入私聊内容`,
                    confirmText: '发送', // 确定按钮上面的文字。按下确定按钮后,提交回答。
                    placeholder: '请输入私聊内容', // 输入框背景上的提示文字。
                });
                targetEntity.player.message1 = dialog;
                targetEntity.player.directMessage('收到 ' + entity.player.name + ' 向你发送的私聊信息,正在为你打开查看……')
                await sleep(2000);
                targetEntity.player.directMessage('正在查收 ' + entity.player.name + " 发送的私聊信息")
                entity.player.directMessage('对方已收到聊天信息')
                if (dialog) {
                    const dialog = targetEntity.player.dialog({
                        type: Box3DialogType.TEXT,
                        title: entity.player.name,    // 对话框标题。通常对应是讲话人的名字。
                        content: targetEntity.player.message1, // 对话框内容。也就是对话正在讲什么。
                    });
                }
            }
        }
    })
})

console.clear()

function particleSpread(entity, colorList, scale = 1) {
    entity.particleRate = 550//粒子生成速率
    entity.particleLifetime = 2//粒子存活时间为2秒
    entity.particleColor = colorList//粒子的颜色列表
    entity.particleSize = [15 * scale, 10 * scale, 5 * scale, 2 * scale, scale]//粒子在5个阶段的大小
    entity.particleSizeSpread = 2 * scale//粒子的大小的随机变化幅度
    entity.particleVelocitySpread = [20 * scale, 20 * scale, 20 * scale]//粒子XYZ方向速度的随机变化幅度
    entity.particleAcceleration = [0, -10 * scale, 0]//粒子往下飘落模拟重力效果
}

const YELLOW = new Box3RGBColor(10, 10, 2)//黄
const CYAN = new Box3RGBColor(2, 10, 10)//青
const MAGENTA = new Box3RGBColor(10, 2, 10)//品红
const RED = new Box3RGBColor(10, 2, 2)//红
const GREEN = new Box3RGBColor(2, 10, 2)//绿
const BLUE = new Box3RGBColor(2, 2, 10)//蓝

//各个颜色5个粒子阶段的颜色列表
const ColorList = [
    [YELLOW, YELLOW, YELLOW, YELLOW, YELLOW],
    [CYAN, CYAN, CYAN, CYAN, CYAN],
    [MAGENTA, MAGENTA, MAGENTA, MAGENTA, MAGENTA],
    [RED, RED, RED, RED, RED],
    [GREEN, GREEN, GREEN, GREEN, GREEN],
    [BLUE, BLUE, BLUE, BLUE, BLUE],
]


function randomColor() {
    return ColorList[Math.floor(ColorList.length * Math.random())] //随机选取一个颜色列表
}

const MeshScale = [1 / 16, 1 / 16, 1 / 16] //默认的模型缩放系数
async function particleShoot(entity) {
    const fireball = world.createEntity({
        bounds: [0, 0, 0], // 隐形实体默认大小是1x1x1的方块, 现在把它从方块缩成大小为0x0x0的1个点
        collides: false, // 开启碰撞
        gravity: false, // 不受重力影响
        position: entity.position,
    })

    const color = randomColor()//随机颜色
    particleSpread(fireball, color, 0.3) //粒子大小系数缩到0.3, 形成小火球

    await sleep(100) // 等待0.1秒后升空
    
    fireball.velocity.set(0, 1, 0) // 火球速度为每秒向上1格
    world.sound('audio/gunshot.mp3')
    await sleep(2000) //升空2秒后爆炸

    fireball.velocity.set(0, 0, 0) // 火球停止运动
    world.sound('audio/explode.mp3')
    particleSpread(fireball, color, 1) // 系数增大到1, 让火球变大

    await sleep(1500) //大火球等待1.5秒后消失
    fireball.destroy()
}

const firework = world.querySelector('#新年烟花-1')
firework.enableInteract = true
firework.interactRadius = 3
firework.onInteract(async () => {
    var n = 3 //每次
    while (n-- > 0) {
        particleShoot(firework)//在"新年烟花-1"实体的位置发射烟花
        await sleep(2000)//每隔2秒射1发
    }
})

2021-11-21T17:06:51 点赞:0

故事接龙(水) 中回复

然后得了一种病,全死了

2021-11-21T17:09:37 点赞:0

【神奇代码岛】?????? 中回复

什么鬼

2021-11-21T17:10:53 点赞:0

【每日一个建图小技巧】如何实现“东边日出西边雨”? 中回复

呃呃,教教坐船的效果,最近就想弄这个,可是不会

2021-11-27T15:02:02 点赞:0

关于神奇代码岛接入防沉迷系统的公告 中回复

我9:00起不来,21:00我睡觉;不过对我没影响。我是周六日下午上线的。

2021-11-27T15:05:09 点赞:3

[喵] 萌新也能做PVP地图了? 中回复

能不能复制的时候格式化一点??

2021-12-10T17:18:46 点赞:0

这串代码哪里错了 中回复

我只能说,确实有问题,为什么会突然出现个if(voxel===voxels.id('glasses'))呢?

2021-12-10T17:24:22 点赞:0

这串代码哪里错了 中回复

你那个voxel定义了,但是指的是什么呢?

2021-12-10T17:25:13 点赞:0

https://box3.codemao.cn/e/850c4371c5ae6cf39309 中回复

我来了

2021-12-10T17:43:07 点赞:0

【box3】终极地形生成器! 中回复

喵!!!!!!!!!!!贼六66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666

2021-12-11T13:00:36 点赞:0

【box3】终极地形生成器! 中回复

牛!!!!!!!!

center_image

2021-12-11T13:05:13 点赞:0

看看伟大的艺术 中回复

切,看看我的!!

 

 

center_image

2021-12-11T13:16:42 点赞:0

看看伟大的艺术 中回复

还有这个!!center_image

2021-12-11T13:21:13 点赞:0

赛车游戏(很好玩) 中回复

赛车https://box3.fun/p/55d54c65694404043b7a

2021-12-12T16:37:11 点赞:0

赛车游戏(很好玩) 中回复

world.onPlayerJoin(({ entity }) =>{
    world.say("这是啥玩意?")
})

2021-12-12T16:41:35 点赞:0

【一起跑酷】我跑了200秒!有图有真相! 中回复

哪是200秒,是210.72秒,你眼瞎的吗?

2021-12-12T16:47:29 点赞:0

【代码岛】话说代码岛2.0什么时候推出啊 中回复

现在都有3.0了,还想着2.0

2021-12-12T16:48:58 点赞:0

【惊喜附加A期】[官方赞系]如何在APP工匠中使用超链接?网页框无法打开http网站有什么替代方法? 中回复

我也会

2021-12-14T19:12:46 点赞:0

【box3】测测你的代码等级 中回复

我12

2022-01-06T19:55:51 点赞:0

有人要提米建图吗 中回复

??

2022-01-11T13:59:47 点赞:0

【box3】求助!SQL报错! 中回复

链接发一下,我看看

2022-01-11T14:03:49 点赞:0