Coder Social home page Coder Social logo

thoughtspile / grafar Goto Github PK

View Code? Open in Web Editor NEW
574.0 11.0 22.0 12.08 MB

Reactive multidimensional math & data visualization for the web.

Home Page: http://thoughtspile.github.io/grafar/

License: MIT License

JavaScript 14.85% HTML 27.72% TypeScript 57.43%
visualization webgl math

grafar's Issues

Tree-shake lodash

We rely on lodash object (import * as _ from 'lodash'), which brings a lot of unneeded code to the project. It would be nice to either use native equivalents, eg _.extend -> Object.assign, or import get from 'lodash/get'. import { get } from 'lodash' would not cut it yet, since we don't have a es-module build.

Here's a list of 10 files currently using lodash

Update three.js

Three.js is currently at r128, while we're stuck with r81. It would be nice to upgrade for better performance and bugfixes. However, since three has probably had many breaking changes in the last 5 years, it might be best to go slow and upgrade gradually. Also see three's releases.

No hurry though, as the current version still works.

Show error message when WebGL is not supported

Currently, grafar (threejs, to be precise) explodes in runtime when a browser does not support WebGL. Even though WebGL is well supported, an error message should be shown to the user. We should also allow custom error messages via a global setting.

Middle button pan?

This project looks amazing.

Enabling a middle button click to pan would feel super intuitive for those who regularly use popular 3d software.

Pan-by-default controls on 2D panels

2D panels use the same OrbitControl as 3D ones, but with fixed angle โ€” this means that they can only be scaled, not moved around. Panning would make much more sense as the default behavior

Reanimate examples

The /examples folder has a ton of examples, but some are plain broken, some import grafar from the wrong place, and some are written for an older version. Moreover, some examples so similar there is no value in having both of them around. Once the examples are cleaned, we could turn them into a gallery a la d3 or threejs

This is a great place to start if you want to play with grafar and help the library move forward.

Add test infrastructure

I've been neglecting unit tests for far too long, and now it's time to fix this. It would be cool to add plain jest tests!

Touch-friendly panel controls

The orbit controls on 3d panels interfere with scrolling on mobile, as noted in the comments of the introductory hn post. It would be great to use some less invasive orbit gesture on touch devices, like a 2-finger pan.

Support different cameras for rendering

Grafar uses THREE.PerspectiveCamera for rendering, and there is no way to override it. For some cases OrthographicCamera might work better.

Proposal: accept { camera: THREE.Camera } option in grafar.panel, defaulting to PerspectiveCamera

related: #2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.