mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-26 05:34:27 +02:00
wip
This commit is contained in:
@@ -86,6 +86,11 @@ onMounted(() => {
|
|||||||
type: 'steel-rack',
|
type: 'steel-rack',
|
||||||
position: [130, 0, 115],
|
position: [130, 0, 115],
|
||||||
rotation: [0, 0, 0],
|
rotation: [0, 0, 0],
|
||||||
|
}, {
|
||||||
|
id: 'k',
|
||||||
|
type: 'cup-noodle',
|
||||||
|
position: [-100, 70, 40],
|
||||||
|
rotation: [0, -2, 0],
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,32 @@ type ObjectDef = {
|
|||||||
onInit?: (room: RoomEngine, obj: BABYLON.ISceneLoaderAsyncResult) => void;
|
onInit?: (room: RoomEngine, obj: BABYLON.ISceneLoaderAsyncResult) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function yuge(room: RoomEngine, obj: BABYLON.ISceneLoaderAsyncResult, offset: BABYLON.Vector3) {
|
||||||
|
const emitter = new BABYLON.TransformNode('emitter', room.scene);
|
||||||
|
emitter.parent = obj.meshes[0];
|
||||||
|
emitter.position = offset;
|
||||||
|
const ps = new BABYLON.ParticleSystem('steamParticleSystem', 8, room.scene);
|
||||||
|
ps.particleTexture = new BABYLON.Texture('/client-assets/room/steam.png');
|
||||||
|
ps.emitter = emitter;
|
||||||
|
ps.minEmitBox = new BABYLON.Vector3(-1/*cm*/, 0, -1/*cm*/);
|
||||||
|
ps.maxEmitBox = new BABYLON.Vector3(1/*cm*/, 0, 1/*cm*/);
|
||||||
|
ps.minEmitPower = 10;
|
||||||
|
ps.maxEmitPower = 12;
|
||||||
|
ps.minLifeTime = 1;
|
||||||
|
ps.maxLifeTime = 3;
|
||||||
|
ps.minSize = 10/*cm*/;
|
||||||
|
ps.maxSize = 15/*cm*/;
|
||||||
|
ps.direction1 = new BABYLON.Vector3(-0.3, 1, 0.3);
|
||||||
|
ps.direction2 = new BABYLON.Vector3(0.3, 1, -0.3);
|
||||||
|
ps.emitRate = 0.5;
|
||||||
|
ps.blendMode = BABYLON.ParticleSystem.BLENDMODE_ADD;
|
||||||
|
ps.color1 = new BABYLON.Color4(1, 1, 1, 0.3);
|
||||||
|
ps.color2 = new BABYLON.Color4(1, 1, 1, 0.2);
|
||||||
|
ps.colorDead = new BABYLON.Color4(1, 1, 1, 0);
|
||||||
|
ps.preWarmCycles = 350;
|
||||||
|
ps.start();
|
||||||
|
}
|
||||||
|
|
||||||
const OBJECTS = {
|
const OBJECTS = {
|
||||||
plant: {
|
plant: {
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
@@ -30,29 +56,13 @@ const OBJECTS = {
|
|||||||
mug: {
|
mug: {
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
onInit: (room, obj) => {
|
onInit: (room, obj) => {
|
||||||
const emitter = new BABYLON.TransformNode('emitter', room.scene);
|
yuge(room, obj, new BABYLON.Vector3(0, 5/*cm*/, 0));
|
||||||
emitter.parent = obj.meshes[0];
|
},
|
||||||
emitter.position = new BABYLON.Vector3(0, 5/*cm*/, 0);
|
},
|
||||||
const ps = new BABYLON.ParticleSystem('steamParticleSystem', 8, room.scene);
|
'cup-noodle': {
|
||||||
ps.particleTexture = new BABYLON.Texture('/client-assets/room/steam.png');
|
placement: 'top',
|
||||||
ps.emitter = emitter;
|
onInit: (room, obj) => {
|
||||||
ps.minEmitBox = new BABYLON.Vector3(-1/*cm*/, 0, -1/*cm*/);
|
yuge(room, obj, new BABYLON.Vector3(0, 10/*cm*/, 0));
|
||||||
ps.maxEmitBox = new BABYLON.Vector3(1/*cm*/, 0, 1/*cm*/);
|
|
||||||
ps.minEmitPower = 10;
|
|
||||||
ps.maxEmitPower = 12;
|
|
||||||
ps.minLifeTime = 1;
|
|
||||||
ps.maxLifeTime = 3;
|
|
||||||
ps.minSize = 10/*cm*/;
|
|
||||||
ps.maxSize = 15/*cm*/;
|
|
||||||
ps.direction1 = new BABYLON.Vector3(-0.3, 1, 0.3);
|
|
||||||
ps.direction2 = new BABYLON.Vector3(0.3, 1, -0.3);
|
|
||||||
ps.emitRate = 0.5;
|
|
||||||
ps.blendMode = BABYLON.ParticleSystem.BLENDMODE_ADD;
|
|
||||||
ps.color1 = new BABYLON.Color4(1, 1, 1, 0.3);
|
|
||||||
ps.color2 = new BABYLON.Color4(1, 1, 1, 0.2);
|
|
||||||
ps.colorDead = new BABYLON.Color4(1, 1, 1, 0);
|
|
||||||
ps.preWarmCycles = 350;
|
|
||||||
ps.start();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
stickyNote: {
|
stickyNote: {
|
||||||
|
|||||||
Reference in New Issue
Block a user