mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-23 06:24:15 +02:00
wip
This commit is contained in:
@@ -83,17 +83,17 @@ export const tabletopPictureFrame = defineObject({
|
||||
},
|
||||
},
|
||||
placement: 'top',
|
||||
createInstance: ({ scene, options, findMaterial, findMesh, meshUpdated }) => {
|
||||
const frameMesh = findMesh('__X_FRAME__');
|
||||
createInstance: ({ scene, options, model }) => {
|
||||
const frameMesh = model.findMesh('__X_FRAME__');
|
||||
frameMesh.rotationQuaternion = null;
|
||||
const matMesh = findMesh('__X_MAT__');
|
||||
const matMesh = model.findMesh('__X_MAT__');
|
||||
matMesh.rotationQuaternion = null;
|
||||
const coverMesh = findMesh('__X_COVER__');
|
||||
const coverMesh = model.findMesh('__X_COVER__');
|
||||
coverMesh.rotationQuaternion = null;
|
||||
const pictureMesh = findMesh('__X_PICTURE__');
|
||||
const pictureMesh = model.findMesh('__X_PICTURE__');
|
||||
pictureMesh.rotationQuaternion = null;
|
||||
|
||||
const pictureMaterial = findMaterial('__X_PICTURE__');
|
||||
const pictureMaterial = model.findMaterial('__X_PICTURE__');
|
||||
|
||||
const updateUv = createPlaneUvMapper(pictureMesh);
|
||||
|
||||
@@ -118,7 +118,7 @@ export const tabletopPictureFrame = defineObject({
|
||||
coverMesh.morphTargetManager!.getTargetByName('FrameThickness')!.influence = options.frameThickness;
|
||||
matMesh.morphTargetManager!.getTargetByName('FrameThickness')!.influence = options.frameThickness;
|
||||
pictureMesh.morphTargetManager!.getTargetByName('FrameThickness')!.influence = options.frameThickness;
|
||||
meshUpdated();
|
||||
model.updated();
|
||||
};
|
||||
|
||||
applyFrameThickness();
|
||||
@@ -131,7 +131,7 @@ export const tabletopPictureFrame = defineObject({
|
||||
pictureMesh.morphTargetManager!.getTargetByName('MatH')!.influence = options.matHThickness * options.width;
|
||||
pictureMesh.morphTargetManager!.getTargetByName('MatV')!.influence = options.matVThickness * options.height;
|
||||
matMesh.isVisible = options.matHThickness > 0 || options.matVThickness > 0;
|
||||
meshUpdated();
|
||||
model.updated();
|
||||
|
||||
applyFit();
|
||||
};
|
||||
@@ -145,7 +145,7 @@ export const tabletopPictureFrame = defineObject({
|
||||
matMesh.morphTargetManager!.getTargetByName('Height')!.influence = options.height;
|
||||
coverMesh.morphTargetManager!.getTargetByName('Width')!.influence = options.width;
|
||||
coverMesh.morphTargetManager!.getTargetByName('Height')!.influence = options.height;
|
||||
meshUpdated();
|
||||
model.updated();
|
||||
|
||||
applyMatThickness();
|
||||
};
|
||||
@@ -156,7 +156,7 @@ export const tabletopPictureFrame = defineObject({
|
||||
frameMesh.morphTargetManager!.getTargetByName('Depth')!.influence = options.depth;
|
||||
//coverMesh.morphTargetManager!.getTargetByName('Depth')!.influence = options.depth;
|
||||
coverMesh.morphTargetManager!.getTargetByName('Depth')!.influence = 0;
|
||||
meshUpdated();
|
||||
model.updated();
|
||||
};
|
||||
|
||||
applyDepth();
|
||||
@@ -183,7 +183,7 @@ export const tabletopPictureFrame = defineObject({
|
||||
|
||||
applyCustomPicture();
|
||||
|
||||
const frameMaterial = findMaterial('__X_FRAME__');
|
||||
const frameMaterial = model.findMaterial('__X_FRAME__');
|
||||
|
||||
const applyFrameColor = () => {
|
||||
const [r, g, b] = options.frameColor;
|
||||
|
||||
Reference in New Issue
Block a user