mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-25 12:04:04 +02:00
wip
This commit is contained in:
@@ -1402,9 +1402,14 @@ export class RoomObjectPreviewEngine {
|
|||||||
gridMaterial.opacity = 0.5;
|
gridMaterial.opacity = 0.5;
|
||||||
gridMaterial.gridRatio = 10/*cm*/;
|
gridMaterial.gridRatio = 10/*cm*/;
|
||||||
|
|
||||||
this.zGridPreviewPlane = BABYLON.MeshBuilder.CreatePlane('zGridPreviewPlane', { width: 1000/*cm*/, height: 1000/*cm*/ }, this.scene);
|
//this.zGridPreviewPlane = BABYLON.MeshBuilder.CreatePlane('zGridPreviewPlane', { width: 1000/*cm*/, height: 1000/*cm*/ }, this.scene);
|
||||||
this.zGridPreviewPlane.material = gridMaterial;
|
//this.zGridPreviewPlane.material = gridMaterial;
|
||||||
this.zGridPreviewPlane.rotation = new BABYLON.Vector3(Math.PI / 2, 0, 0);
|
//this.zGridPreviewPlane.rotation = new BABYLON.Vector3(Math.PI / 2, 0, 0);
|
||||||
|
|
||||||
|
//this.scene.fogMode = BABYLON.Scene.FOGMODE_LINEAR;
|
||||||
|
//this.scene.fogStart = 100/*cm*/;
|
||||||
|
//this.scene.fogEnd = 110/*cm*/;
|
||||||
|
//this.scene.fogColor = new BABYLON.Color3(0.0, 0.0, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
public async init() {
|
||||||
|
|||||||
@@ -16,11 +16,16 @@ export const cupNoodle = defineObject({
|
|||||||
},
|
},
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
createInstance: ({ scene, root }) => {
|
createInstance: ({ scene, root }) => {
|
||||||
|
let yugeDispose: (() => void) | null = null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
onInited: () => {
|
onInited: () => {
|
||||||
yuge(scene, root, new BABYLON.Vector3(0, 10/*cm*/, 0));
|
yugeDispose = yuge(scene, root, new BABYLON.Vector3(0, 10/*cm*/, 0));
|
||||||
},
|
},
|
||||||
interactions: {},
|
interactions: {},
|
||||||
|
dispose: () => {
|
||||||
|
yugeDispose?.();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,11 +16,16 @@ export const mug = defineObject({
|
|||||||
},
|
},
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
createInstance: ({ scene, root }) => {
|
createInstance: ({ scene, root }) => {
|
||||||
|
let yugeDispose: (() => void) | null = null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
onInited: () => {
|
onInited: () => {
|
||||||
yuge(scene, root, new BABYLON.Vector3(0, 5/*cm*/, 0));
|
yugeDispose = yuge(scene, root, new BABYLON.Vector3(0, 5/*cm*/, 0));
|
||||||
},
|
},
|
||||||
interactions: {},
|
interactions: {},
|
||||||
|
dispose: () => {
|
||||||
|
yugeDispose?.();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ export function yuge(scene: BABYLON.Scene, mesh: BABYLON.Mesh, offset: BABYLON.V
|
|||||||
ps.colorDead = new BABYLON.Color4(1, 1, 1, 0);
|
ps.colorDead = new BABYLON.Color4(1, 1, 1, 0);
|
||||||
ps.preWarmCycles = Math.random() * 1000;
|
ps.preWarmCycles = Math.random() * 1000;
|
||||||
ps.start();
|
ps.start();
|
||||||
|
|
||||||
|
// dispose
|
||||||
|
return () => {
|
||||||
|
ps.stop();
|
||||||
|
emitter.dispose();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const _assumedFramesPerSecond = 60;
|
const _assumedFramesPerSecond = 60;
|
||||||
|
|||||||
Reference in New Issue
Block a user