From 7431287bc95482ed99a1ab9e47ae0c8992239b3c Mon Sep 17 00:00:00 2001 From: boomwwww Date: Sun, 31 May 2026 18:07:53 +0800 Subject: [PATCH 1/7] fix issue 614 --- .../src/pages/editor/TransformableBox/dragStartUtils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/origine2/src/pages/editor/TransformableBox/dragStartUtils.ts b/packages/origine2/src/pages/editor/TransformableBox/dragStartUtils.ts index 53b1e9ea..558c342a 100644 --- a/packages/origine2/src/pages/editor/TransformableBox/dragStartUtils.ts +++ b/packages/origine2/src/pages/editor/TransformableBox/dragStartUtils.ts @@ -72,13 +72,17 @@ export function parseFigureCommand(line: string) { export async function SetFtoChangeF(target: string, targetPath: string): Promise { const sceneTXT = await GetSceneTXT(targetPath); const lines = sceneTXT.split('\n'); + const list = []; for (const line of lines) { const match = line.match(/-id=([^\s;]+)/); if (match && match[1] === target) { - return line.trim(); + list.push(line.trim()); } } - throw new Error('未找到对应的 changeFigure 语句'); + if (list.length === 0) { + throw new Error('未找到对应的 changeFigure 语句'); + } + return list.pop()!; } /** From b0b2c8fbdff17ce22a6f0d6e3ad90bb96ec4d0b4 Mon Sep 17 00:00:00 2001 From: boomwwww Date: Fri, 5 Jun 2026 18:44:25 +0800 Subject: [PATCH 2/7] fix issue 602 --- packages/origine2/src/locales/en.po | 3 + packages/origine2/src/locales/ja.po | 3 + packages/origine2/src/locales/zhCn.po | 3 + .../editor/EditorSidebar/EditorSidebar.tsx | 11 +- .../SentenceEditor/ChangeFigure.tsx | 1 - .../components/EffectEditor.tsx | 78 ++- .../TransformableBox/TransformableBox.tsx | 475 +++++++++--------- .../editor/TransformableBox/baseUtils.ts | 44 +- .../editor/TransformableBox/dragEndUtils.ts | 119 +++-- .../editor/TransformableBox/dragStartUtils.ts | 31 +- packages/origine2/src/utils/eventBus.ts | 6 +- 11 files changed, 415 insertions(+), 359 deletions(-) diff --git a/packages/origine2/src/locales/en.po b/packages/origine2/src/locales/en.po index fa2959df..a7ec7733 100644 --- a/packages/origine2/src/locales/en.po +++ b/packages/origine2/src/locales/en.po @@ -1037,6 +1037,9 @@ msgstr "Clear role name after execution" msgid "扩展名" msgstr "Extension name" +msgid "拖拽调整变换(建议打开快速预览效果)" +msgstr "" + msgid "拼接先前文本框内的语句" msgstr "Concat the sentences with previous text" diff --git a/packages/origine2/src/locales/ja.po b/packages/origine2/src/locales/ja.po index 7fe0b3cf..5552d4b3 100644 --- a/packages/origine2/src/locales/ja.po +++ b/packages/origine2/src/locales/ja.po @@ -1037,6 +1037,9 @@ msgstr "実行後にキャラクター名を消去" msgid "扩展名" msgstr "拡張子" +msgid "拖拽调整变换(建议打开快速预览效果)" +msgstr "" + msgid "拼接先前文本框内的语句" msgstr "前のテキストボックスの内容をつなげる" diff --git a/packages/origine2/src/locales/zhCn.po b/packages/origine2/src/locales/zhCn.po index 8f70e3bb..bb1fd646 100644 --- a/packages/origine2/src/locales/zhCn.po +++ b/packages/origine2/src/locales/zhCn.po @@ -1037,6 +1037,9 @@ msgstr "执行后清除角色名" msgid "扩展名" msgstr "扩展名" +msgid "拖拽调整变换(建议打开快速预览效果)" +msgstr "拖拽调整变换(建议打开快速预览效果)" + msgid "拼接先前文本框内的语句" msgstr "拼接先前文本框内的语句" diff --git a/packages/origine2/src/pages/editor/EditorSidebar/EditorSidebar.tsx b/packages/origine2/src/pages/editor/EditorSidebar/EditorSidebar.tsx index 1495a0d5..0c9501e2 100644 --- a/packages/origine2/src/pages/editor/EditorSidebar/EditorSidebar.tsx +++ b/packages/origine2/src/pages/editor/EditorSidebar/EditorSidebar.tsx @@ -10,7 +10,6 @@ import { t } from "@lingui/macro"; import { ArrowClockwiseFilled, ArrowClockwiseRegular, LiveFilled, LiveOffFilled, LiveOffRegular, LiveRegular, OpenFilled, OpenRegular, bundleIcon } from "@fluentui/react-icons"; import { EditorPreviewClient } from "@/utils/editorPreviewClient"; import { createPreviewBootstrapProvide, isPreviewBootstrapRequest } from "@/utils/editorPreviewBootstrap"; -import TransformableBox from '@/pages/editor/TransformableBox/TransformableBox'; import { createId } from '@/utils/createId'; let startX = 0; @@ -29,7 +28,6 @@ export default function EditorSideBar() { const isUseFontOptimization = useEditorStore.use.isUseFontOptimization(); const isShowPreview = useEditorStore.use.isShowPreview(); const updateIsShowPreview = useEditorStore.use.updateIsShowPreview(); - const isWindowAdjustment = useEditorStore.use.isWindowAdjustment(); const isShowSidebar = useGameEditorContext((state) => state.isShowSidebar); const currentSidebarTab = useGameEditorContext((state) => state.currentSidebarTab); @@ -246,6 +244,7 @@ export default function EditorSideBar() {
- -
+ /> {/* eslint-disable-next-line react/iframe-missing-sandbox */} {isShowPreview &&