1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-30 16:53:59 +02:00

update directory structure

This commit is contained in:
syuilo
2026-04-17 10:16:05 +09:00
parent ae463cde5e
commit ebdf627b19
96 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,44 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import * as BABYLON from '@babylonjs/core';
import { defineObject } from '../engine.js';
export const cactusS = defineObject({
id: 'cactusS',
name: 'Cactus S',
options: {
schema: {
potColor: {
type: 'color',
label: 'Pot color',
},
},
default: {
potColor: [0.45, 0.45, 0.45],
},
},
placement: 'top',
hasCollisions: false,
hasTexture: true,
canPreMeshesMerging: true,
createInstance: ({ options, model }) => {
const potMaterial = model.findMaterial('__X_POT__');
const applyPotColor = () => {
const [r, g, b] = options.potColor;
potMaterial.albedoColor = new BABYLON.Color3(r, g, b);
};
applyPotColor();
return {
onOptionsUpdated: ([k, v]) => {
applyPotColor();
},
interactions: {},
};
},
});