Fix Inconsistent Previews Between Gameplay and Design - #306
Open
menvae wants to merge 1 commit into
Open
Conversation
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.
Changes
Shake wasn't seekable because RemoveCompletedTransforms is true by default for whatever the shake target was. We now use a proxy for the shake that doesn't remove its completed transforms.
Loops weren't working correctly for some events because some events need custom handlers/containers for them and previously we would pass map.MapEvents but now we actually pass the full compiled events generated from loops.
Pulse wasn't really Rebuilt properly because it needed to be reset.
Also Decoupled EditorMap from DesignShaderHandler because honestly that feels more appropriate (also EditorMap not needed as we just pass the shader events directly now).
Added
registerListenershelper method just cuz it feels cleaner since we only use one delegate for all changes for a specific type.We now cache event compilation so you should get compiled events from
DesignContainer.getCompiledEvents, Though we invalidate it on every change so it might not look like much but it's a pretty meaningful change cuz from a single change, multiple rebuild methods (shaders, camera, pulse) each used to callDesignContainer.getCompiledEventsindependently meaning one event change could trigger 3 or 4 full compiles instead of one. The cache just means all of them now share a single compiled result per change instead of redoing the same work repeatedly.