Giter VIP home page Giter VIP logo

Comments (2)

mbostock avatar mbostock commented on April 28, 2024

I’ve reproduced this here:

https://bl.ocks.org/mbostock/98edae5ce16c3400b5bcd180653a3717

The way transform interpolation currently works is that it decomposes the start and end transform into a standard matrix representation, and then uses the CSS Transforms Module Level 1 specification for interpolating 2D matrices.

However, what we should be doing is following the specification for interpolating transforms, not matrices; the latter only applies in the general case when the start and end transform have different structure. This will require looking at the transform as a series of transform functions, rather than immediately decomposing it.

from d3-interpolate.

Karolusrex avatar Karolusrex commented on April 28, 2024

Great care has to be taken when implementing this feature, as the transformation lists might look different at start and end, but they can still be interpolated by the default value that is implied.

For example, interpolating between rotateZ(90deg) and scale(0.5, 0.5) would then be the same as interpolating between rotateZ(90deg) scale(1, 1) and rotateZ(0deg) scale(0.5, 0.5).

The user could also specify a transformation matrix on either of side of the transition, in which case it probably makes sense to reinterpret everything as matrices.

from d3-interpolate.

Related Issues (20)

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.