Releases: playcanvas/react
@playcanvas/react v0.5.0
@playcanvas/[email protected]
Minor Changes
- 894ca08: Added new deviceTypes api for WebGPU and fallback devices
Patch Changes
- 4917998: We now ensure build outputs retain .js suffix in import paths. This ensures compatibility with the ESM spec
@playcanvas/blocks v0.1.0
@playcanvas/[email protected]
Minor Changes
- 67a045e: We now expose the
useAssetViewer
hook which provides API and context to the Splat Viewer
Patch Changes
- 4917998: We now ensure build outputs retain .js suffix in import paths. This ensures compatibility with the ESM spec
- 8348361: Updated @playcanvas/blocks to use 2.8.0 of the engine
- Updated dependencies [4917998]
- Updated dependencies [894ca08]
- @playcanvas/[email protected]
v0.4.2
What's new?
PlayCanvas 2.8.0 #168
We've included playcanvas v2.8.0 as a new peer dependancy. This brings lots of nice improvements like Splat Picking. See the release notes for more. This also include some internal reworking of the Gsplat component
New Components for 2D UI!
We've added the Element and Screen component with a new useFont
hook for loading multi channel SDF's fonts - rendering 2D GL UI. Examples to follow!
- Add useFont hook by @marklundin in #166
- Add Element component by @marklundin in #173
For Rollup or Vite users check the new @playcanvas/rollup plugins which can generate font based multichannel SDF textures at build time from a .ttf
.
// Returns a path to the multi channel sdt
import inconsolata from "fonts/inconsolata.tts?sdf"
export function InconsolataFont() {
const { asset } = useFont(inconsolata);
return asset;
}
You can use this Font asset with <Screen/>
and <Element/>
components for rendering text.
Draco Support
TheuseModel
hook now works with Draco compressed meshes with zero config - Great for super compressed meshes. This will lazy load the draco library as needed from the Google CDN's (their recommended approach), you can also configure your own. But most importantly, you can use with zero setup.
[Check the PR](for loading GLB's it will automatically ) for more details
Full Changelog: v0.0.7...v0.4.2
@playcnvas/react v0.4.1
What's Changed
- Update all npm dependencies by @renovate in #140
- Add Asset progress callback by @marklundin in #153
- docs fixes by @marklundin in #155
Full Changelog: v0.4.0...v0.4.1
@playcanvas/blocks v0.0.7
What's Changed
- Added SplatViewer TSDocs by @marklundin in #151
- Update all npm dependencies by @renovate in #140
- Adds SplatViewer progress bar by @marklundin in #154
- Add SplatViewer SOGS Compression by @marklundin in #149
- Adds Post Processing SplatViewer variants by @marklundin in #156
- Adds SplatViewer IntersectionObserver guard. by @marklundin in #158
- Updated to latest @playcanvas/react 0.4.1 by @marklundin in #161
v0.4.0
What's Changed
pc-blocks.mp4
@playcanvas/react
Few new features for @playcanvas/react
- Add
useFrame
hook and associated tests by @marklundin in #131 - Add Screen component and associated tests by @marklundin in #134
New @playcanvas/blocks 🎉
New Blocks lib now available on npm
- Implement new 3D primitives for React in the @playcanvas/blocks package by @marklundin in #142
- Enhance SplatViewer and documentation updates by @marklundin in #135
- Disable SplatViewer Auto Render by @marklundin in #143
- Help/Settings & Improved Mobile Layout by @marklundin in #136
General docs & repo updates
- Adds installable LLM
rules.mdc
by @marklundin in #139 - Updates PNPM deps by @marklundin in #144
Full Changelog: v0.3.2...v0.4.0
v0.3.2
Whats new?
This release adds 3D Blocks - a set of high level 3d building blocks for react. The components are themed, composable and responsive following modern component design principles.
Components can be installed using shadcn using a custom registry hosted on playcanvas-react.vercel.app
SplatViewer - beta
A new composable and theme-able <SplatViewer/>
block for rendering gaussian splats
pc-react-blocks.mp4
Fixes and updates
- Support ref forwading for Script Component by @marklundin in #129
- Fixes picking issue in low DPR by @marklundin in #128
Docs updates
- Refactor documentation structure and remove unused components by @marklundin in #121
- Add titles to example entries in _meta.tsx by @marklundin in #127
Full Changelog: v0.3.1...v0.3.2
v0.3.1
A number of bug fixes and improvments to the docs. We're now running tests! ⚡
What's Changed
- Serializable props by @marklundin in #99
- Update @playcanvas/react to version 0.3.0 and enhance documentation by @marklundin in #102
- Refactor useComponent hook to simplify component addition logic by @marklundin in #107
- Add documentation for asset hooks (#103) by @marklundin in #106
- Updates Engine peer dep to 2.71 by @marklundin in #111
- Refactor color utilities and validation logic by @marklundin in #112
- Update documentation and metadata for improved clarity and SEO by @marklundin in #113
- Update all npm dependencies by @renovate in #105
- Add Unit Tests by @marklundin in #115
- Allow string color types by @marklundin in #117
- Update dependency node to v22 by @renovate in #116
- Update package metadata and repository links by @marklundin in #119
- Update README.md by @marklundin in #118
- Update package version to 0.3.1 by @marklundin in #120
Full Changelog: v0.3.0...v0.3.1
v0.3.0
Whats new?
The latest release of @playcanvas/react ships with some important updates for the library and developer experience.
✨ Now with React 19 #95
One of the most important updates - You can now use React 19 with @playcanvas/react! React 18.x will continue to be supported for the foreseeable future.
📦 Smaller bundle size with lazy Physics #86
We now lazy load and split the physics library from the build. This means for projects that don't need physics, you'll no longer see inflated build sizes, and even when you do require physics, the library will be lazily loaded, allowing you to code split it out from your main build. See the <Application/>
and <RigidBody/>
docs for more information.
🪝 New Asset hooks #97
By popular demand we've included some default asset loading hooks for loading splats, models, textures and more. The fetchAsset
util still provides a low level mechanic for using query libs, but we've shipped some simple non-caching hooks to get you up to speed. Docs to follow.
📚 Improved Developer Experience #87
We've massively overhauled our docs and types to provide a better developer experience with helpful information.
- Types from the underlying PlayCanvas engine are now automatically surfaced in your components no matter the engine version.
- In addition we've now also validate props at run-time, falling back to sensible defaults. This gives you important and timely feedback on what's gone wrong and where without crashing your project. Run time validation is scoped to development builds only.
- The API docs now include the underlying PlayCanvas types.
Props are now validated at runtime
Other fixes and update
We've also included a range of other updates and fixes to the library and documentation...
- Limit PlayCanvas versions to patch range by @marklundin in #91
- Resizes picker on Window Resize by @marklundin in #79
- Add Splat Viewer example by @marklundin in #78
- Limit PlayCanvas versions to patch range by @marklundin in #91
- Update dependencies and improve project structure by @marklundin in #89
- Refactor component props and enhance type safety by @marklundin in #87
- Adds TSDoc to Component docs by @marklundin in #98
- Improve Docs metadata by @marklundin in #100
Full Changelog: v0.2.4...v0.3.0