mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-21 22:45:36 +02:00
wip
This commit is contained in:
@@ -134,6 +134,7 @@ type ObjectDef<OpSc extends OptionsSchema = OptionsSchema> = {
|
||||
loaderResult: BABYLON.ISceneLoaderAsyncResult;
|
||||
meshUpdated: () => void;
|
||||
findMesh: (keyword: string) => BABYLON.Mesh;
|
||||
findMeshes: (keyword: string) => BABYLON.Mesh[];
|
||||
findMaterial: (keyword: string) => BABYLON.PBRMaterial;
|
||||
}) => RoomObjectInstance<GetOptionsSchemaValues<OpSc>>;
|
||||
};
|
||||
@@ -911,6 +912,10 @@ export class RoomEngine {
|
||||
}
|
||||
return mesh as BABYLON.Mesh;
|
||||
},
|
||||
findMeshes: (keyword) => {
|
||||
const meshes = root.getChildMeshes().filter(m => m.name.includes(keyword));
|
||||
return meshes as BABYLON.Mesh[];
|
||||
},
|
||||
findMaterial: (keyword) => {
|
||||
for (const m of root.getChildMeshes()) {
|
||||
if (m.material == null) continue;
|
||||
|
||||
Reference in New Issue
Block a user