Skip to content

Commit 807241a

Browse files
authored
expand NPM install instructions (#4952)
1 parent cc65ec4 commit 807241a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/model-viewer/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ supported to provide a seamless development experience.
2121

2222
## Installing
2323

24+
### NPM
25+
2426
The `<model-viewer>` web component can be installed from [NPM](https://npmjs.org):
2527

2628
```sh
@@ -30,6 +32,14 @@ npm install three
3032
npm install @google/model-viewer
3133
```
3234

35+
Finally, include the `<model-viewer>` script in your project.
36+
37+
```js
38+
import '@google/model-viewer';
39+
```
40+
41+
### CDN
42+
3343
It can also be used directly from various free CDNs such as [jsDelivr](https://www.jsdelivr.com/package/npm/@google/model-viewer) and Google's own [hosted libraries](https://developers.google.com/speed/libraries#model-viewer):
3444

3545
```html

0 commit comments

Comments
 (0)