
Lv.1
签名:我正在做跑酷图形化编辑器 作品状态:已发布,测试版V1.3 作品是否可购买:是(True) 背景音乐:你好女生(伴奏) PS:作品里面有说明(没做完,空格+鼠标点击旋转)
在 【超级快递员】V7超大更新预告!! 中回复
V7体验区链接
https://box3.cod喵/e/d4ccdd6c52fbe111d779
记住我不会给权限的!!
2021-08-13T11:18:00 点赞:0
在 求让物体发光的代码 中回复
// 代码 // 这
// 不
Box3Entity.meshEmissive = 1 // 就
// 是
/* // 上
示例 // 次
*/ // 挑
// 战
// 所有实体发光 // 官
world.querySelectorAll('*').forEach((e) => e.meshEmissive = 1) // 方
// 的
// 含有标签“发光”的实体发光 // 那
world.querySelectorAll('.发光').forEach((e) => e.meshEmissive = 1) // 个
// 人
// 没了 // 吗2021-08-13T21:44:45 点赞:0
在 水贴-消灭404N0tF0und的一百种方法 中回复
71.叫官方封你
72.定位IP,发射核导弹到你家
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
----------在起床战争时----------
73.用TNT炸喵404
74.把404脚下的方块挖了
75.把404的队伍的床拆了,再干 喵404
2021-08-14T14:56:05 点赞:0
在 进来看看这些搞笑的学生写出来的作业!哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 中回复
console.log('你笑死我了哈哈哈嗝')
print('你笑死我了哈哈哈嗝')
#include<bits/stdc++.h>
using namespace std;
int main(){
cout << '你笑死我了哈哈哈嗝'
return 0;
}2021-08-15T16:43:47 点赞:0
在 又有代码上的问题啦!谁能回复一下 中回复
/*
修复者:元七七
代码存在的问题:
1.“selection == '是'”应该改成“selection.value == '是'”
2.“world.onInteract(...)”应该改成“npc.onInteract(...)”,否则所有实体的互动都会显示对话框
*/
console.clear()
world.onPlayerJoin(({entity}) =>{
entity.money = 0
entity.job = ''
entity.score = 0
})
const npc = world.querySelector('#NPC')
npc.enableInteract = true
npc.interactRadius = 3
npc.fixed = true
npc.onInteract(async({entity}) => {
const selection = await entity.player.dialog({
type:Box3DialogType.SELECT,
content:`你有${entity.score}学分,入职老师需60学分`,
title:npc.id,
options:['是', '否']
})
if (selection){
if (selection.value == '是'){
if (entity.score >= 60){
world.say(`${entity.name}入职老师`);
entity.job = '老师';
} else{
entity.player.directMessage('你没有足够学分!!')
}
};
}
})2021-08-17T21:56:54 点赞:1
在 有个代码上的问题,问一下哈 中回复
const npc = world.querySelector('#NPC');
if(npc){
npc.enableInteract = true; // 允许进行互动 <= 这行报错了
npc.interactRadius = 16; // 实体的互动范围
npc.interactHint = npc.id; // 互动提示框显示实体的名称
npc.interactColor = new Box3RGBColor(1,0,1); // 互动提示的文字颜色
}2021-08-17T22:03:47 点赞:0
在 【你有问题吗??】我来帮你回答 中回复
@ 萌新大佬
world.querySelectorAll('.模型标签').forEach((e) => {
e.enableInteract = true
e.onInteract(async({ entity }) => {
let result = await entity.player.dialog({
type: Box3DialogType.SELECT,
title: '',
content: ``,
options: ['']
})
if(!result || result === null) return
switch(result.value){}
})
})2021-08-19T14:17:40 点赞:0
在 【你有问题吗??】我来帮你回答 中回复
@ HYS王权超级威威 碰实体死.亡代码
world.onPlayerJoin(({entity})=>{
entity.enableDamage=true
entity.onEntityContact(()=>{
entity.hp=0
})
})2021-08-19T20:02:50 点赞:0
在 【你有问题吗??】我来帮你回答 中回复
@ 指令者 地形打包器
setTimeout(async() => {
console.clear();
console.log(`---------------元七七地形打包器--------------\n作者:元七七\n状态:运行中\n操作方法:\n提示:你可以直接把打包的地形数据输入到控制台`);
console.error('警告:不要把打包的地形数据输入到代码区!');
console.log(`--------元七七地形打包器-选择区域--------\n请用鼠标左键点击要打包区域的起点`);
world.querySelectorAll('player').forEach((e) => {
e.player.canFly = true;
e.player.enable3DCursor = true;
e.player.enableAction0 = true;
});
var button1 = await world.nextPress(({button}) => (button == Box3ButtonType.ACTION0));
while(button1.raycast.hitVoxel == 0){
console.warn('请重新点击');
world.querySelectorAll('player').forEach((e) => {
e.player.canFly = true;
e.player.enable3DCursor = true;
e.player.enableAction0 = true;
});
button1 = await world.nextPress(({button}) => (button == Box3ButtonType.ACTION0));
};
console.log('你点击了坐标为 x:' + button1.raycast.voxelIndex.x + ' y:' + button1.raycast.voxelIndex.y + ' z:' + button1.raycast.voxelIndex.z);
console.log(`请用鼠标点击要打包区域的终点`);
world.querySelectorAll('player').forEach((e) => {
e.player.canFly = true;
e.player.enable3DCursor = true;
e.player.enableAction0 = true;
});
var button2 = await world.nextPress(({button}) => (button == Box3ButtonType.ACTION0));
while(button2.raycast.hitVoxel == 0){
console.warn('请重新点击');
world.querySelectorAll('player').forEach((e) => {
e.player.canFly = true;
e.player.enable3DCursor = true;
e.player.enableAction0 = true;
});
button2 = await world.nextPress(({button}) => (button == Box3ButtonType.ACTION0));
};
console.log('你点击了坐标为 x:' + button1.raycast.voxelIndex.x + ' y:' + button1.raycast.voxelIndex.y + ' z:' + button1.raycast.voxelIndex.z);
console.log(`-----元七七地形打包器-读取地形数据-----`);
const loX = Math.min(button1.raycast.voxelIndex.x, button2.raycast.voxelIndex.x);
const loY = Math.min(button1.raycast.voxelIndex.y, button2.raycast.voxelIndex.y);
const loZ = Math.min(button1.raycast.voxelIndex.z, button2.raycast.voxelIndex.z);
const hiX = Math.max(button1.raycast.voxelIndex.x, button2.raycast.voxelIndex.x);
const hiY = Math.max(button1.raycast.voxelIndex.y, button2.raycast.voxelIndex.y);
const hiZ = Math.max(button1.raycast.voxelIndex.z, button2.raycast.voxelIndex.z);
console.log('即将打包在坐标 x:' + loX + ' y:' + loY + ' z:' + loZ + ' 和坐标 x:' + hiX + ' y:' + hiY + ' z:' + hiZ + ' 之间的所有地形数据');
await sleep(2500);
console.log('正在处理中,请稍后……');
var data = [];
for(let x = loX;x <= hiX;x++){
for(let y = loY;y <= hiY;y++){
for(let z = loZ;z <= hiZ;z++){
if(voxels.getVoxelId(x, y, z) != 0){
data.push(JSON.stringify({x: x - loX, y: y - loY, z: z - loZ, id: voxels.getVoxelId(x, y, z), ro: voxels.getVoxelRotation(x, y, z)}));
};
};
};
await sleep(25)
};
world.say(`
var sx = {x:-1, y:-1, z:-1};
/* 元七七地形打包器-构建代码 打包器所有者:元七七 说明:请勿放到代码区!!*/
setTimeout(async function(){
console.clear();
console.log(\`-----元七七地形打包器-打包地形文件-----\`);
console.log(\`打包器作者:元七七\`);
console.log(\`状态:运行中\`);
if(sx.x==-1){
if(sx.y==-1){
if(sx.z==-1){
console.log(\`-------元七七地形打包文件-选择坐标------\`);
console.log(\`请用鼠标左键点击要建造的坐标的最低端(建筑预览,必须在运行中操作!如确认建造,请更改sx变量为坐标(后面会显示的))\`);
world.querySelectorAll(\'player\').forEach(function(e){
e.player.canFly = true;
e.player.enable3DCursor = true;
e.player.enableAction0 = true;
});
var button1 = await world.nextPress/* 防屏蔽 */(function({button}){
return(button == Box3ButtonType.ACTION0)
});
while(button1.raycast.hitVoxel == 0){
console.warn(\'请重新点击\');
world.querySelectorAll(\'player\').forEach(function(e){
e.player.canFly = true;
e.player.enable3DCursor = true;
e.player.enableAction0 = true;
});
button1 = await world.nextPress/* 防屏蔽 */(function({button}){
return(button == Box3ButtonType.ACTION0);
});
};
console.log('你点击了坐标为 x:' + button1.raycast.voxelIndex.x + ' y:' + button1.raycast.voxelIndex.y + ' z:' + button1.raycast.voxelIndex.z);
sx = {x:button1.raycast.voxelIndex.x, y:button1.raycast.voxelIndex.y, z:button1.raycast.voxelIndex.z}
}
}
};
console.log(\`-------元七七地形打包文件-开始建造------\`);
console.log(\`建造中,请稍后……\`);
for(let i of [${data}]){
voxels.setVoxelId(i.x + sx.x, i.y + sx.y, i.z + sx.z, i.id, i.ro);
await sleep(0.1);
i++;
if(i % 1000 == 0){
console.log('建造进度:' + (Math.round((i / data.length) * 10000) / 100) + '%')
}
};
console.log(\`建造成功!\`);
}, 1);
`);
console.log(`-----元七七地形打包器-输出地形数据-----`);
console.log('见聊天区');
console.log('PS:\n如何复制输出内容:\n1.打开聊天区\n2.打开开发人员工具(一般都在浏览器菜单里)\n3.找到body的那个,点击左面的展开(一般已经展开了)\n4.找到div id=\"edit-react\"的那个,用一样的方法展开,然后再展开一次\n5.展开倒数第二个\n6.展开第二个\n7.展开第一个,然后再展开一次\n8.展开第二个\n9.展开第一个\n10.展开倒数第一个,右键然后Edit as HT' + 'ML,按下Ctrl+a后按下Ctrl+c复制')
}, 1);2021-08-20T09:24:04 点赞:0
在 【你有问题吗??】我来帮你回答 中回复
@ 指令者 发射激光代码(改良版,激光不会弹开)
/**
* @param {Box3Vector3} direction
*/
function pointTowards(direction) {
return new Box3Quaternion(0, 0, 0, 1)
.rotateX(Math.atan2(direction.y, Math.sqrt(direction.x ** 2 + direction.z ** 2)))
.rotateY(Math.atan2(direction.z, direction.x))
}
/**
* @param {Box3Entity} entity
* @param {number} speed
* @param {Box3Vector3} startPosition
* @param {Box3Vector3} endPosition
*/
function laserMovement(entity, speed, startPosition, endPosition) {
entity.fixed = false
var Direction = endPosition.sub(startPosition);
var dist = Direction.mag()
entity.velocity.x = Direction.x * speed / dist
entity.velocity.y = Direction.y * speed / dist
entity.velocity.z = Direction.z * speed / dist
entity.meshOrientation = pointTowards(entity.velocity)
}
/**
* @param {Box3Vector3} startPosition 起点位置
* @param {Box3Vector3} endPosition 终点位置
* @param {number} speed 速度
* @param {Box3Vector3} direction 方向
* @param {string} entityMesh 模型外观文件
* @param {boolean} entityCollides 模型是否有碰撞
* @param {string[]} entityTags 模型的标签(方便识别)
* @param {string} entityId 模型的名字(用于防止激光弹开)
*/
function emittingLaser(startPosition, endPosition, speed, direction, entityMesh, entityCollides, entityTags, entityId = undefined) {
let entity = world.createEntity({
id: entityId,
position: startPosition,
mesh: entityMesh,
collides: entityCollides,
tags: entityTags,
fixed: false,
gravity: false,
meshOrientation: pointTowards(direction)
});
(async () => {
while (entity.position.distance(endPosition) > 0.5 && !entity.destroyed) {
laserMovement(entity, speed, entity.position, entity.position.add(direction.scale(5)))
await sleep(100)
}
entity.destroy()
})()
return entity
}
world.onPlayerJoin(({ entity }) => {
entity.id = entity.player.userKey
world.addCollisionFilter(`#${entity.player.userKey}`, `#${entity.player.userKey}`)
})
world.onPlayerLeave(({ entity }) => {
world.removeCollisionFilter(`#${entity.player.userKey}`, `#${entity.player.userKey}`)
})
world.onPress(({ entity, button, raycast }) => {
if (button === Box3ButtonType.ACTION0) {
/* 生成激光 */
let laser = emittingLaser(entity.position, raycast.hitPosition, 2.5, raycast.direction, 'mesh/激光.vb', true, ['激光'], entity.player.userKey)
/* 激光碰方块就消失 */
laser.onVoxelContact(() => {
laser.destroy()
})
/*
* 以下为激光PVP的程序
*/
laser.onEntityContact(({ other }) => {
if(other.isPlayer){
other.hurt(5, {
attacker: entity,
damageType: '激光伤害'
})
}
})
}
})
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true
})
/* 杀死就重生 */
world.onDie(({ entity, attacker, damageType }) => {
if(entity.isPlayer && attacker && attacker.isPlayer){
world.say(`${entity.player.name} 被 ${attacker.player.name} 杀死了`)
entity.player.forceRespawn()
}
})2021-08-20T09:25:51 点赞:0
在 【BOX3】搭路蛋初级版教程 中回复
/* 这应该是疾速中的搭路模式好吗 */
world.onPress(({ entity, voxel, button, raycast: { voxelIndex, normal } }) => {
if (button === 'action0' && voxels.getVoxel(voxelIndex.x, voxelIndex.y, voxelIndex.z) == 177) {
voxels.setVoxel(voxelIndex.x, voxelIndex.y, voxelIndex.z, 0)
} else if (button === 'action1') {
let fangzhiweizhi = voxelIndex.a喵(normal)
for (i = 0; i < 20; i++) {
voxels.setVoxel(fangzhiweizhi.x, fangzhiweizhi.y, fangzhiweizhi.z, "white")
fangzhiweizhi = fangzhiweizhi.a喵(normal)
}
}
})2021-08-25T12:58:02 点赞:0
在 【BOX3】标准的彩虹粒子特效 中回复
应该是这个()()……
另外在单独的函数里打原版代码,在前面加上“"use strict";”(不含中文双引号,含英文双引号)会报错(不是“other”的错)

function rgb(r, g, b) {
return new Box3RGBColor(r / 255, g / 255, b / 255)
}
let red = rgb(255, 0, 0),
yellow = rgb(255, 255, 0),
green = rgb(0, 255, 0),
blue = rgb(0, 0, 255),
purple = rgb(128, 0, 128)
Object.assign(entity, {
particleRate: 500,
particleLifetime: 0.5,
particleSize: [3, 3, 3, 3, 3],
particleColor: [red,yellow,green,blue,purple],
})2021-09-11T20:04:24 点赞:1
在 终终终于研究出定时重启服务器的八法了 中回复
还有
for(;;){}
while(1){}
let f = async() => f()
——————————帖子检测报告——————————
一氧化二氢含量:50%
氢氧酸含量49.99%
2021-10-02T21:51:16 点赞:0
在 神奇代码岛铲喵官来也! 中回复
——————————开始检测帖子——————————
检测中……
——————————帖子检测报告——————————
一氧化二氢含量:50%
氢氧酸含量49.99%
![]()
![]()
![]()
![]()
![]()
2021-10-02T21:53:28 点赞:0
在 这个活动,你登录代码岛即可参加,试试~有编程猫 中回复
——————————开始检测帖子——————————
检测中……
——————————帖子检测报告——————————
一氧化二氢含量:50%
氢氧酸含量49.99%
![]()
![]()
![]()
![]()
![]()
2021-10-02T21:53:58 点赞:0