Skip to content

Conversation

@K-bai
Copy link
Contributor

@K-bai K-bai commented Aug 15, 2025

Description

In live2d story reader:

  • add more warning / error during assets loading progress
  • improve stability in loading process (rewrite PreloadQueue class)
  • speed up live2d model loading when first appear
  • fix lipsync when character monologue & multiple characters lipsync at same time
  • bump live2d library to upstream...

Related Issue

#616
same fix method with #559
Really don't know why but it works...

Motivation and Context

How Has This Been Tested?

  • Chrome (Desktop)
  • Chrome (Mobile)
  • Firefox (Desktop)
  • Firefox (Mobile)
  • Safari (Desktop, optional)
  • Safari (iPhone, optional)
  • Safari (iPad, optional)

Screenshots (if appropriate):

@dnaroma dnaroma requested review from Copilot and dnaroma August 15, 2025 14:02
@dnaroma
Copy link
Contributor

dnaroma commented Aug 15, 2025

use [x] instead of [*] for markdown checkboxes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR significantly improves the Live2D story reader by enhancing asset loading progress reporting, improving stability through a rewritten PreloadQueue class, optimizing model loading speed, and fixing lipsync issues. The changes also include bumping the Live2D library to the latest upstream version.

  • Rewrote PreloadQueue class for better stability and error handling in asset loading
  • Fixed lipsync issues for character monologues and multiple character scenarios
  • Added comprehensive warning/error reporting during asset loading progress
  • Improved model loading speed when characters first appear

Reviewed Changes

Copilot reviewed 25 out of 28 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/utils/storyLoader.ts Fixed typo changing "identifer" to "identifier" across multiple asset references
src/utils/Live2DPlayer/ui_assets.ts Fixed spelling of "identifier" property throughout UI asset definitions
src/utils/Live2DPlayer/load.ts Major refactor of loading system with new progress handlers and PreloadQueue implementation
src/utils/Live2DPlayer/layer/*.ts Updated references from "identifer" to "identifier" in layer components
src/utils/Live2DPlayer/animation/*.ts Fixed identifier spelling in animation components
src/utils/Live2DPlayer/action/*.ts Updated asset lookup to use new data structure and fixed identifier references
src/utils/Live2DPlayer/PreloadQueue.ts Complete rewrite of PreloadQueue class with improved error handling and concurrency control
src/utils/Live2DPlayer/Live2DPlayer.ts Updated to work with new asset structure
src/utils/Live2DPlayer/Live2DController.ts Major updates to audio handling and asset management
src/pages/storyreader-live2d/*.tsx Updated to use new progress handlers and error reporting
package.json Bumped pixi-live2d-display-mulmotion to version 0.5.0-mm-6
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dnaroma
Copy link
Contributor

dnaroma commented Aug 20, 2025

Can you split the pull request for chibi viewer?

@dnaroma
Copy link
Contributor

dnaroma commented Aug 26, 2025

Error in Live2D Viewer:

Uncaught TypeError: can't access property 0, renderOrder is undefined
    doDrawModel index.es.js:11319
    drawModel index.es.js:7322
    draw index.es.js:11747
    _render index.es.js:5745
    render Container.ts:669
    render Container.ts:673
    render ObjectRendererSystem.ts:104
    render Renderer.ts:377
    render Application.ts:90
    emit TickerListener.ts:67
    update Ticker.ts:427

It also happens in Story Reader. Tested in Firefox 141.0.3 on macOS 15.6. There is also bug report in discord complaining Live2D failed to display.

@K-bai
Copy link
Contributor Author

K-bai commented Sep 8, 2025

Fixed by add old version of live2d core to public/live2ddependencies.

@GuangChen2333
Copy link

It has now been clarified why setOverwriteFlagForModelCullings works, and the details are as follows:

Root Cause: In some ArtMeshes of certain models (e.g., 02saki_cloth001_3.0_f_t09), some components are affected by the combined action of filters and matrix transformations. For these components with Culling enabled, the filter fails to flip them back to their original positions correctly; instead, they remain in the positions before the matrix flip.
(For details on the function of Culling, see https://docs.live2d.com/en/cubism-editor-manual/concept-of-artmesh/)

If during matrix transformation, the code is modified as follows:

- array[4] = -matrix.c
- array[5] = -matrix.d
+ array[4] = matrix.c
+ array[5] = matrix.d

a correct result of vertical flipping will be obtained.

Furthermore, setting setOverwriteFlagForModelCullings to false will disable the Culling function for all components, thereby preventing incorrect display.

@dnaroma
Copy link
Contributor

dnaroma commented Sep 17, 2025

Fixed by add old version of live2d core to public/live2ddependencies.

I hope cubism is fine with it, I got a warning cause one repo has it.

@dnaroma dnaroma enabled auto-merge (rebase) September 17, 2025 19:41
auto-merge was automatically disabled September 17, 2025 19:41

Rebase failed

@dnaroma
Copy link
Contributor

dnaroma commented Sep 20, 2025

Conflicts need to be cleaned

@dnaroma
Copy link
Contributor

dnaroma commented Sep 25, 2025

It can fix #626

@dnaroma dnaroma linked an issue Sep 25, 2025 that may be closed by this pull request
@K-bai
Copy link
Contributor Author

K-bai commented Oct 4, 2025

I'll resolve conflicts asap!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Mizuki's mouth gets stuck open

3 participants