Skip to content

Commit

Permalink
update readme repo links (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatesh-sivaraman authored Apr 30, 2024
1 parent cb64fc0 commit 3625775
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Counterpoint: Canvas Animation Library

This is a library to help people develop beautiful large-scale animated data visualizations using HTML5 Canvas and WebGL.
This is a library to help people develop beautiful large-scale animated data visualizations using HTML5 Canvas and WebGL. [See the docs >](https://dig.cmu.edu/counterpoint)

## Installation and Usage

Expand All @@ -16,8 +16,6 @@ You can use a static ESM version of the library in vanilla JS like so:
import { Mark, MarkRenderGroup } from 'https://cdn.jsdelivr.net/npm/counterpoint-vis@latest/dist/counterpoint-vis.es.js';
```

See the [documentation](https://venkatesh-sivaraman.github.io/counterpoint/) for examples and API reference.

## Dev Installation

Clone the repository, then from within the repo directory run:
Expand Down
2 changes: 1 addition & 1 deletion counterpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ You can use a static ESM version of the library in vanilla JS like so:
import { Mark, MarkRenderGroup } from 'https://cdn.jsdelivr.net/npm/counterpoint-vis@latest/dist/counterpoint-vis.es.js';
```

See the [documentation](https://venkatesh-sivaraman.github.io/counterpoint/) for examples and API reference.
See the [documentation](https://dig.cmu.edu/counterpoint/) for examples and API reference.
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ description: >- # this means to ignore newlines until "baseurl:"
Counterpoint is a JavaScript/TypeScript library to help people develop beautiful
large-scale animated data visualizations using HTML5 Canvas and WebGL.
baseurl: '/counterpoint' # the subpath of your site, e.g. /blog
url: 'https://venkatesh-sivaraman.github.io' # the base hostname & protocol for your site, e.g. http://example.com
url: 'https://dig.cmu.edu' # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: venkats_14
github_username: venkatesh-sivaraman/counterpoint
github_username: cmudig/counterpoint

# Build settings
remote_theme: sighingnow/jekyll-gitbook
Expand Down
8 changes: 4 additions & 4 deletions docs/_pages/01-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ To import Counterpoint in vanilla JavaScript, you can use similar syntax but
refer to the full library URL:

```javascript
import { Mark, Attribute } from 'https://cdn.jsdelivr.net/gh/venkatesh-sivaraman/counterpoint@main/counterpoint/dist/counterpoint-vis.es.js';
import { Mark, Attribute } from 'https://cdn.jsdelivr.net/npm/counterpoint-vis@latest/dist/counterpoint-vis.es.js';
```

or use [dynamic import syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import#):

```javascript
import(
'https://cdn.jsdelivr.net/gh/venkatesh-sivaraman/counterpoint@main/counterpoint/dist/counterpoint-vis.es.js'
'https://cdn.jsdelivr.net/npm/counterpoint-vis@latest/dist/counterpoint-vis.es.js'
).then((Counterpoint) => {
// use Counterpoint as a module
});
Expand Down Expand Up @@ -186,7 +186,7 @@ function draw() {
<div>
<canvas id="example-canvas-2" style="width: 300px; height: 300px; border: 1px solid #999;"></canvas>
<script>
import('https://cdn.jsdelivr.net/gh/venkatesh-sivaraman/counterpoint@main/counterpoint/dist/counterpoint-vis.es.js').then(({ Mark, MarkRenderGroup }) => {
import('https://cdn.jsdelivr.net/npm/counterpoint-vis@latest/dist/counterpoint-vis.es.js').then(({ Mark, MarkRenderGroup }) => {
const canvas = document.getElementById("example-canvas-2");
canvas.width = canvas.offsetWidth * window.devicePixelRatio;
canvas.height = canvas.offsetHeight * window.devicePixelRatio;
Expand Down Expand Up @@ -278,7 +278,7 @@ Once completed, you should have something that looks like the following:
<canvas id="example-canvas-3" style="width: 300px; height: 300px; border: 1px solid #999;"></canvas>
<div><button style="margin-bottom: 32px;" id="animate-button-3">Animate</button></div>
<script>
import('https://cdn.jsdelivr.net/gh/venkatesh-sivaraman/counterpoint@main/counterpoint/dist/counterpoint-vis.es.js').then(({ Mark, Ticker, MarkRenderGroup }) => {
import('https://cdn.jsdelivr.net/npm/counterpoint-vis@latest/dist/counterpoint-vis.es.js').then(({ Mark, Ticker, MarkRenderGroup }) => {
const canvas = document.getElementById("example-canvas-3");
canvas.width = canvas.offsetWidth * window.devicePixelRatio;
canvas.height = canvas.offsetHeight * window.devicePixelRatio;
Expand Down

0 comments on commit 3625775

Please sign in to comment.