Skip to content

Commit 7750bb5

Browse files
committed
chore: update README.md with unpkg installation instructions
1 parent fe5c17d commit 7750bb5

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

packages/recast-navigation/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,34 @@ This library provides high level APIs that make it easy to get started creating
2727
2828
## Installation
2929

30+
This package ships as both ECMAScript modules and CJS, and is compatible with Node.js and browser environments.
31+
32+
### NPM
33+
3034
```sh
3135
npm install recast-navigation
3236
```
3337

34-
This package ships as both ECMAScript modules and CJS, and is compatible with Node.js and browser environments.
38+
### Unpkg
39+
40+
```html
41+
<script type="importmap">
42+
{
43+
"imports": {
44+
"@recast-navigation/core": "https://unpkg.com/@recast-navigation/core@0.17.0/dist/index.mjs",
45+
"@recast-navigation/generators": "https://unpkg.com/@recast-navigation/generators@0.17.0/dist/index.mjs",
46+
"@recast-navigation/three": "https://unpkg.com/@recast-navigation/three@0.17.0/dist/index.mjs"
47+
}
48+
}
49+
</script>
50+
<script type="module">
51+
import { init } from '@recast-navigation/core';
52+
53+
await init();
54+
</script>
55+
```
56+
57+
### Usage with bundlers
3558

3659
If you are using Vite, you may need to opt `recast-navigation` out of pre-bundling:
3760

@@ -50,6 +73,7 @@ API Documentation can be found at [https://docs.recast-navigation-js.isaacmason.
5073
<!-- REMOVE-FROM-DOCS-END -->
5174
5275
To get the most out of this library, you should have some familiarity with the Recast and Detour libraries. These are some good resources to get started:
76+
5377
- https://recastnav.com/md_Docs__1_Introducation.html
5478
- https://www.unrealdoc.com/p/navigation-mesh
5579

0 commit comments

Comments
 (0)