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

introduced a state concept for asset loader and migrated gltfloader t… #8869

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

anselm
Copy link
Collaborator

@anselm anselm commented Sep 20, 2023

introduced a state concept for asset loader and migrated gltfloader to it

Summary

🤖 Generated by Copilot at 3f734e2

This pull request refactors the gltfLoader management in the engine package to use a state object instead of a class property. This reduces the module dependencies, simplifies the code, and improves the testability. The changes affect the AssetLoader, Engine, SceneObjectSystem, AssetLoaderState, and avatarFunctions.test modules.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at 3f734e2

  • Refactor gltfLoader to use a state object instead of a class property (link, link, link, link, link, link, link, link, link, link, link)
  • Remove the import and the property of GLTFLoader from the Engine class in Engine.ts (link, link)
  • Add a new module AssetLoaderState.ts that defines the AssetLoaderState object that holds the gltfLoader instance (link)
  • Import the AssetLoaderState module in AssetLoader.ts and SceneObjectSystem.tsx (link, link)
  • Update the functions in AssetLoader.ts that use the gltfLoader to access it from the AssetLoaderState object (link, link, link)
  • Update the function in SceneObjectSystem.tsx that uses the gltfLoader to access it from the AssetLoaderState object (link)
  • Update the test function in avatarFunctions.test.ts that uses the gltfLoader to access it from the AssetLoaderState object (link)

🤖 Generated by Copilot at 3f734e2

Sing, O Muse, of the skillful refactorer who changed the code
Of the AssetLoader and the gltfLoader, the source of many woes
He made a state object, AssetLoaderState, to hold the loader's might
And freed the Engine and the SceneObjectSystem from its binding tight

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 merged commit fb6a13e into dev Sep 25, 2023
12 checks passed
@HexaField HexaField deleted the asset-loader-state-concept branch September 25, 2023 03:10
barankyle pushed a commit that referenced this pull request Oct 13, 2023
#8869)

* introduced a state concept for asset loader and migrated gltfloader to it

* make gltfloader once
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