Skip to content

Conversation

@ariankordi
Copy link

Currently on the Pretendo Mii editor, four requests are made every single time a change is made to the Mii. Here's what those are and how this PR addresses them:

  • Two requests for icons meant for the save screen, representing the old Mii with a sorrow expression and new Mii with a happy expression.
    • Needlessly updated on every single change when they only show on the save screen.

Those icons are now deferred and not requested on every change.

  • Two more requests for the actual Mii head shown and a bald version.

The bald head is meant to maintain the neck when a Mii's hair goes behind it. Here's what would happen if you overlaid the head of such a Mii without accounting for this:

But more requests to Nintendo is never a good thing, and they have a solution for this that had not been in the mii-js repo for the longest time: the splitMode param puts the front part and back part of the head in the same image. That is used by this commit and the result looks like it should.

(I held off on submitting the PR to the website back in September because I thought it needed a corresponding change to add the splitMode field in mii-js. Nobody responded to my PR. Turns out it this still works without that. OOOOOOOPS!)

Requesting a split depth render results in getting two renders in one
image, the top half having the back half of the Mii head (usually the
hair) and then the bottom half having the front half.

This is needed for the Mii editor because it's drawing the body
manually, and you want some elements of the head (hair) to be behind the
body and the rest to be in front.

Previously, it solved this problem by loading a copy of the Mii head
that's bald, but this along with other stuff added up to four Mii Studio
requests on every render - now it's just one.

NOTE!!!!: This actually doesn't handle importing mii-js from the new
TypeScript project, so as of this commit it WILL NOT work - installing
the new repo, which this doesn't even reference, doesn't produce
compiled JS from the TS source, so it will simply not import.
@ariankordi
Copy link
Author

@binaryoverload Noticed that you ran CI on this earlier today. The eslint issues should be fixed now.

@CLAassistant
Copy link

CLAassistant commented Feb 5, 2025

CLA assistant check
All committers have signed the CLA.

@ariankordi
Copy link
Author

Anyone interested in merging this?

Copy link
Member

@gitlimes gitlimes left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

3 participants