anvaka / ngraph.pixi Goto Github PK
View Code? Open in Web Editor NEWPIXI.js graph renderer
License: MIT License
PIXI.js graph renderer
License: MIT License
The label will ever be implemented?
I upgrade packages.json to last PIXI.
Build clashes with eventify.
Commenting out eventify(publicApi);
in physicsSimulator allows to build.
What does eventify do?
Should I expect which differences ?
In #1 examples shown how to create labels and add thumbnails to nodes.
I was able to customise nodes by creating sprite of thumbnails when initialising the node.
However, with this design I have to wait that images are downloaded, and so they are no more asynchrously attached.
Could you suggest a better design so to that the graph can be rendered without waiting, and thumbnails are added once ready?
I found a bug in initPhysics if there is a graph with no links.
To reproduce it, replace:
var graph = require('ngraph.generators').balancedBinTree(6);
with:
var graph = require('ngraph.generators').balancedBinTree(6);
graph.clear();
graph.addNode(1);
same problem with :
var createGraph = require('ngraph.graph');
var graph = createGraph();
graph.addNode(1);
Instead:
var Viva = require('vivagraphjs');
var graph = Viva.Graph.graph();
graph.addNode(1);
works fine and you can then pass the graph to Pixi as well.
I could not spot the reason of the error, I tried my best.
I just found that a node object is initialised with properties:
node.id
node.data // stuff
node.links = null
and maybe the node.links = null clash with the loop to compute springForce of missing objects (should it be links = [] ?)
bundle.js:3142 Uncaught TypeError: Cannot read property 'length' of null
at nodeMass (bundle.js:3142)
at updateBodyMass (bundle.js:3111)
at initBody (bundle.js:3044)
at bundle.js:3022
at Object.objectKeysIterator [as forEachNode] (bundle.js:3992)
at initPhysics (bundle.js:3021)
at createLayout (bundle.js:2869)
at module.exports (bundle.js:58)
at Object.module.exports.main (bundle.js:14)
at onload ((index):11)
Is there any way to change the renderer background color? Looking at the source, I found the background
property in the settings object ⬇️
Lines 8 to 10 in 6322615
backgroundColor
property of the renderer could fix this issue ?
var renderer = PIXI.autoDetectRenderer(width, height, null, false, true);
+ renderer.backgroundColor = settings.background
BTW, thanks for this nice integration! 😃
Здравствуйте,
хочу проинформировать вас, что планирую развить вашу разработку ngraph.pixi
.
В частности мне нужно решить задачу отрисовки больших графов (> 5К узлов) с приемлемым FPS и при этом иметь под рукой достаточно широкие возможности по рисованию. Пока выбор остановился на Pixi, как вроде бы единственного средства по работе с граф. примитивами на WebGL. В текущей реализации ngraph.pixi
на больших графах FPS крайне мал и у меня он в районе 5. Причем мне показалось 3-я версия даже чуть медленнее. Тогда как на Sigma.js ничего не тормозит, но там дальше узлов в виде кружочков не уедешь - придется рисовать все с нуля на голом WebGL.
У меня пока такие планы:
ParticleContainer
, при этом нужно, чтобы при зуме они перерендеривались в спрайты на более высокое разрешение. При зуме можно использовать throttle
или debounce
техники.Пока форк лежит вот здесь https://github.com/fobdy/ngraph.pixi. Я там несколько ранее обновился до 3-ей версии Pixi. Если смотреть на отличия от вашей версии, то я добавил поддержку pan и antialias. Т.к. pan вроде после обновления до v3
ломается. Еще правда с mouse origin надо разобраться - он все в центр зумит, а надо в точку относительно мышки. Еще не нравится какое-то дерганье при зуме - надо посмотреть, чего изменить там.
Если у вас есть какие-то советы или рекомендации дабы направить меня в нужное русло, рад буду услышать.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.