From 433653289a1ce7ccadbef54ed49018eff7029762 Mon Sep 17 00:00:00 2001 From: Steve Hall Date: Wed, 7 Jun 2017 22:35:20 -0700 Subject: [PATCH] update readme --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40ff83f..cfa080a 100644 --- a/README.md +++ b/README.md @@ -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. +

Example Code

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. @@ -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