mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
wip
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -20,6 +20,13 @@ export const pictureFrame = defineObject({
|
|||||||
label: 'Direction',
|
label: 'Direction',
|
||||||
enum: ['vertical', 'horizontal'],
|
enum: ['vertical', 'horizontal'],
|
||||||
},
|
},
|
||||||
|
frameThickness: {
|
||||||
|
type: 'range',
|
||||||
|
label: 'Frame thickness',
|
||||||
|
min: 0,
|
||||||
|
max: 1,
|
||||||
|
step: 0.01,
|
||||||
|
},
|
||||||
matHThickness: {
|
matHThickness: {
|
||||||
type: 'range',
|
type: 'range',
|
||||||
label: 'Mat horizontal thickness',
|
label: 'Mat horizontal thickness',
|
||||||
@@ -42,6 +49,7 @@ export const pictureFrame = defineObject({
|
|||||||
default: {
|
default: {
|
||||||
frameColor: [0.71, 0.58, 0.39],
|
frameColor: [0.71, 0.58, 0.39],
|
||||||
direction: 'vertical',
|
direction: 'vertical',
|
||||||
|
frameThickness: 0.5,
|
||||||
matHThickness: 0.125,
|
matHThickness: 0.125,
|
||||||
matVThickness: 0.15,
|
matVThickness: 0.15,
|
||||||
customPicture: null,
|
customPicture: null,
|
||||||
@@ -105,6 +113,12 @@ export const pictureFrame = defineObject({
|
|||||||
|
|
||||||
applyDirection();
|
applyDirection();
|
||||||
|
|
||||||
|
const applyFrameThickness = () => {
|
||||||
|
frameMesh.morphTargetManager!.getTargetByName('FrameThickness')!.influence = options.frameThickness;
|
||||||
|
};
|
||||||
|
|
||||||
|
applyFrameThickness();
|
||||||
|
|
||||||
const applyMatThickness = () => {
|
const applyMatThickness = () => {
|
||||||
matMesh.morphTargetManager!.getTargetByName('MatH')!.influence = options.matHThickness;
|
matMesh.morphTargetManager!.getTargetByName('MatH')!.influence = options.matHThickness;
|
||||||
matMesh.morphTargetManager!.getTargetByName('MatV')!.influence = options.matVThickness;
|
matMesh.morphTargetManager!.getTargetByName('MatV')!.influence = options.matVThickness;
|
||||||
@@ -150,6 +164,9 @@ export const pictureFrame = defineObject({
|
|||||||
if (k === 'direction') {
|
if (k === 'direction') {
|
||||||
applyDirection();
|
applyDirection();
|
||||||
}
|
}
|
||||||
|
if (k === 'frameThickness') {
|
||||||
|
applyFrameThickness();
|
||||||
|
}
|
||||||
if (k === 'matHThickness' || k === 'matVThickness') {
|
if (k === 'matHThickness' || k === 'matVThickness') {
|
||||||
applyMatThickness();
|
applyMatThickness();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user