@luna-editor/engine 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Player.js +2 -2
- package/dist/components/GameScreen.js +10 -0
- package/package.json +1 -1
package/dist/Player.js
CHANGED
|
@@ -517,7 +517,7 @@ export const Player = ({ scenario: scenarioProp, settings, plugins = EMPTY_PLUGI
|
|
|
517
517
|
}, [pluginManager, branchState]);
|
|
518
518
|
// ダイアログ表示とアクションノード実行のuseEffectを分離
|
|
519
519
|
useEffect(() => {
|
|
520
|
-
if (currentBlock) {
|
|
520
|
+
if (currentBlock && isFirstRenderComplete && pluginsLoaded) {
|
|
521
521
|
// fullscreen_text は独自のタイプライターを使うので、displayTextをクリアしてスキップ
|
|
522
522
|
if (currentBlock.blockType === "fullscreen_text") {
|
|
523
523
|
startTyping("");
|
|
@@ -548,7 +548,7 @@ export const Player = ({ scenario: scenarioProp, settings, plugins = EMPTY_PLUGI
|
|
|
548
548
|
startTyping(content, false);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
}, [currentBlock, previousBlock, startTyping, resetAccumulated]);
|
|
551
|
+
}, [currentBlock, previousBlock, startTyping, resetAccumulated, isFirstRenderComplete, pluginsLoaded]);
|
|
552
552
|
// 分岐ブロック自動ロード処理
|
|
553
553
|
useEffect(() => {
|
|
554
554
|
if (currentBlock && currentBlock.blockType === "conversation_branch") {
|
|
@@ -433,6 +433,16 @@ export const GameScreen = memo(function GameScreen({ scenario, currentBlock, pre
|
|
|
433
433
|
if (pendingEntranceRef.current.includes(image.objectId)) {
|
|
434
434
|
opacity = 0;
|
|
435
435
|
}
|
|
436
|
+
// useEffectが走る前の新キャラ(entranceFadesにもpendingEntranceにもまだない)を非表示
|
|
437
|
+
// これにより登場フェード開始前の1フレームでチラつくのを防ぐ
|
|
438
|
+
// ただし初回レンダリング時(prevが空)はフェードなしで即表示する
|
|
439
|
+
if (prevDisplayedCharIdsRef.current.size > 0 &&
|
|
440
|
+
entranceFadeOpacity === undefined &&
|
|
441
|
+
!pendingEntranceRef.current.includes(image.objectId) &&
|
|
442
|
+
!prevDisplayedCharIdsRef.current.has(image.objectId) &&
|
|
443
|
+
!isExitingChar) {
|
|
444
|
+
opacity = 0;
|
|
445
|
+
}
|
|
436
446
|
// 明るさを決定
|
|
437
447
|
let brightness = 1;
|
|
438
448
|
if (displayedCharacters.length > 0 && displayedChar) {
|