Breaking changes
ControlsProvider
The Controls Provider is now a part of the Controls
imported component.
Before
import { ControlsProvider } from 'react-three-gui';
<ControlsProvider>
...
</ControlsProvider>
After
import { Controls } from 'react-three-gui';
<Controls.Provider>
...
</Controls.Provider>
Canvas
Note: We do no longer automatically detect your Canvas node and inject the Controls Context to it.
You will have to use the built-in <Controls.Canvas/>
or make your own with withControls
higher order component.
Before
import { Controls } from 'react-three-gui';
import { Canvas } from 'react-three-fiber';
<Controls.Provider>
<Canvas />
</Controls.Provider>
After (version 1)
import { Controls } from 'react-three-gui';
<Controls.Provider>
<Controls.Canvas />
</Controls.Provider>
After (version 2)
import { Controls, withControls } from 'react-three-gui';
import { Canvas } from 'react-three-fiber';
const CanvasWithControls = withControls(Canvas);
<Controls.Provider>
<CanvasWithControls />
</Controls.Provider>