mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 18:45:35 +02:00
wip
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -41,7 +41,7 @@ export const allInOnePc = defineObject({
|
||||
default: {
|
||||
bodyColor: [1, 1, 1],
|
||||
bezelColor: [0, 0, 0],
|
||||
screenBrightness: 0.35,
|
||||
screenBrightness: 0.5,
|
||||
customPicture: null,
|
||||
fit: 'cover',
|
||||
},
|
||||
@@ -88,7 +88,7 @@ export const allInOnePc = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
light.intensity = (5 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||
};
|
||||
|
||||
@@ -98,6 +98,7 @@ export const allInOnePc = defineObject({
|
||||
if (options.customPicture != null) {
|
||||
screenMaterial.unfreeze();
|
||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.emissiveTexture = tex;
|
||||
applyFit();
|
||||
applyScreenBrightness();
|
||||
|
||||
@@ -30,7 +30,7 @@ export const djPlayer = defineObject({
|
||||
},
|
||||
},
|
||||
default: {
|
||||
screenBrightness: 0.35,
|
||||
screenBrightness: 0.5,
|
||||
customPicture: null,
|
||||
fit: 'cover',
|
||||
},
|
||||
@@ -62,7 +62,7 @@ export const djPlayer = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
};
|
||||
|
||||
applyScreenBrightness();
|
||||
@@ -71,6 +71,7 @@ export const djPlayer = defineObject({
|
||||
if (options.customPicture != null && options.customPicture !== '') {
|
||||
screenMaterial.unfreeze();
|
||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.emissiveTexture = tex;
|
||||
applyFit();
|
||||
applyScreenBrightness();
|
||||
@@ -83,6 +84,7 @@ export const djPlayer = defineObject({
|
||||
});
|
||||
tex.level = 0.5;
|
||||
} else {
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.emissiveTexture = defaultScreenTexture;
|
||||
applyFit();
|
||||
resolve();
|
||||
|
||||
@@ -36,7 +36,7 @@ export const handheldGameConsole = defineObject({
|
||||
},
|
||||
default: {
|
||||
bodyColor: [1, 1, 1],
|
||||
screenBrightness: 0.35,
|
||||
screenBrightness: 0.5,
|
||||
customPicture: null,
|
||||
fit: 'cover',
|
||||
},
|
||||
@@ -71,7 +71,7 @@ export const handheldGameConsole = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
};
|
||||
|
||||
applyScreenBrightness();
|
||||
@@ -80,6 +80,7 @@ export const handheldGameConsole = defineObject({
|
||||
if (options.customPicture != null) {
|
||||
screenMaterial.unfreeze();
|
||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.emissiveTexture = tex;
|
||||
applyFit();
|
||||
applyScreenBrightness();
|
||||
|
||||
@@ -48,7 +48,7 @@ export const laptopPc = defineObject({
|
||||
default: {
|
||||
bodyColor: [1, 1, 1],
|
||||
bezelColor: [0, 0, 0],
|
||||
screenBrightness: 0.35,
|
||||
screenBrightness: 0.5,
|
||||
customPicture: null,
|
||||
fit: 'cover',
|
||||
openAngle: 0,
|
||||
@@ -98,7 +98,7 @@ export const laptopPc = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
light.intensity = (2 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||
};
|
||||
|
||||
@@ -108,6 +108,7 @@ export const laptopPc = defineObject({
|
||||
if (options.customPicture != null) {
|
||||
screenMaterial.unfreeze();
|
||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.emissiveTexture = tex;
|
||||
applyFit();
|
||||
applyScreenBrightness();
|
||||
|
||||
@@ -36,7 +36,7 @@ export const monitor = defineObject({
|
||||
},
|
||||
default: {
|
||||
bodyColor: [0.1, 0.1, 0.1],
|
||||
screenBrightness: 0.35,
|
||||
screenBrightness: 0.5,
|
||||
customPicture: null,
|
||||
fit: 'cover',
|
||||
},
|
||||
@@ -48,6 +48,7 @@ export const monitor = defineObject({
|
||||
const scale = new BABYLON.Vector3();
|
||||
matrix.decompose(scale);
|
||||
|
||||
// TODO: graphicsQualityがLOWならそもそも追加しない
|
||||
const light = new BABYLON.SpotLight('', new BABYLON.Vector3(cm(0), cm(20) / Math.abs(scale.y), 0), new BABYLON.Vector3(0, 0, 1), Math.PI / 1, 2, scene, room?.lightContainer != null);
|
||||
light.parent = model.root;
|
||||
light.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
|
||||
@@ -82,8 +83,8 @@ export const monitor = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
light.intensity = (5 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
light.intensity = (1 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||
};
|
||||
|
||||
applyScreenBrightness();
|
||||
|
||||
@@ -77,6 +77,7 @@ export const tabletopLcdButtonsController = defineObject({
|
||||
if (options.customPicture != null && options.customPicture !== '') {
|
||||
screenMaterial.unfreeze();
|
||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.emissiveTexture = tex;
|
||||
screenMaterial.emissiveTexture.level = 2;
|
||||
applyFit();
|
||||
@@ -100,7 +101,7 @@ export const tabletopLcdButtonsController = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
};
|
||||
|
||||
applyScreenBrightness();
|
||||
|
||||
@@ -62,7 +62,7 @@ export const tv = defineObject({
|
||||
|
||||
const applyScreenBrightness = () => {
|
||||
const b = options.screenBrightness;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
||||
screenMaterial.emissiveIntensity = b * 2;
|
||||
light.intensity = (7 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user