mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-24 19:44:05 +02:00
wip
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/frontend/assets/room/rooms/default/300.glb
Normal file
BIN
packages/frontend/assets/room/rooms/default/300.glb
Normal file
Binary file not shown.
Binary file not shown.
BIN
packages/frontend/assets/world/lobby/dummy-ads/angry_ai.png
Normal file
BIN
packages/frontend/assets/world/lobby/dummy-ads/angry_ai.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -474,7 +474,7 @@ export class WorldEngine extends EventEmitter<WorldEngineEvents> {
|
|||||||
adMesh.parent = adRoot;
|
adMesh.parent = adRoot;
|
||||||
adMesh.position = new BABYLON.Vector3(cm(0), cm(0), cm(7500));
|
adMesh.position = new BABYLON.Vector3(cm(0), cm(0), cm(7500));
|
||||||
|
|
||||||
const tex = new BABYLON.Texture(`/client-assets/world/lobby/dummy-ads/${1 + Math.floor(Math.random() * 4)}.png`, this.scene);
|
const tex = new BABYLON.Texture('/client-assets/world/lobby/dummy-ads/angry_ai.png', this.scene);
|
||||||
const adMat = new BABYLON.StandardMaterial(`ad_${j}_${i}_mat`, this.scene);
|
const adMat = new BABYLON.StandardMaterial(`ad_${j}_${i}_mat`, this.scene);
|
||||||
adMat.emissiveTexture = tex;
|
adMat.emissiveTexture = tex;
|
||||||
adMat.disableLighting = true;
|
adMat.disableLighting = true;
|
||||||
|
|||||||
@@ -183,7 +183,6 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private time: 0 | 1 | 2 = 0; // 0: 昼, 1: 夕, 2: 夜
|
private time: 0 | 1 | 2 = 0; // 0: 昼, 1: 夕, 2: 夜
|
||||||
private roomCollisionMeshes: BABYLON.AbstractMesh[] = [];
|
|
||||||
public roomState: RoomState;
|
public roomState: RoomState;
|
||||||
|
|
||||||
private _gridSnapping = { enabled: true, scale: cm(4) };
|
private _gridSnapping = { enabled: true, scale: cm(4) };
|
||||||
@@ -280,6 +279,12 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
|||||||
this.envMapOutdoor = BABYLON.CubeTexture.CreateFromPrefilteredData(this.time === 2 ? '/client-assets/room/outdoor-night.env' : '/client-assets/room/outdoor-day.env', this.scene);
|
this.envMapOutdoor = BABYLON.CubeTexture.CreateFromPrefilteredData(this.time === 2 ? '/client-assets/room/outdoor-night.env' : '/client-assets/room/outdoor-day.env', this.scene);
|
||||||
this.envMapOutdoor.level = this.time === 0 ? 0.5 : this.time === 1 ? 0.3 : 0.1;
|
this.envMapOutdoor.level = this.time === 0 ? 0.5 : this.time === 1 ? 0.3 : 0.1;
|
||||||
|
|
||||||
|
const roomCollisionCube = BABYLON.MeshBuilder.CreateBox('roomCollisionCube', { size: cm(300) }, this.scene);
|
||||||
|
roomCollisionCube.position.y = cm(150);
|
||||||
|
roomCollisionCube.scaling.x = -1; // flip normals
|
||||||
|
roomCollisionCube.isVisible = false;
|
||||||
|
roomCollisionCube.checkCollisions = true;
|
||||||
|
|
||||||
this.scene.collisionsEnabled = true;
|
this.scene.collisionsEnabled = true;
|
||||||
|
|
||||||
this.camera = new BABYLON.UniversalCamera('camera', new BABYLON.Vector3(0, cm(130), cm(0)), this.scene);
|
this.camera = new BABYLON.UniversalCamera('camera', new BABYLON.Vector3(0, cm(130), cm(0)), this.scene);
|
||||||
@@ -800,12 +805,11 @@ export class RoomEngine extends EventEmitter<RoomEngineEvents> {
|
|||||||
|
|
||||||
for (const mesh of meshes) {
|
for (const mesh of meshes) {
|
||||||
for (const m of mesh.getChildMeshes()) {
|
for (const m of mesh.getChildMeshes()) {
|
||||||
if (m.name.includes('__ROOM_WALL__') || m.name.includes('__ROOM_SIDE__') || m.name.includes('__ROOM_FLOOR__') || m.name.includes('__ROOM_CEILING__') || m.name.includes('__ROOM_TOP__')) {
|
if (m.name.includes('__ROOM_WALL__') || m.name.includes('__ROOM_SIDE__') || m.name.includes('__ROOM_FLOOR__') || m.name.includes('__ROOM_CEILING__') || m.name.includes('__ROOM_TOP__') || m.name.includes('__ROOM_BOTTOM__')) {
|
||||||
m.isPickable = false;
|
m.isPickable = false;
|
||||||
m.receiveShadows = false;
|
m.receiveShadows = false;
|
||||||
m.isVisible = false;
|
m.isVisible = false;
|
||||||
m.checkCollisions = true;
|
m.checkCollisions = false;
|
||||||
this.roomCollisionMeshes.push(m);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user