diff --git a/packages/frontend/assets/room/object-thumbs/electronic-display-board.png b/packages/frontend/assets/room/object-thumbs/electronic-display-board.png new file mode 100644 index 0000000000..18255ef190 Binary files /dev/null and b/packages/frontend/assets/room/object-thumbs/electronic-display-board.png differ diff --git a/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.blend b/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.blend index ea20d0d081..2ce6c6f4cc 100644 Binary files a/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.blend and b/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.blend differ diff --git a/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.glb b/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.glb index a72fbe6f77..8ab10de329 100644 Binary files a/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.glb and b/packages/frontend/assets/room/objects/electronic-display-board/electronic-display-board.glb differ diff --git a/packages/frontend/src/world/room/engine.ts b/packages/frontend/src/world/room/engine.ts index 9c0a92d077..5e9b60b032 100644 --- a/packages/frontend/src/world/room/engine.ts +++ b/packages/frontend/src/world/room/engine.ts @@ -1612,9 +1612,9 @@ export class RoomEngine extends EventEmitter { } this.sr.disableSnapshotRendering(); - if (this.gl != null) { - this.gl.isEnabled = false; // 重いので切る - } + //if (this.gl != null) { + // this.gl.isEnabled = false; // 重いので切る + //} if (this.gridPlane.material == null) { import('@babylonjs/materials').then(m => { @@ -1639,9 +1639,9 @@ export class RoomEngine extends EventEmitter { await this.bake(); this.sr.enableSnapshotRendering(); - if (this.gl != null) { - this.gl.isEnabled = true; - } + //if (this.gl != null) { + // this.gl.isEnabled = true; + //} } public async bake() { diff --git a/packages/frontend/src/world/room/objects/electronicDisplayBoard.ts b/packages/frontend/src/world/room/objects/electronicDisplayBoard.ts index df0c38d658..6903b10975 100644 --- a/packages/frontend/src/world/room/objects/electronicDisplayBoard.ts +++ b/packages/frontend/src/world/room/objects/electronicDisplayBoard.ts @@ -27,7 +27,7 @@ export const electronicDisplayBoard = defineObject({ }, default: { text: 'Hello, Misskey!', - frameColor: [0.2, 0.2, 0.2], + frameColor: [0.05, 0.05, 0.05], ledColor: [1, 1, 1], }, }, @@ -44,6 +44,7 @@ export const electronicDisplayBoard = defineObject({ const texLoading = Promise.withResolvers(); const tex = new BABYLON.Texture('/client-assets/room/textures/dot-matrix-chars.png', scene, false, false, undefined, () => { + tex.level = 2; textMaterial.emissiveTexture = tex; textMaterial.albedoTexture = tex; textMaterial.disableLighting = true; @@ -68,6 +69,7 @@ export const electronicDisplayBoard = defineObject({ const textManager = new RecyvlingTextGrid(displayMesh, maxChars, { meshFlipped: true, material: textMaterial, + charUScale: 1.15, }); model.bakeExcludeMeshes = [displayMesh]; diff --git a/packages/frontend/src/world/utility.ts b/packages/frontend/src/world/utility.ts index f2ee8d3f8f..0b04589fbd 100644 --- a/packages/frontend/src/world/utility.ts +++ b/packages/frontend/src/world/utility.ts @@ -392,6 +392,7 @@ export class RecyvlingTextGrid { private currentText = ''; private meshFlipped: boolean; private repeatSeparator: string; + private charUScale: number; /* (non-flipped) a d--e @@ -416,6 +417,7 @@ export class RecyvlingTextGrid { meshFlipped: boolean; material: BABYLON.StandardMaterial; repeatSeparator?: string; + charUScale?: number; }) { this.mesh = mesh; this.mesh.material = options.material; @@ -426,6 +428,7 @@ export class RecyvlingTextGrid { this.uvs = mesh.getVerticesData(BABYLON.VertexBuffer.UVKind)!; this.meshFlipped = options.meshFlipped; this.repeatSeparator = options.repeatSeparator ?? ' ■ '; + this.charUScale = options.charUScale ?? 1; for (let j = 0; j < (this.verticesCountPerFace * 2); j += 2) { const x = this.uvs[j]; @@ -515,14 +518,14 @@ export class RecyvlingTextGrid { const uvIndex = i * (this.verticesCountPerFace * 2); // uvは(x,y)の2要素なので*2 if (this.meshFlipped) { - this.uvs[uvIndex + this.aIndex + 0] = this.uvs[uvIndex + this.cIndex + 0] = this.uvs[uvIndex + this.eIndex + 0] = (charX + 0) / TEXT_TEXTURE_CHAR_COLS; + this.uvs[uvIndex + this.aIndex + 0] = this.uvs[uvIndex + this.cIndex + 0] = this.uvs[uvIndex + this.eIndex + 0] = ((charX + 0) / TEXT_TEXTURE_CHAR_COLS) - ((1 / TEXT_TEXTURE_CHAR_COLS) * (1 - this.charUScale)); this.uvs[uvIndex + this.aIndex + 1] = this.uvs[uvIndex + this.bIndex + 1] = this.uvs[uvIndex + this.dIndex + 1] = (charY + 0) / TEXT_TEXTURE_CHAR_ROWS; - this.uvs[uvIndex + this.bIndex + 0] = this.uvs[uvIndex + this.dIndex + 0] = this.uvs[uvIndex + this.fIndex + 0] = (charX + 1) / TEXT_TEXTURE_CHAR_COLS; + this.uvs[uvIndex + this.bIndex + 0] = this.uvs[uvIndex + this.dIndex + 0] = this.uvs[uvIndex + this.fIndex + 0] = ((charX + 1) / TEXT_TEXTURE_CHAR_COLS) + ((1 / TEXT_TEXTURE_CHAR_COLS) * (1 - this.charUScale)); this.uvs[uvIndex + this.cIndex + 1] = this.uvs[uvIndex + this.eIndex + 1] = this.uvs[uvIndex + this.fIndex + 1] = (charY + 1) / TEXT_TEXTURE_CHAR_ROWS; } else { - this.uvs[uvIndex + this.aIndex + 0] = this.uvs[uvIndex + this.dIndex + 0] = this.uvs[uvIndex + this.bIndex + 0] = (charX + 0) / TEXT_TEXTURE_CHAR_COLS; + this.uvs[uvIndex + this.aIndex + 0] = this.uvs[uvIndex + this.dIndex + 0] = this.uvs[uvIndex + this.bIndex + 0] = ((charX + 0) / TEXT_TEXTURE_CHAR_COLS) - ((1 / TEXT_TEXTURE_CHAR_COLS) * (1 - this.charUScale)); this.uvs[uvIndex + this.aIndex + 1] = this.uvs[uvIndex + this.dIndex + 1] = this.uvs[uvIndex + this.eIndex + 1] = (charY + 0) / TEXT_TEXTURE_CHAR_ROWS; - this.uvs[uvIndex + this.eIndex + 0] = this.uvs[uvIndex + this.fIndex + 0] = this.uvs[uvIndex + this.cIndex + 0] = (charX + 1) / TEXT_TEXTURE_CHAR_COLS; + this.uvs[uvIndex + this.eIndex + 0] = this.uvs[uvIndex + this.fIndex + 0] = this.uvs[uvIndex + this.cIndex + 0] = ((charX + 1) / TEXT_TEXTURE_CHAR_COLS) + ((1 / TEXT_TEXTURE_CHAR_COLS) * (1 - this.charUScale)); this.uvs[uvIndex + this.bIndex + 1] = this.uvs[uvIndex + this.cIndex + 1] = this.uvs[uvIndex + this.fIndex + 1] = (charY + 1) / TEXT_TEXTURE_CHAR_ROWS; } }