Giter Site home page Giter Site logo

Comments (12)

ftripier avatar ftripier commented on June 11, 2024

This one's a gecko problem I'm afraid. Bug filed, however:

https://bugzilla.mozilla.org/show_bug.cgi?id=998502

In the meantime, I submitted a pull request for a hotfix into our internal repo that would apply a zindex equal to the the specified z translation on every surface.

from famous.

CharlesVoita avatar CharlesVoita commented on June 11, 2024

You also have to keep in mind that if the containing element has preserve-3d and is rotated, you must account for rotation; therefore you'd have to calculate based on a surface's distance from a global world point which would require some math. This isn't really an issue now for anyone interested in supporting IE, but may bubble up in the future.

from famous.

ftripier avatar ftripier commented on June 11, 2024

The final matrices applied to the surface should correctly represent the depth- they get multiplied internally by the browsers rendering engine against the containing elements projection matrix. Our scene graph isn't naive- a rotation matrix multiplied against a translation matrix will produce an output with consistent translation, and vice versa.

To clarify: we'd be mapping from the final matrix before we actually write it to the Surface's html element's internal styles, not as a sum of all z translations applied.

from famous.

CharlesVoita avatar CharlesVoita commented on June 11, 2024

Apologies!

from famous.

MylesBorins avatar MylesBorins commented on June 11, 2024

@ftripier is it safe to close this issue as it is fixed on internal, or should we leave it open until a more permanent solution is found?

from famous.

ftripier avatar ftripier commented on June 11, 2024

I'd like to leave the issue open in case Charles and/or the community have input down the line. This is a tricky problem, and my current solution is at best a hack.

from famous.

jperl avatar jperl commented on June 11, 2024

Chrome also has issues sometimes.

from famous.

dmvaldman avatar dmvaldman commented on June 11, 2024

@jperl do you have a perspective defined, or are you in a containerSurface?

from famous.

jperl avatar jperl commented on June 11, 2024

@dmvaldman Yes and yes.

from famous.

dmvaldman avatar dmvaldman commented on June 11, 2024

you may need to set a perspective on the containerSurface as well, unfortunately we don't expose as API for this yet. Can you try myContainerSurface.context.setPerspective(1000)?

from famous.

dmvaldman avatar dmvaldman commented on June 11, 2024

This should be fixed on the most recent release (0.1.2). Would love a confirmation!

from famous.

jperl avatar jperl commented on June 11, 2024

@dmvaldman I upgraded famo.us and tried setting the perspective on the containerSurface -- I still need to create the container afterwards for it to be overlaid. However when I try to reproduce this outside of our app I cannot :(. I wonder if it is because I am using meteor to render the div used in the surface. Interestingly it works on firefox and safari.

from famous.

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.