Skip to content

Dynamically import local rendering code #17

@ariankordi

Description

@ariankordi

The local rendering feature is nice, but only applicable if you have the resource, and I’m sure you know how unnecessary that is to include if you only want to do data conversion or something.
I noticed when looking at your fork of this extension that the bundle size is enormous, and I’m a tiny bit worried that it’ll look like FFL.js/Three.js is at fault.

(For what it’s worth, I realized Three.js is pretty heavy and my plan is to have one lightweight <300KB C++ icon rendering core used for the server and importable across languages/in WASM, as well as a proper replacement for FFL.js in pure JS. But it’ll be a while until we get there.)

Anyway, dynamic imports have been a thing for a long time, and there should be no risk to using them. It may be easier to split “rendering” into an interface class where one returns a PNG from Mii Studio, and another goes through the local rendering path. That would be the only file importing Three.js/FFL.js. It may also make it easier to use a different solution in the future, I don’t know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions