Reduce Mii editor HTTP requests from 4 to 1 on every change#367
Open
ariankordi wants to merge 5 commits intoPretendoNetwork:devfrom
Open
Reduce Mii editor HTTP requests from 4 to 1 on every change#367ariankordi wants to merge 5 commits intoPretendoNetwork:devfrom
ariankordi wants to merge 5 commits intoPretendoNetwork:devfrom
Conversation
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.
Author
|
@binaryoverload Noticed that you ran CI on this earlier today. The eslint issues should be fixed now. |
Author
|
Anyone interested in merging this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Those icons are now deferred and not requested on every change.
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
splitModeparam 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!)