mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
wip
This commit is contained in:
parent
d3a7dc0ea5
commit
f8851c0f2e
16 changed files with 21 additions and 7 deletions
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -46,6 +46,7 @@ export const clippedPicture = defineObject({
|
|||
pictureMesh.rotationQuaternion = null;
|
||||
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(pictureMesh, () => {
|
||||
const targetWidth = remap(options.width, 0, 1, 2, 100); // 最小値(値を0にした場合)でのサイズは2cmで、最大値(値を1にした場合)でのサイズは100cmなので。比率の計算だから単位はなんでもいいけど、とにかく0が0にならない点を考慮させる必要がある
|
||||
|
|
|
|||
|
|
@ -22,12 +22,15 @@ export const djPlayer = defineObject({
|
|||
image: {
|
||||
type: 'image',
|
||||
label: 'Image',
|
||||
presets: [],
|
||||
presets: [{
|
||||
label: 'Waveform',
|
||||
value: 'waveform',
|
||||
}],
|
||||
},
|
||||
},
|
||||
default: {
|
||||
screenBrightness: 0.5,
|
||||
image: { type: null },
|
||||
image: { type: 'waveform' },
|
||||
},
|
||||
},
|
||||
placement: 'top',
|
||||
|
|
@ -36,7 +39,7 @@ export const djPlayer = defineObject({
|
|||
createInstance: async ({ model, options, scene }) => {
|
||||
const screenMesh = model.findMesh('__X_SCREEN__');
|
||||
const screenMaterial = model.findMaterial('__X_SCREEN__');
|
||||
const defaultScreenTexture = screenMaterial.emissiveTexture;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
normalizeUvToSquare(screenMesh);
|
||||
|
||||
|
|
@ -54,6 +57,8 @@ export const djPlayer = defineObject({
|
|||
let url: string | null = null;
|
||||
if (options.image.type === '_custom_') {
|
||||
url = options.image.custom?.url ?? null;
|
||||
} else if (options.image.type === 'waveform') {
|
||||
url = '/client-assets/room/objects/dj-player/textures/display-waveform.png';
|
||||
}
|
||||
return textureManager.change(url, options.image.fit).then((tex) => {
|
||||
screenMaterial.emissiveTexture = tex;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export const handheldGameConsole = defineObject({
|
|||
|
||||
const bodyMaterial = model.findMaterial('__X_BODY__');
|
||||
const screenMaterial = model.findMaterial('__X_SCREEN__');
|
||||
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.ambientColor = new BABYLON.Color3(0, 0, 0);
|
||||
screenMaterial.albedoColor = new BABYLON.Color3(0, 0, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ export const laptopPc = defineObject({
|
|||
const bodyMaterial = model.findMaterial('__X_BODY__');
|
||||
const bezelMaterial = model.findMaterial('__X_BEZEL__');
|
||||
const screenMaterial = model.findMaterial('__X_SCREEN__');
|
||||
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.ambientColor = new BABYLON.Color3(0, 0, 0);
|
||||
screenMaterial.albedoColor = new BABYLON.Color3(0, 0, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export const largeMousepad = defineObject({
|
|||
createInstance: async ({ scene, options, model }) => {
|
||||
const padMesh = model.findMesh('__X_PAD__');
|
||||
const padMaterial = model.findMaterial('__X_PAD__');
|
||||
padMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(padMesh, () => 70 / 30, scene);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export const monitor = defineObject({
|
|||
|
||||
const bodyMaterial = model.findMaterial('__X_BODY__');
|
||||
const screenMaterial = model.findMaterial('__X_SCREEN__');
|
||||
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
screenMaterial.ambientColor = new BABYLON.Color3(0, 0, 0);
|
||||
screenMaterial.albedoColor = new BABYLON.Color3(0, 0, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export const pictureFrame = defineObject({
|
|||
pictureMesh.rotationQuaternion = null;
|
||||
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(pictureMesh, () => {
|
||||
const targetWidth = options.width * (1 - options.matHThickness);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export const poster = defineObject({
|
|||
pictureMesh.rotationQuaternion = null;
|
||||
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const pinMeshes = model.findMeshes('__X_PIN__');
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export const tabletopGlassPictureFrame = defineObject({
|
|||
const frameMesh = model.findMesh('__X_FRAME__');
|
||||
const pinMeshes = model.findMeshes('__X_PIN__');
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(pictureMesh, () => {
|
||||
const targetWidth = remap(options.width, 0, 1, 2, 76); // 最小値(値を0にした場合)でのサイズは2cmで、最大値(値を1にした場合)でのサイズは76cmなので。比率の計算だから単位はなんでもいいけど、とにかく0が0にならない点を考慮させる必要がある
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const tabletopLcdButtonsController = defineObject({
|
|||
const bodyMaterial = model.findMaterial('__X_BODY__');
|
||||
const screenMesh = model.findMesh('__X_SCREEN__');
|
||||
const screenMaterial = model.findMaterial('__X_SCREEN__');
|
||||
const defaultScreenTexture = screenMaterial.emissiveTexture;
|
||||
screenMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
normalizeUvToSquare(screenMesh);
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ export const tabletopPictureFrame = defineObject({
|
|||
pictureMesh.rotationQuaternion = null;
|
||||
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(pictureMesh, () => {
|
||||
const targetWidth = options.width * (1 - options.matHThickness);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ export const tapestry = defineObject({
|
|||
const ropeMesh = model.findMesh('__X_ROPE__');
|
||||
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(pictureMesh, () => {
|
||||
const targetWidth = remap(options.width, 0, 1, 2, 100); // 最小値(値を0にした場合)でのサイズは2cmで、最大値(値を1にした場合)でのサイズは100cmなので。比率の計算だから単位はなんでもいいけど、とにかく0が0にならない点を考慮させる必要がある
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ export const wallCanvas = defineObject({
|
|||
canvasMesh.rotationQuaternion = null;
|
||||
|
||||
const canvasMaterial = model.findMaterial('__X_CANVAS__');
|
||||
canvasMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(canvasMesh, () => {
|
||||
const targetWidth = options.width;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export const wallGlassPictureFrame = defineObject({
|
|||
const frameMesh = model.findMesh('__X_FRAME__');
|
||||
const pinMeshes = model.findMeshes('__X_PIN__');
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
pictureMaterial.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
|
||||
const textureManager = createTextureManager(pictureMesh, () => {
|
||||
const targetWidth = remap(options.width, 0, 1, 2, 172); // 最小値(値を0にした場合)でのサイズは2cmで、最大値(値を1にした場合)でのサイズは172cmなので。比率の計算だから単位はなんでもいいけど、とにかく0が0にならない点を考慮させる必要がある
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue