Skip to content

Refactor Math#21

Open
davispuh wants to merge 1 commit intonijigenerate:mainfrom
davispuh:math
Open

Refactor Math#21
davispuh wants to merge 1 commit intonijigenerate:mainfrom
davispuh:math

Conversation

@davispuh
Copy link

I tried to update nijigenerate to i2d-imgui (see nijigenerate/nijigenerate#84)
Unfortunately it's major PITA because everything's tightly coupled and Luna has no idea how to use Git so it's all massive commit dumps that contain unrelated changes/everything...

Basically one of the commits that updates inochi-creator to i2d-imgui needs this math module.

And I can't cherry-pick just this module because commits contain shitload of other stuff and even this depends on new serializer.

Anyway this implementation comes from these commits:

@seagetch
Copy link
Collaborator

Thanks for the patch.
It seems some functions or classes are duplicated from other file.
For example, struct Transform is defined at source/nijilive/math/transform.d
We need to see what functions are actually missing in nijilive code set.

Add Math Primitives in single file

Taken from these commits:

* Completely overhaul serialization and deserialization - Inochi2D/inochi2d@63fac27
* Fix deserialization - Inochi2D/inochi2d@bc1cb61
@davispuh davispuh changed the title Add Math Primitives Refactor Math Aug 29, 2025
@davispuh
Copy link
Author

Yeah actually those commits deleted those files. I now updated this change to that.
Don't know if it's good idea or not but that's what they did.

Basically import inochi2d.math becomes import inochi2d.core.math

@seagetch
Copy link
Collaborator

Sorry, I cannot accept the change that might break with existing code base.
We need to clarify more line-by-line what is actually changed, and whether we should update and accept those commits.

@davispuh
Copy link
Author

That's fine, I don't really care but it just makes it simpler to port changes when codebases are similar and not too divergent.

We need to clarify more line-by-line what is actually changed, and whether we should update and accept those commits.

That's tricky... just look at Inochi2D/inochi2d@63fac27 ...

@r888800009
Copy link
Contributor

I think we should first set up proper integration testing, especially for serialization and save/load functionality. nijilive has some transformers and other features that are independent from inochi2d, and these could potentially corrupt users’ project files during save/load — which would be even harder to accept than a simple crash.

For the other parts, most of the UI changes previously didn’t require touching the core function libraries, so those could be resolved through cherry-picking and manual verification.

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