mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 14:05:35 +02:00
wip
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as BABYLON from '@babylonjs/core';
|
||||
import { defineObject } from '../object.js';
|
||||
import { cm } from '../../utility.js';
|
||||
import { cm, remap } from '../../utility.js';
|
||||
import { createOverridedStates } from '../utility.js';
|
||||
|
||||
export const blind = defineObject({
|
||||
@@ -74,6 +74,15 @@ export const blind = defineObject({
|
||||
blades.push(b);
|
||||
}
|
||||
|
||||
const length = Math.abs(blades.at(-1).position.y * Math.abs(scale.y));
|
||||
|
||||
for (const mesh of model.root.getChildMeshes()) {
|
||||
if (mesh.morphTargetManager != null && mesh.morphTargetManager.getTargetByName('Length') != null) {
|
||||
mesh.morphTargetManager.getTargetByName('Length').influence = remap(length, cm(10), cm(200), 0, 1);
|
||||
}
|
||||
}
|
||||
model.updated();
|
||||
|
||||
model.updated();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user