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