Giter VIP home page Giter VIP logo

Comments (4)

frivoal avatar frivoal commented on August 16, 2024

Ahead of time seems simpler. Do we have any other animated image type whose intrinsic size/ratio can change on each frame? If yes, maybe within the callback is fine, but that seems to introduce unnecessary complications for little to no benefit.

from css-houdini-drafts.

tabatkins avatar tabatkins commented on August 16, 2024

Yes, we do have such an image type - crossfade(), when given two images with different intrinsic dimensions, transitions those dimensions as its own.

So we do indeed need some way to declare that your dimensions can change. On the other hand, the 99% case is dimensions not changing.

How about:

  • Add a "dimensions" key to PaintInitializionOptions, which accepts a (PaintDimensionsDict or DOMString). PaintDimensionsDict should be a dict with width/height/aspectratio keys. The accepted DOMString is "dynamic". Omitting implies no dimensions.
  • Add a "sizeCallback" key to PaintInitializationOptions. It takes the same params as paintCallback, and is expected to return a PaintDimensionsDict. We call it any time we call paintCallback (before or after doesn't matter, it's just important that they always be called together). It is only called if you passed "dynamic" to the "dimensions" key.

from css-houdini-drafts.

frivoal avatar frivoal commented on August 16, 2024

@tabatkins, that sounds reasonable.

from css-houdini-drafts.

bfgeek avatar bfgeek commented on August 16, 2024

Moving this to lvl-2 at the moment as per f2f. We can revisit once we've had some implementation experience. Specified that they have no intrinsic dimensions in 2b7a93b .

from css-houdini-drafts.

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.