graphosaurus

3D graph viewer powered by WebGL (three.js)

Github星跟蹤圖

Graphosaurus

Build Status
npm version

A three-dimensional static graph viewer.

(click the image to try it out)

Demos

Documentation

JSDoc generated API documentation can be found here.

Twenty second tutorial

<html>
  <head>
    <style>
    #graph {
      width: 500px;
      height: 500px;
      border: 1px solid grey;
    }
    </style>
  </head>
  <body>
    <div id="graph"></div>

    <script src="graphosaurus.min.js"></script>
    <script>
      // JavaScript will go here
    </script>
  </body>
</html>

If you open this up in your web browser, you'll see something that looks like this:

Look at that amazing square! Now let's create a graph, a couple nodes, and an edge between the nodes:

var graph = G.graph()

// Create a red node with cartesian coordinates x=0, y=0, z=0
var redNode = G.node([0, 0, 0], {color: "red"});
graph.addNode(redNode);

// You can also use the addTo method to add to the graph
var greenNode = G.node([1, 1, 1], {color: "green"}).addTo(graph);

var edge = G.edge([redNode, greenNode], {color: "blue"});
graph.addEdge(edge);  // or edge.addTo(graph)

// Render the graph in the HTML element with id='graph'
graph.renderIn("graph");

After inserting this JavaScript in the <script> block, you should see this:

While this is a very basic example, I hope I've demonstrated how simple it is to create graphs with Graphosaurus.

Build

  1. Run git clone https://github.com/frewsxcv/graphosaurus.git to clone this repository
  2. Install node, npm, and grunt-cli
  3. Run npm install to install all the build requirements
  4. Run grunt to build Graphosaurus. The resulting compiled JavaScript will be in dist/ and the docs will be in doc/

Mascot

gryposaurus

John Conway's illustration of our glorious leader, the gryposaurus graphosaurus.

Similar projects

All files in this repository are licensed under version two of the Mozilla Public License.

Graphosaurus has some third party dependencies listed in the package.json file in the devDependencies and dependencies sections. Their licenses can be found on their respective project pages.

主要指標

概覽
名稱與所有者frewsxcv/graphosaurus
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證Mozilla Public License 2.0
所有者活动
創建於2013-11-22 03:13:29
推送於2022-03-03 18:34:09
最后一次提交2018-04-25 10:21:30
發布數10
最新版本名稱0.6.3 (發布於 )
第一版名稱0.1.0 (發布於 )
用户参与
星數389
關注者數25
派生數46
提交數284
已啟用問題?
問題數57
打開的問題數22
拉請求數24
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?