mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 14:05:35 +02:00
wip
This commit is contained in:
@@ -392,6 +392,11 @@ export class RoomEngine extends EventEmitter {
|
||||
// 不具合のもと
|
||||
//this.scene.blockMaterialDirtyMechanism = true;
|
||||
|
||||
const box = BABYLON.MeshBuilder.CreateBox('', { size: cm(10) }, this.scene);
|
||||
window.setInterval(() => {
|
||||
box.position = new BABYLON.Vector3(0, Math.random() * cm(10), 0);
|
||||
}, 10);
|
||||
|
||||
this.startRenderLoop();
|
||||
|
||||
await this.scene.whenReadyAsync();
|
||||
@@ -1664,7 +1669,10 @@ export class RoomEngine extends EventEmitter {
|
||||
|
||||
const entity = this.objectEntities.get(objectId);
|
||||
if (entity == null) return;
|
||||
|
||||
this.sr.disableSnapshotRendering();
|
||||
entity.instance.onOptionsUpdated?.([key, value]);
|
||||
this.sr.enableSnapshotRendering();
|
||||
}
|
||||
|
||||
public updateEnvOptions(options: RoomState['env']['options']) {
|
||||
|
||||
@@ -131,13 +131,11 @@ export const laptopPc = defineObject({
|
||||
const applyBodyColor = () => {
|
||||
const [r, g, b] = options.bodyColor;
|
||||
bodyMaterial.albedoColor = new BABYLON.Color3(r, g, b);
|
||||
sr.reset();
|
||||
};
|
||||
|
||||
const applyBezelColor = () => {
|
||||
const [r, g, b] = options.bezelColor;
|
||||
bezelMaterial.albedoColor = new BABYLON.Color3(r, g, b);
|
||||
sr.reset();
|
||||
};
|
||||
|
||||
applyBodyColor();
|
||||
@@ -153,7 +151,6 @@ export const laptopPc = defineObject({
|
||||
light.intensity = (2 * options.screenBrightness) * WORLD_SCALE * WORLD_SCALE;
|
||||
}
|
||||
model.updated();
|
||||
sr.updateMesh(hutaNode.getChildMeshes());
|
||||
};
|
||||
|
||||
applyOpenAngle();
|
||||
|
||||
Reference in New Issue
Block a user