mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 20:25:39 +02:00
Update books.ts
This commit is contained in:
@@ -25,6 +25,7 @@ export const books = defineObject({
|
|||||||
placement: 'top',
|
placement: 'top',
|
||||||
hasCollisions: false,
|
hasCollisions: false,
|
||||||
hasTexture: true,
|
hasTexture: true,
|
||||||
|
canPreMeshesMerging: false,
|
||||||
createInstance: ({ scene, options, model }) => {
|
createInstance: ({ scene, options, model }) => {
|
||||||
const coverMaterial = model.findMaterial('__X_COVER__');
|
const coverMaterial = model.findMaterial('__X_COVER__');
|
||||||
|
|
||||||
@@ -54,14 +55,16 @@ export const books = defineObject({
|
|||||||
];
|
];
|
||||||
|
|
||||||
for (const meshes of bookMeshes) {
|
for (const meshes of bookMeshes) {
|
||||||
const z = Math.random() * cm(0.005);
|
const z = Math.random() * 0.005;
|
||||||
const y = Math.random() * cm(0.0025);
|
const y = Math.random() * 0.0025;
|
||||||
for (const mesh of meshes) {
|
for (const mesh of meshes) {
|
||||||
mesh.position.z -= z;
|
mesh.position.z -= z;
|
||||||
mesh.position.y += y;
|
mesh.position.y += y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.updated();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
onOptionsUpdated: ([k, v]) => {
|
onOptionsUpdated: ([k, v]) => {
|
||||||
applyVariation();
|
applyVariation();
|
||||||
|
|||||||
Reference in New Issue
Block a user