Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

behave graph fixes, camera fade to black uses sphere #9084

Merged
merged 5 commits into from
Oct 20, 2023

Conversation

HexaField
Copy link
Member

@HexaField HexaField commented Oct 18, 2023

Summary

🤖 Generated by Copilot at 4754fcb

This pull request refactors and improves the code for the graph component, the flow-to-behave transformer, and the camera fade effect. It removes unused imports, simplifies loops, uses helper functions, and switches to more efficient meshes and materials. These changes enhance the performance, readability, and compatibility of the code.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at 4754fcb

  • Simplify and improve the logic for updating the graph component property in BehaveFlow.tsx (link, link)
  • Use useHookstate to create local state variables for the user interaction with the Flow component in Flow.tsx (link, link)
  • Call onChangeGraph prop whenever the graph or the interaction state changes, but only if the user is not dragging and the mouse is over the pane, in Flow.tsx (link, link, link)
  • Simplify the logic for converting the node data to the behave node configuration and parameters in flowToBehave.ts (link)
  • Change the geometry, material, and mesh of the entity to use a sphere and a basic material instead of a plane and a shader material, in CameraFadeBlackEffectSystem.ts (link, link)
  • Use ComputedTransformComponent to make the entity follow the camera position dynamically, in CameraFadeBlackEffectSystem.ts (link)
  • Remove unused imports, constants, and functions from BehaveFlow.tsx, flowToBehave.ts, and CameraFadeBlackEffectSystem.ts (link, link, link, link, link)

🤖 Generated by Copilot at 4754fcb

We are the masters of the graph, we optimize the flow
We use the hooks and helpers, we make the code run low
We simplify the logic, we transform the nodes with ease
We fade the camera with a sphere, we bring the system to its knees

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@HexaField HexaField changed the base branch from behave-camera-fade to dev October 20, 2023 05:21
@HexaField HexaField merged commit ff03f83 into dev Oct 20, 2023
1 check passed
@HexaField HexaField deleted the behave-graph-camera-fade branch October 20, 2023 05:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants