1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-25 15:34:03 +02:00
This commit is contained in:
syuilo
2026-04-04 20:23:24 +09:00
parent ba4d495b42
commit c454b8922b
6 changed files with 22 additions and 10 deletions

View File

@@ -406,6 +406,7 @@ export class RoomEngine {
private envMapOutdoor: BABYLON.CubeTexture;
private reflectionProbe: BABYLON.ReflectionProbe;
private roomLight: BABYLON.SpotLight;
public lightContainer: BABYLON.ClusteredLightContainer;
private enableReflectionProbe = false;
private xGridPreviewPlane: BABYLON.Mesh;
private yGridPreviewPlane: BABYLON.Mesh;
@@ -439,10 +440,6 @@ export class RoomEngine {
//this.scene.autoClearDepthAndStencil = false;
this.scene.skipPointerMovePicking = true;
if (_DEV_) {
new BoundingBoxRenderer(this.scene);
}
const skybox = BABYLON.MeshBuilder.CreateBox('skybox', { size: 100000/*cm*/ }, this.scene);
const skyboxMat = new BABYLON.StandardMaterial('skyboxMat', this.scene);
skyboxMat.backFaceCulling = false;
@@ -547,6 +544,8 @@ export class RoomEngine {
this.shadowGeneratorForSunLight.usePoissonSampling = true;
this.shadowGeneratorForSunLight.getShadowMap().refreshRate = 60;
this.lightContainer = new BABYLON.ClusteredLightContainer('clustered', [], this.scene);
this.turnOnRoomLight();
if (USE_GLOW) {
@@ -707,7 +706,8 @@ export class RoomEngine {
public async init() {
await this.loadRoomModel();
await this.loadEnvModel();
await Promise.all(this.roomState.installedObjects.map(o => this.loadObject({
// beamLampがあるとなぜかclustered lightがエラーになる
await Promise.all(this.roomState.installedObjects.filter(o => o.type !== 'beamLamp').map(o => this.loadObject({
id: o.id,
type: o.type,
position: new BABYLON.Vector3(...o.position),