1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 14:05:35 +02:00

Update books.ts

This commit is contained in:
syuilo
2026-04-22 19:45:21 +09:00
parent 20d9a03bb3
commit b7b24a2140

View File

@@ -25,6 +25,7 @@ export const books = defineObject({
placement: 'top',
hasCollisions: false,
hasTexture: true,
canPreMeshesMerging: false,
createInstance: ({ scene, options, model }) => {
const coverMaterial = model.findMaterial('__X_COVER__');
@@ -54,14 +55,16 @@ export const books = defineObject({
];
for (const meshes of bookMeshes) {
const z = Math.random() * cm(0.005);
const y = Math.random() * cm(0.0025);
const z = Math.random() * 0.005;
const y = Math.random() * 0.0025;
for (const mesh of meshes) {
mesh.position.z -= z;
mesh.position.y += y;
}
}
model.updated();
return {
onOptionsUpdated: ([k, v]) => {
applyVariation();