Git Product home page Git Product logo

framer-motion-theatre's People

Contributors

andrewprifer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

framer-motion-theatre's Issues

Gizmo event listeners should be attached to gizmo, not selectionTarget

We are attaching mouse listeners for hover and click directly to the selectionTarget for now, mainly so that we can receive these events even when the gizmo is not active. This wouldn't be necessary if we used a more robust system that'd be aware of hover even when the gizmo becomes active during a hover. Attaching these listeners to the gizmo would allow us to block pointer events to the element so that when the gizmo is active, users can hover over them without activating the regular behavior of the selectionTarget. We can't do this as long as we need pointer events for our own listeners.

Create dev / prod versions using compile-time constants and tree-shaking

Currently we simply have two different entry points, 1 for dev, 1 for prod. Use the define config property and tree-shaking instead. Have a conditional config we can run twice for each target. This will scale better to when we want to alter things deeper in the import hierarchy anyway, like stripping UI code from createThreeGizmo().

https://tsup.egoist.dev/#conditional-config
https://tsup.egoist.dev/#compile-time-environment-variables
https://tsup.egoist.dev/#custom-esbuild-plugin-and-options

If treeshaking is not working, try the treeshake option which runs Rollup on the output:
https://tsup.egoist.dev/#tree-shaking

Use getBoundingClientRect and render gizmos on a different layer

This would have the advantages that

  • Events wouldn't be blocked by overlapping elements
  • Outline of the gizmo wouldn't be distorted by scaling
  • Gizmo won't be removed by rerendering the children of the selection target

Disadvantages:

  • Rectangles only, won't be conforming that well to the shape of the target, e.g. in the case of skew or rotations
  • Maybe slower?

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.