1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-23 08:44:05 +02:00
This commit is contained in:
syuilo
2026-03-03 15:51:58 +09:00
parent e336cbad62
commit dbffa5520c
6 changed files with 198 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ import { defineObject } from '../engine.js';
export const pictureFrame = defineObject({
id: 'pictureFrame',
name: 'Rectangular picture frame',
name: 'Simple picture frame',
options: {
schema: {
frameColor: {
@@ -103,11 +103,10 @@ export const pictureFrame = defineObject({
const srcWidth = tex.getSize().width;
const srcHeight = tex.getSize().height;
const srcAspect = srcWidth / srcHeight;
const targetWidth = options.width * (1 - (options.matHThickness * MAT_THICKNESS_FACTOR));
const targetHeight = options.height * (1 - (options.matVThickness * MAT_THICKNESS_FACTOR));
const targetAspect = targetWidth / targetHeight;
const srcAspect = srcWidth / srcHeight;
let newAx = ax;
let newAy = ay;