猫史档案馆


想不出来叫什么

想不出来叫什么

Lv.1

获赞:28收藏:2浏览:230作品收藏:0
回复帖子评论
上一页4 页 / 共 6下一页

【box3】自动矿洞生成 中回复

尹子yyds,话说之前好像也有个矿洞()())什

 

2022-01-23T08:34:19 点赞:0

一个不知道叫什么的东西的速建代码 中回复

()

 

2022-01-23T20:41:54 点赞:0

【up计划】首批优质地图出炉! 中回复

前排

 

2022-01-28T17:55:34 点赞:0

【屑冷光又来搞事情了?】双龙攻击特效 中回复

const Quat = new Box3Quaternion(0, 0, 0, 1);
world.onPress(({ entity, button, raycast: { direction }}) => {
    if (button === 'action0') {
        const ball = world.createEntity({
            mesh: 'mesh/火球.vb',
            position: entity.position,
            gravity: false,
            collides: false,
            fixed: true,
        })
        const dragon_1 = world.createEntity({
            mesh: 'mesh/黄金龙首.vb',
            gravity: false,
            collides: false,
            fixed: true,
            meshScale: [0.0625, 0.0625, 0.0625],
        })
        const dragon_2 = world.createEntity({
            mesh: 'mesh/黄金龙首.vb',
            gravity: false,
            collides: false,
            fixed: true,
            meshScale: [0.0625, 0.0625, 0.0625],
        })
        const up = Math.atan2(direction.y, Math.sqrt(direction.x ** 2 + direction.z ** 2));
        const angle = Math.atan2(direction.z, direction.x); 
        const startTick = world.currentTick;
        dragon_1.lastPosition = dragon_2.lastPosition = new Box3Vector3(0, 0, 0);
        const dragons = [dragon_1, dragon_2];
        const radius = 3
        for (const e of dragons) {
            Object.assign(
                e, {
                particleRate: 100,
                particleLifetime: 20,
                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 ticker = world.onTick(() => {
            if (world.currentTick - startTick > 200) {
                ball.destroy();
                dragon_1.destroy();
                dragon_2.destroy();
                ticker.cancel(); 
            }
            ball.velocity = dragon_1.velocity = dragon_2.velocity = direction.scale(3); 
            dragon_1.position = ball.position.add({
                x: Math.cos(angle + Math.PI * 0.5) * Math.cos(up + world.currentTick * 0.3) * radius,
                y: Math.sin(up + world.currentTick * 0.3) * radius, z: Math.sin(angle + Math.PI * 0.5) * Math.cos(up + world.currentTick * 0.3) * radius,
            })
            dragon_2.position = ball.position.add({
                x: Math.cos(angle + Math.PI * 0.5) * Math.cos(up + world.currentTick * 0.3 + Math.PI) * radius,
                y: Math.sin(up + world.currentTick * 0.3 + Math.PI) * radius,
                z: Math.sin(angle + Math.PI * 0.5) * Math.cos(up + world.currentTick * 0.3 + Math.PI) * radius,
            })
            for (const e of dragons) {
                const direction = e.position.sub(e.lastPosition);
                e.meshOrientation = Quat.rotateY(Math.PI * 0.5).rotateX(Math.atan2(direction.y, Math.sqrt(direction.x ** 2 + direction.z ** 2))).rotateY(Math.atan2(direction.z, direction.x));
                e.lastPosition.copy(e.position);
            }
        })
    }
})

2022-02-02T09:57:42 点赞:0

元宵节猜谜答案公布! 中回复

前排

 

2022-02-15T17:19:44 点赞:0

元宵节猜谜答案公布! 中回复

1.粽叶精灵

2.姜饼人3

3.冰企鲨1

4.全能怪兽

5.梦幻蝶

6.龙舟船身

7.恶霸土匪boss

8.山贼猴

 

2022-02-15T19:02:30 点赞:0

【神岛JS萌新教程】BoxJS 从入门到实战 第三期——神奇的运算符 中回复

()

2022-02-24T20:21:05 点赞:0

【屑浮生的教程】f12巧用!不用登录/会员也能复制代码/作文/文档! 中回复

e,打印他不香吗,直接复制………………

2022-03-03T18:31:00 点赞:3

【box3】将退,发放福利-公海核心代码全公开 中回复

w呜呜呜w

不舍

2022-03-25T19:15:43 点赞:0

【二创活动】The Fight For Remix 中回复

啊啊啊前排!!!

 

2022-05-10T19:05:27 点赞:0

开搞老坑()魂落——探秘深境 中回复

我来()()

 

2022-05-15T09:32:09 点赞:0

【地图招聘】马云编程猫招人一起做图了,有兴趣的快来看看吧!!! 中回复

我?爱探险的想得起呀 box3.codemao.cn/u/RyEJuJ6HYAttaDr

2022-05-26T19:25:35 点赞:0

【kittenV4.10.5版本更新】格式工厂来喽~ 中回复

啊啊啊喵喵,(s)()()()b3什么时候才能上传啊啊啊

 

2022-05-28T18:12:54 点赞:0

【代码岛3】对于代码岛3一行代码的优化建议 中回复

沙发

2022-06-04T18:02:42 点赞:0

【来几个建筑师(肝帝)()】只要效率,质量不高() 中回复

我来()()

 

2022-06-18T11:56:23 点赞:0

神奇代码岛的新域名,由你来决定! 中回复

前排

2022-06-27T10:33:03 点赞:0

【求助】啊啊啊怎么把建筑旋转180度 中回复

ddd

2022-07-11T21:09:58 点赞:0

和平小队在召唤!第一期队员招募计划开启 中回复

https://docs喵form/page/DS0RZRVNDR3FKUEZi 这是网页的链接

2022-07-13T20:37:31 点赞:0

哪位大佬会这个? 中回复

我会((

 

2022-07-13T21:16:15 点赞:0

XiaoLi真想的美 中回复

hh,我已经在改编了[斜眼笑]

 

2022-07-14T18:41:15 点赞:1

【元气骑士】合作招人(仅一个建筑师名额) 中回复

我来

2022-07-26T18:37:31 点赞:0

【招人】新坑 中回复

我?()

2022-08-15T19:43:51 点赞:0

【神奇代码岛】一个很好用的迷宫生成器! 中回复

草了屑学员()  

2022-08-19T13:02:52 点赞:1

【神岛拜年祭】2023神奇代码岛拜年祭公开招募 中回复

我()

 

2022-08-20T16:22:19 点赞:0

【box3】你觉得要留下boxplus吗@作者你也进来 中回复

除了数字以外的其他内容都会被忽视

 

2022-08-20T16:42:37 点赞:1

【box3】你觉得要留下boxplus吗@作者你也进来 中回复

1

 

2022-08-20T16:48:15 点赞:0

神奇代码岛代码师知识竞答() 中回复

1.C

2.D

3.C

4.B

5.C

6.C

7.D

8.D

随便答一答()

9.D

10.C

11.B

12.D

 

2022-08-21T17:03:03 点赞:0

【退猫】这次是真的告别了 中回复

呜呜师傅~~不舍()()

盲猜去玩喵了()

顺便github仓库链接发下呗()()

 

2022-08-21T17:23:27 点赞:1

广告位出租—— 中回复

咳,我想要行不,

 

2022-08-22T16:12:01 点赞:0

第一届“思华年杯”音乐创作节--简章 中回复

()()

 

2022-09-07T21:01:02 点赞:0