-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
720ba18
commit c1a3e80
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,25 @@ npm install textures | |
|
||
## Usage | ||
|
||
Import `textures.js` from NPM with: | ||
|
||
``` | ||
import textures from 'textures'; | ||
``` | ||
|
||
Or you can use `textures.js` in your html page with a `<script>` tag: | ||
You can also use`textures.js` in your html page with a `<script>` tag, dowloading `textures.js` in a local folder | ||
|
||
``` | ||
<script src="path/to/textures.js"></script> | ||
``` | ||
|
||
Then: | ||
or using the Unpkg CDN network | ||
|
||
``` | ||
<script src="https://unpkg.com/[email protected]/dist/textures.js"></script> | ||
``` | ||
|
||
Then `textures.js` can be used alongside with `d3` with: | ||
|
||
``` | ||
const svg = d3 | ||
|
@@ -44,4 +52,4 @@ svg | |
|
||
## License | ||
|
||
MIT | ||
MIT |