Giter Club home page Giter Club logo

Comments (10)

forresto avatar forresto commented on September 10, 2024

wheel zoom
react-svg-zui

from dataflow-prototyping.

forresto avatar forresto commented on September 10, 2024

zui prototyping

svg-icon-zui

from dataflow-prototyping.

subtleGradient avatar subtleGradient commented on September 10, 2024

Consider using react-ART? https://github.com/facebook/react-art

from dataflow-prototyping.

forresto avatar forresto commented on September 10, 2024

Just prototyping with the one new thing + vanilla svg. But I'm interested to see if ART+canvas can speed stuff up to 60fps. From working with vanilla canvas 2d, I imagine that the number of draw commands would be fine. Seems like React's functional structure will make it easy to switch.

The big constraint for us is clicking on overlapping curves, and SVG makes that easy. Somebody said art might do that level of hit testing... @subtleGradient know if that's right?

(SVG Font Awesome looks pretty good in there too, and css is easy... but we'll go canvas if it's worth it.)

from dataflow-prototyping.

subtleGradient avatar subtleGradient commented on September 10, 2024

ART can render to SVG, canvas or VML. I'm not sure about the hit testing. @sebmarkbage How's ART for hit-testing?

from dataflow-prototyping.

sebmarkbage avatar sebmarkbage commented on September 10, 2024

ART does hit testing the same way SVG does. Uses isPointInPath.

Also working on a different hit testing that can trace nearest path without actually hitting it.

from dataflow-prototyping.

sebmarkbage avatar sebmarkbage commented on September 10, 2024

Oh actually, we may not handle hit testing on strokes. Should fix that.

from dataflow-prototyping.

subtleGradient avatar subtleGradient commented on September 10, 2024

You'd probably want to expand the stroke's hit area far larger than its visible pixels.

from dataflow-prototyping.

sebmarkbage avatar sebmarkbage commented on September 10, 2024

People tend to do that by doing a fat invisible stroke. That's a naive solution though because when you have overlapping lines, the nearest line to your pointer may not be the top invisible one. Which gives a bad experience. That's why we don't use this technique and don't have a strong need to support hit testing on strokes.

Instead, I want to release the hit testing plugin for React that tracks the nearest line rather than an invisible hit area. That's a much better solution.

It works like this http://bl.ocks.org/mbostock/8027637 but uses a more efficient algorithm for common use cases.

from dataflow-prototyping.

forresto avatar forresto commented on September 10, 2024

We already do something like that with our svg edges, and it works well for
our case.
On Jan 9, 2014 5:45 AM, "Thomas Aylott" [email protected] wrote:

You'd probably want to expand the stroke's hit area far larger than its
visible pixels.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-31900520
.

from dataflow-prototyping.

Related Issues (3)

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.