From 807241a2d10d55d94d85cba4e160c5a237f13b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bl=C3=A1ha?= Date: Wed, 20 Nov 2024 20:29:10 +0100 Subject: [PATCH] expand NPM install instructions (#4952) --- packages/model-viewer/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/model-viewer/README.md b/packages/model-viewer/README.md index a351129f36..c283cc9c16 100644 --- a/packages/model-viewer/README.md +++ b/packages/model-viewer/README.md @@ -21,6 +21,8 @@ supported to provide a seamless development experience. ## Installing +### NPM + The `` web component can be installed from [NPM](https://npmjs.org): ```sh @@ -30,6 +32,14 @@ npm install three npm install @google/model-viewer ``` +Finally, include the `` script in your project. + +```js +import '@google/model-viewer'; +``` + +### CDN + 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): ```html