fourd.js 动态图形可视化库

我要开发同款
匿名用户2015年04月28日
82阅读
开发技术JavaScript
所属分类程序开发、3D图形处理库
授权协议Apache

作品详情

fourd.js是一个用在浏览器上的动态图形可视化库。稍微调整一下,你就可以用它做出一些几何图形集合,此库已经在Chrome、Firefox、IE11上测试运行,有传言说,通过切换CanvasRenderer,此库甚至可以在树莓派上运行。

示例代码:

var fourd = new FourD(); // instantiationfourd.init('#selector', {width: 600, height: 350}); // initializationvar vertex_options = {  width: 5, // pixels  height: 5,  depth: 5,  color: 0x000000 // hex color};// or:var vertex_options = {  width: 5,  height: 5,  depth: 5,  texture: 'path_to,png'}// or:// leave out vertex options altogether.// default values will be used.var vertex1 = fourd.graph.add_vertex(vertex_options); // add a vertexvar vertex2 = fourd.graph.add_vertex(vertex_options); // add another vertexvar edge_options = {}; // currently not defined, but this is how you would pass them.var edge = fourd.graph.add_edge(vertex1, vertex2, edge_options);fourd.graph.remove_edge(edge); // this is why you keep those variablesfourd.graph.remove_vertex(vertex1);fourd.graph.remove_vertex(vertex2);
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论