Skip to content

Commit

Permalink
Use asset manager v2 (#89)
Browse files Browse the repository at this point in the history
* sample of loading meshes with AssetManager hook with progress and Suspense.
* add Texture and invalidate cache when scene changes on useAssetManager.
* upgrade storybook + babel to v6 (some addons still alpha).
  • Loading branch information
brianzinn authored Oct 18, 2020
1 parent 8ce5d47 commit 3806bc8
Show file tree
Hide file tree
Showing 9 changed files with 401 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
'@storybook/addon-actions/register',
'@storybook/addon-links/register',
'@storybook/addon-storysource/register',
'@storybook/addon-notes/register',
// '@storybook/addon-notes/register',
],
webpackFinal: async (config, { configType }) => {
config.resolve.alias['react-babylonjs'] = path.resolve(__dirname, '../dist/react-babylonjs')
Expand Down
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { addParameters, setAddon, configure } from '@storybook/react';
import { addParameters } from '@storybook/react';
import { setDefaults } from '@storybook/addon-info';

// addon-info
// // addon-info
setDefaults({
header: false, // Toggles display of header with component name and description
});
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ With declarative (TSX/JSX) coding and HMR, you experience the same development w
## @babylonjs/gui
1. GUI3DManager
2. **2D Controls** - scrollViewerWindow, baseSlider, babylon-button/Button, checkbox, colorPicker, container, control, displayGrid, babylon-ellipse/Ellipse, grid, babylon-image/Image, imageBasedSlider, imageScrollBar, inputPassword, inputText, babylon-line/Line, multiLine, radioButton, rectangle, scrollBar, scrollViewer, selectionPanel, slider, stackPanel, textBlock, virtualKeyboard
> note: 'babylon-*' for `button`, `ellipse`, `image` & `line` due to JSX conflict with `React.SVGProps<T>`, otherwise use the ProperCase equavalent, but you miss editor auto-completion.
> note: 'babylon-*' for `button`, `ellipse`, `image` & `line` due to JSX conflict with `React.SVGProps<T>`, otherwise use the ProperCase equivalent, but you miss editor auto-completion.
3. **3D Controls** - abstractButton3D, button3D, container3D, control3D, cylinderPanel, holographicButton, meshButton3D, planePanel, scatterPanel, spherePanel, stackPanel3D, volumeBasedPanel

Expand Down Expand Up @@ -273,6 +273,8 @@ const App: React.FC = () => {
> v2.2.0 (2020-04-04) - Added support for `react-spring` [demo](https://brianzinn.github.io/react-babylonjs/?path=/story/integrations--react-spring)
> v3.0.0 (2020-??-??) - Lots of pending work on master for upcoming 3.0 release. Work is on master branch and is for loading assets primarily and React.Suspense support (follow along in issues #81 and #87).
## Breaking Changes
> 0.x to 1.0 ([List](breaking-changes-0.x-to-1.0.md))
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
]
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/core": "^7.11.6",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babylonjs/core": "^4.1.0",
"@babylonjs/gui": "^4.1.0",
"@babylonjs/inspector": "^4.1.0",
Expand All @@ -55,15 +55,15 @@
"@inlet/react-pixi": "^1.2.8",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-typescript": "^4.0.0",
"@storybook/addon-actions": "^5.3.19",
"@storybook/addon-info": "^5.3.19",
"@storybook/addon-links": "^5.3.19",
"@storybook/addon-notes": "5.3.19",
"@storybook/addon-storysource": "^5.3.19",
"@storybook/addons": "^5.3.19",
"@storybook/react": "^5.3.19",
"@storybook/source-loader": "^5.3.19",
"@storybook/theming": "^5.3.19",
"@storybook/addon-actions": "^6.0.22",
"@storybook/addon-info": "^6.0.0-alpha.2",
"@storybook/addon-links": "^6.0.22",
"@storybook/addon-notes": "^6.0.0-alpha.6",
"@storybook/addon-storysource": "^6.0.22",
"@storybook/addons": "^6.0.22",
"@storybook/react": "^6.0.22",
"@storybook/source-loader": "^6.0.22",
"@storybook/theming": "^6.0.22",
"@types/lodash.camelcase": "^4.3.6",
"@types/node": "^8.0.0",
"@types/react": "^16.7.20",
Expand All @@ -89,7 +89,7 @@
"rollup": "^2.0.6",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-typescript2": "^0.26.0",
"storybook": "^5.3.19",
"storybook": "^6.0.22",
"ts-morph": "^8.1.0",
"ts-node": "^7.0.1",
"tsc-watch": "^1.0.31",
Expand Down
99 changes: 0 additions & 99 deletions src/hooks/useAssetManager.ts

This file was deleted.

Loading

0 comments on commit 3806bc8

Please sign in to comment.