mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-27 15:24:43 +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: {
|
default: {
|
||||||
bodyColor: [1, 1, 1],
|
bodyColor: [1, 1, 1],
|
||||||
bezelColor: [0, 0, 0],
|
bezelColor: [0, 0, 0],
|
||||||
screenBrightness: 0.35,
|
screenBrightness: 0.5,
|
||||||
customPicture: null,
|
customPicture: null,
|
||||||
fit: 'cover',
|
fit: 'cover',
|
||||||
},
|
},
|
||||||
@@ -88,7 +88,7 @@ export const allInOnePc = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
light.intensity = (5 * b) * WORLD_SCALE * WORLD_SCALE;
|
light.intensity = (5 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -98,6 +98,7 @@ export const allInOnePc = defineObject({
|
|||||||
if (options.customPicture != null) {
|
if (options.customPicture != null) {
|
||||||
screenMaterial.unfreeze();
|
screenMaterial.unfreeze();
|
||||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||||
|
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||||
screenMaterial.emissiveTexture = tex;
|
screenMaterial.emissiveTexture = tex;
|
||||||
applyFit();
|
applyFit();
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const djPlayer = defineObject({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
screenBrightness: 0.35,
|
screenBrightness: 0.5,
|
||||||
customPicture: null,
|
customPicture: null,
|
||||||
fit: 'cover',
|
fit: 'cover',
|
||||||
},
|
},
|
||||||
@@ -62,7 +62,7 @@ export const djPlayer = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
@@ -71,6 +71,7 @@ export const djPlayer = defineObject({
|
|||||||
if (options.customPicture != null && options.customPicture !== '') {
|
if (options.customPicture != null && options.customPicture !== '') {
|
||||||
screenMaterial.unfreeze();
|
screenMaterial.unfreeze();
|
||||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||||
|
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||||
screenMaterial.emissiveTexture = tex;
|
screenMaterial.emissiveTexture = tex;
|
||||||
applyFit();
|
applyFit();
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
@@ -83,6 +84,7 @@ export const djPlayer = defineObject({
|
|||||||
});
|
});
|
||||||
tex.level = 0.5;
|
tex.level = 0.5;
|
||||||
} else {
|
} else {
|
||||||
|
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||||
screenMaterial.emissiveTexture = defaultScreenTexture;
|
screenMaterial.emissiveTexture = defaultScreenTexture;
|
||||||
applyFit();
|
applyFit();
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const handheldGameConsole = defineObject({
|
|||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
bodyColor: [1, 1, 1],
|
bodyColor: [1, 1, 1],
|
||||||
screenBrightness: 0.35,
|
screenBrightness: 0.5,
|
||||||
customPicture: null,
|
customPicture: null,
|
||||||
fit: 'cover',
|
fit: 'cover',
|
||||||
},
|
},
|
||||||
@@ -71,7 +71,7 @@ export const handheldGameConsole = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
@@ -80,6 +80,7 @@ export const handheldGameConsole = defineObject({
|
|||||||
if (options.customPicture != null) {
|
if (options.customPicture != null) {
|
||||||
screenMaterial.unfreeze();
|
screenMaterial.unfreeze();
|
||||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||||
|
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||||
screenMaterial.emissiveTexture = tex;
|
screenMaterial.emissiveTexture = tex;
|
||||||
applyFit();
|
applyFit();
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export const laptopPc = defineObject({
|
|||||||
default: {
|
default: {
|
||||||
bodyColor: [1, 1, 1],
|
bodyColor: [1, 1, 1],
|
||||||
bezelColor: [0, 0, 0],
|
bezelColor: [0, 0, 0],
|
||||||
screenBrightness: 0.35,
|
screenBrightness: 0.5,
|
||||||
customPicture: null,
|
customPicture: null,
|
||||||
fit: 'cover',
|
fit: 'cover',
|
||||||
openAngle: 0,
|
openAngle: 0,
|
||||||
@@ -98,7 +98,7 @@ export const laptopPc = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
light.intensity = (2 * b) * WORLD_SCALE * WORLD_SCALE;
|
light.intensity = (2 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -108,6 +108,7 @@ export const laptopPc = defineObject({
|
|||||||
if (options.customPicture != null) {
|
if (options.customPicture != null) {
|
||||||
screenMaterial.unfreeze();
|
screenMaterial.unfreeze();
|
||||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||||
|
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||||
screenMaterial.emissiveTexture = tex;
|
screenMaterial.emissiveTexture = tex;
|
||||||
applyFit();
|
applyFit();
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const monitor = defineObject({
|
|||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
bodyColor: [0.1, 0.1, 0.1],
|
bodyColor: [0.1, 0.1, 0.1],
|
||||||
screenBrightness: 0.35,
|
screenBrightness: 0.5,
|
||||||
customPicture: null,
|
customPicture: null,
|
||||||
fit: 'cover',
|
fit: 'cover',
|
||||||
},
|
},
|
||||||
@@ -48,6 +48,7 @@ export const monitor = defineObject({
|
|||||||
const scale = new BABYLON.Vector3();
|
const scale = new BABYLON.Vector3();
|
||||||
matrix.decompose(scale);
|
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);
|
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.parent = model.root;
|
||||||
light.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
|
light.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
|
||||||
@@ -82,8 +83,8 @@ export const monitor = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
light.intensity = (5 * b) * WORLD_SCALE * WORLD_SCALE;
|
light.intensity = (1 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||||
};
|
};
|
||||||
|
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export const tabletopLcdButtonsController = defineObject({
|
|||||||
if (options.customPicture != null && options.customPicture !== '') {
|
if (options.customPicture != null && options.customPicture !== '') {
|
||||||
screenMaterial.unfreeze();
|
screenMaterial.unfreeze();
|
||||||
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
const tex = new BABYLON.Texture(options.customPicture, scene, false, false, undefined, () => {
|
||||||
|
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||||
screenMaterial.emissiveTexture = tex;
|
screenMaterial.emissiveTexture = tex;
|
||||||
screenMaterial.emissiveTexture.level = 2;
|
screenMaterial.emissiveTexture.level = 2;
|
||||||
applyFit();
|
applyFit();
|
||||||
@@ -100,7 +101,7 @@ export const tabletopLcdButtonsController = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
applyScreenBrightness();
|
applyScreenBrightness();
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export const tv = defineObject({
|
|||||||
|
|
||||||
const applyScreenBrightness = () => {
|
const applyScreenBrightness = () => {
|
||||||
const b = options.screenBrightness;
|
const b = options.screenBrightness;
|
||||||
screenMaterial.emissiveColor = new BABYLON.Color3(b, b, b);
|
screenMaterial.emissiveIntensity = b * 2;
|
||||||
light.intensity = (7 * b) * WORLD_SCALE * WORLD_SCALE;
|
light.intensity = (7 * b) * WORLD_SCALE * WORLD_SCALE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user