Skip to content

Commit 09adc29

Browse files
Eric RowellEric Rowell
authored andcommitted
update readme
1 parent 421018e commit 09adc29

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ let graph = new ElGrapho({
4242
4343
model: {
4444
nodes: {
45-
xs: new Float32Array([0, -0.4, 0.4, -0.6, -0.2, 0.2, 0.6]),
46-
ys: new Float32Array([0.6, 0, 0, -0.6, -0.6, -0.6, -0.6]),
47-
colors: new Float32Array([0, 1, 1, 2, 2, 2, 2])
45+
xs: [0, -0.4, 0.4, -0.6, -0.2, 0.2, 0.6],
46+
ys: [0.6, 0, 0, -0.6, -0.6, -0.6, -0.6],
47+
colors: [0, 1, 1, 2, 2, 2, 2]
4848
},
49-
edges: new Float32Array([
49+
edges: [
5050
0, 1,
5151
0, 2,
5252
1, 3,
5353
1, 4,
5454
2, 5,
5555
2, 6
56-
])
56+
]
5757
},
5858
5959
width: 800,
@@ -63,9 +63,9 @@ let graph = new ElGrapho({
6363

6464
* ```container``` - DOM element that will contain the El Grapho graph.
6565

66-
* ```nodes``` - object that contains information about all of the nodes in the graph (graphs are made up of nodes and edges). Each node is defined by a position (x and y), and also a color. El Grapho x and y ranges are between -1 and 1. For example, if x is -1, then the node position is on the very left of the viewport. If x is 0 it is in the center. And if x is 1 it is on the very right of the viewport. Colors are integer values between 0 and 7. These integer values map to the El Grapho color palette.
66+
* ```model.nodes``` - object that contains information about all of the nodes in the graph (graphs are made up of nodes and edges). Each node is defined by a position (x and y), and also a color. El Grapho x and y ranges are between -1 and 1. For example, if x is -1, then the node position is on the very left of the viewport. If x is 0 it is in the center. And if x is 1 it is on the very right of the viewport. Colors are integer values between 0 and 7. These integer values map to the El Grapho color palette.
6767

68-
* ```edges``` - array that defines the edges between nodes based on their indices. In the example above, the first edge begins at node ```0``` and ends at node ```1```. For non directed graphs, or bi-directional graphs, the order of the first node and second node do not matter. However, for directed graphs, the first index is the *from* node, and the second index is the *to* node.
68+
* ```model.edges``` - array that defines the edges between nodes based on their indices. In the example above, the first edge begins at node ```0``` and ends at node ```1```. For non directed graphs, or bi-directional graphs, the order of the first node and second node do not matter. However, for directed graphs, the first index is the *from* node, and the second index is the *to* node.
6969

7070
* ```width``` - number that defines the width of the El Grapho viewport in pixels.
7171

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elgrapho",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"main": "engine/dist/elgrapho.min.js",
55
"author": "Eric Rowell",
66
"license": "SEE LICENSE IN <LICENSE.md>",

0 commit comments

Comments
 (0)