Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sghall committed Jun 8, 2017
1 parent 8d2d6ca commit 4336532
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ A small library that gives you D3 style selections in THREE.js. Now you can do a
npm install subunit
```

The library only has peer dependency on THREE.js. D3 is not required to be loaded on the page.

<h4>Example Code</h4>

The code below is an excerpt from this [simple demo](https://sghall.github.io/subunit/demos/bars-simple.html) that creates some blue and red bars.
Expand All @@ -20,9 +22,6 @@ The code below is an excerpt from this [simple demo](https://sghall.github.io/su
const barMaterial = new THREE.MeshPhongMaterial({ color: '#4183c4' }); // blue material
const bigMaterial = new THREE.MeshPhongMaterial({ color: '#ff0000' }); // red material

x.domain(data.map(function (d) { return d.letter; }));
y.domain([0, d3.max(data, function (d) { return d.frequency; })]);

const rootNode = SubUnit.select(scene); // select the scene
rootNode.node().position.x = -size[0] / 2; // adjust the root node

Expand Down

0 comments on commit 4336532

Please sign in to comment.