mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-27 08:24:26 +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 * as BABYLON from '@babylonjs/core';
|
||||||
import { defineObject } from '../object.js';
|
import { defineObject } from '../object.js';
|
||||||
import { cm } from '../../utility.js';
|
import { cm, remap } from '../../utility.js';
|
||||||
import { createOverridedStates } from '../utility.js';
|
import { createOverridedStates } from '../utility.js';
|
||||||
|
|
||||||
export const blind = defineObject({
|
export const blind = defineObject({
|
||||||
@@ -74,6 +74,15 @@ export const blind = defineObject({
|
|||||||
blades.push(b);
|
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();
|
model.updated();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user