threedviewer 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/simple-viewer.es.js +7565 -5921
- package/dist/simple-viewer.umd.js +123 -123
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,26 @@ yarn add threedviewer
|
|
|
35
35
|
|
|
36
36
|
## Usage
|
|
37
37
|
|
|
38
|
+
Here's a super simple example of how to use the `SimpleViewer` component in your React application:
|
|
39
|
+
You just need to pass a url model and use it as a regular jsx component.
|
|
40
|
+
|
|
41
|
+
```jsx
|
|
42
|
+
import React from 'react';
|
|
43
|
+
import { SimpleViewer } from 'threedviewer';
|
|
44
|
+
|
|
45
|
+
function App() {
|
|
46
|
+
return (
|
|
47
|
+
<div style={{ width: '100%', height: '400px' }}>
|
|
48
|
+
<SimpleViewer object={'https://modelviewer.dev/shared-assets/models/RobotExpressive.glb'} />
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default App;
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
|
|
38
58
|
Here's a basic example of how to use the `SimpleViewer` component:
|
|
39
59
|
|
|
40
60
|
```jsx
|