Skip to content

Commit 68bbc4b

Browse files
committed
usage 4
1 parent d022e41 commit 68bbc4b

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ All planned features can be found in the [GitHub Projects](https://github.com/sw
3838

3939
## Usage
4040

41+
### Script tag
42+
43+
1. Import:
44+
45+
```html
46+
<script src="sketchbook.min.js"></script>
47+
```
48+
49+
2. Load a glb scene defined in Blender:
50+
51+
```javascript
52+
const world = new Sketchbook.World('scene.glb');
53+
```
54+
4155
### NPM
4256

4357
1. Install:
@@ -46,23 +60,16 @@ All planned features can be found in the [GitHub Projects](https://github.com/sw
4660
npm i sketchbook
4761
```
4862

49-
2. Import and load a glb scene defined in Blender:
63+
2. Import:
5064

5165
```javascript
52-
import * as Sketchbook from 'sketchbook';
53-
54-
const world = new Sketchbook.World('scene.glb');
66+
import { World } from 'sketchbook';
5567
```
5668

57-
### Script tag
69+
3. Load a glb scene defined in Blender:
5870

59-
Import and load a glb scene defined in Blender:
60-
61-
```html
62-
<script src="sketchbook.min.js"></script>
63-
<script>
64-
const world = new Sketchbook.World('scene.glb');
65-
</script>
71+
```javascript
72+
const world = new World('scene.glb');
6673
```
6774

6875
## Contributing

0 commit comments

Comments
 (0)