-
Notifications
You must be signed in to change notification settings - Fork 33
[WIP] Migrate to React renderer #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marklundin
wants to merge
6
commits into
main
Choose a base branch
from
feat-react-renderer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
…mponents - Bumped version of `@playcanvas/react` to 0.2.0 in `package-lock.json` and `package.json`. - Added new components: `Application`, `Container`, `Entity`, `Align`, `Anim`, `Camera`, `Collision`, `EnvAtlas`, `GSplat`, `Light`, `Render`, `RigidBody`, `Script`, and `Sprite`. - Implemented hooks for managing application state and components, including `useApp`, `useComponent`, and `useParent`. - Introduced utility functions for color handling and asset fetching. - Enhanced event handling with synthetic events for better interaction management. - Updated documentation and structure for improved clarity and maintainability.
- Upgraded React and React-DOM to version 19.0.0 in package.json and package-lock.json. - Removed deprecated types for React and React-DOM from devDependencies. - Refactored MDX components to utilize PlayCanvasCanvas instead of Application and related components. - Commented out unused imports and components in various files to streamline the codebase. - Updated documentation references for TypeScript configuration in next-env.d.ts. - Cleaned up package.json in the docs directory to align with the latest versions of nextra and nextra-theme-docs. - Removed unnecessary components and hooks related to PlayCanvas, enhancing maintainability and clarity.
- Upgraded `type-fest` to version 4.32.0 in `package.json` and `package-lock.json`. - Introduced a new dependency `its-fine` version 1.2.5. - Refactored MDX components to replace `PlayCanvasCanvas` with `Application`. - Updated TypeScript configuration to include `@playcanvas/react` types. - Removed the `layout.tsx` file to streamline the documentation structure. - Enhanced the `next.config.js` to improve configuration clarity. - Cleaned up unused hooks and components from the library, improving maintainability.
- Removed commented-out components and imports from `mdx-components.js` to clean up the codebase. - Simplified the `useMDXComponents` function by directly using `defaultComponents` without the previously commented-out `docsComponents`. - Improved maintainability by reducing clutter in the component definitions.
- Updated the `Spinner` class to use a smaller random seed range for improved variability. - Modified the `Content` component to conditionally render the `Spinner` script based on a new `runScript` prop. - Added a button in the `Sandbox` component to toggle the `runScript` state, allowing users to enable or disable the script dynamically. - Refactored `hostConfig.tsx` to integrate script handling, enabling the creation and management of script components alongside entities and components. - Updated `component-config.tsx` and `script-config.tsx` to streamline the handling of component and script instances, improving overall code clarity and maintainability.
…rations, and clean up code
|
Is this still in progress? This would be super helpful! |
Contributor
I think this is eventually our goal. Unfortunately @marklundin left the PlayCanvas team, so it's probably going to be me who is going to work on it :) |
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.
This PR migrates @pc/react to use a custom react renderer. This is built upon the
react-reconcilerand brings a number of improvements over the existing approach.Improvements