mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-28 07:44:26 +02:00
wip
This commit is contained in:
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 153 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
@@ -158,7 +158,7 @@ onMounted(() => {
|
|||||||
type: 'book',
|
type: 'book',
|
||||||
position: [10, 100, 10],
|
position: [10, 100, 10],
|
||||||
rotation: [0, 0, 0],
|
rotation: [0, 0, 0],
|
||||||
variation: '1',
|
variation: 1,
|
||||||
}, {
|
}, {
|
||||||
id: 'u',
|
id: 'u',
|
||||||
type: 'bed',
|
type: 'bed',
|
||||||
|
|||||||
@@ -105,21 +105,18 @@ const OBJECTS = {
|
|||||||
const mesh = obj.meshes[2] as BABYLON.Mesh;
|
const mesh = obj.meshes[2] as BABYLON.Mesh;
|
||||||
console.log(obj.meshes);
|
console.log(obj.meshes);
|
||||||
mesh.markVerticesDataAsUpdatable(BABYLON.VertexBuffer.UVKind, true);
|
mesh.markVerticesDataAsUpdatable(BABYLON.VertexBuffer.UVKind, true);
|
||||||
if (o.variation === '1') {
|
const index = o.variation;
|
||||||
const index = 0;
|
const x = index % 8;
|
||||||
const x = index % 8;
|
const y = Math.floor(index / 8);
|
||||||
const y = Math.floor(index / 8);
|
|
||||||
|
|
||||||
const uvs = mesh.getVerticesData(BABYLON.VertexBuffer.UVKind)!;
|
const uvs = mesh.getVerticesData(BABYLON.VertexBuffer.UVKind)!;
|
||||||
for (let i = 0; i < uvs.length / 2; i++) {
|
for (let i = 0; i < uvs.length / 2; i++) {
|
||||||
const u = uvs[i * 2];
|
const u = uvs[i * 2];
|
||||||
const v = uvs[i * 2 + 1];
|
const v = uvs[i * 2 + 1];
|
||||||
|
uvs[i * 2] = (u / 8) + (x / 8);
|
||||||
uvs[i * 2] = u / 8;
|
uvs[i * 2 + 1] = (v / 8) + (y / 8);
|
||||||
uvs[i * 2 + 1] = v / 8;
|
|
||||||
}
|
|
||||||
mesh.updateVerticesData(BABYLON.VertexBuffer.UVKind, uvs);
|
|
||||||
}
|
}
|
||||||
|
mesh.updateVerticesData(BABYLON.VertexBuffer.UVKind, uvs);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'lava-lamp': {
|
'lava-lamp': {
|
||||||
|
|||||||
Reference in New Issue
Block a user