[Interop-dev] GSoC 2017 netjsongraph.js progress report

Xiang Gao (spam-protected)
Sun Jun 25 21:33:18 CEST 2017


Hi, all


Last week I finished below tasks:

- added tests using Jest(https://facebook.github.io/jest/ <https://facebook.github.io/jest/>), why choose this framework, I read
    - http://vanwilson.info/2016/08/lets-compare-javascript-testing-frameworks/ <http://vanwilson.info/2016/08/lets-compare-javascript-testing-frameworks/>
    - https://gziolo.pl/2017/06/17/picking-jest-over-mocha/ <https://gziolo.pl/2017/06/17/picking-jest-over-mocha/>
    Jest can mock everything to make test easy. I’m learning to use it.
- added function to fetch data. In order to implement this function, I package a "promisify" function which make function become a promise.
- added metadata panel. Template string in ES6 is the simplest method to add document into HTML.
- added theme switch function. Originally I would like to use "CSS-in-JS" or "CSS modules” to solve this problem, but found that it is more simple to directly use CSS class name implement this.
- added zoom function. I think there is much room for improvement in this function. Current zoom is along the camera-object direction, and I want to make it like this:
    - http://bl.ocks.org/nitaku/b25e6f091e97667c6cae <http://bl.ocks.org/nitaku/b25e6f091e97667c6cae>
    - https://threejs.org/examples/#misc_controls_trackball <https://threejs.org/examples/#misc_controls_trackball>
    I’ve read a lot d3 and three.js docs to learn how to implement it, and it should calculate the camera matrix according to transform matrix, but I have been calculated for a long time, still have not right transformation…excuse my poor math.
- added autosize.

One problem I’ve met is test failed when import object with WebGL renderer. I’ve send a issue: https://github.com/facebook/jest/issues/3905 <https://github.com/facebook/jest/issues/3905>


Next week to do:

- improve zoom and pan function
- supplement event handling
- more option backward compatible
- more tests


Xiang



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.funkfeuer.at/pipermail/interop-dev/attachments/20170626/56a79b65/attachment.html>


More information about the Interop-dev mailing list