mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 00:35:52 +02:00
wip
This commit is contained in:
@@ -88,12 +88,12 @@ export const ductRailSpotLights = defineObject({
|
||||
|
||||
const applyLightBrightness = () => {
|
||||
for (const light of lights) {
|
||||
light.intensity = 2 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE;
|
||||
light.intensity = 3 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE;
|
||||
light.range = cm(300) * getLightRangeFactorByGraphicsQuality(graphicsQuality);
|
||||
}
|
||||
for (const lamp of lamps) {
|
||||
const emissive = lamp.material as BABYLON.PBRMaterial;
|
||||
emissive.emissiveIntensity = options.lightBrightness * 20;
|
||||
emissive.emissiveIntensity = options.lightBrightness * 100;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -40,11 +40,16 @@ export const hangingDuctRail = defineObject({
|
||||
hasCollisions: false,
|
||||
createInstance: async ({ options, model }) => {
|
||||
const bodyMaterial = model.findMaterial('__X_BODY__');
|
||||
const bodyMesh = model.findMesh('__X_BODY__');
|
||||
|
||||
const applySize = () => {
|
||||
bodyMesh.morphTargetManager!.getTargetByName('W')!.influence = options.width;
|
||||
bodyMesh.morphTargetManager!.getTargetByName('H')!.influence = options.height;
|
||||
for (const mesh of model.root.getChildMeshes()) {
|
||||
if (mesh.morphTargetManager != null && mesh.morphTargetManager.getTargetByName('W') != null) {
|
||||
mesh.morphTargetManager.getTargetByName('W').influence = options.width;
|
||||
}
|
||||
if (mesh.morphTargetManager != null && mesh.morphTargetManager.getTargetByName('H') != null) {
|
||||
mesh.morphTargetManager.getTargetByName('H').influence = options.height;
|
||||
}
|
||||
}
|
||||
model.updated();
|
||||
};
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ export const spotLight = defineObject({
|
||||
applyLightColor();
|
||||
|
||||
const applyLightBrightness = () => {
|
||||
light.intensity = 2 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE;
|
||||
light.intensity = 3 * options.lightBrightness * WORLD_SCALE * WORLD_SCALE;
|
||||
light.range = cm(300) * getLightRangeFactorByGraphicsQuality(graphicsQuality);
|
||||
const emissive = lamp.material as BABYLON.PBRMaterial;
|
||||
emissive.emissiveIntensity = options.lightBrightness * 20;
|
||||
emissive.emissiveIntensity = options.lightBrightness * 100;
|
||||
};
|
||||
|
||||
applyLightBrightness();
|
||||
|
||||
@@ -22,7 +22,7 @@ export function getLightRangeFactorByGraphicsQuality(quality: number) {
|
||||
}
|
||||
}
|
||||
|
||||
export const SYSTEM_MESH_NAMES = ['__TOP__', '__SIDE__', '__PICK__', '__COLLISION__'];
|
||||
export const SYSTEM_MESH_NAMES = ['__TOP__', '__SIDE__', '__BOTTOM__', '__PICK__', '__COLLISION__'];
|
||||
export const SYSTEM_HEYA_MESH_NAMES = ['__ROOM_WALL__', '__ROOM_SIDE__', '__ROOM_FLOOR__', '__ROOM_CEILING__', '__ROOM_TOP__', '__ROOM_BOTTOM__', '__COLLISION__'];
|
||||
|
||||
export function yuge(scene: BABYLON.Scene, mesh: BABYLON.Mesh, offset: BABYLON.Vector3) {
|
||||
|
||||
Reference in New Issue
Block a user