Comments (4)
I think there is something we can do with the initial mount but updating the inner scene whenever the DOM element that it is mounted into changes size is something that is a bit trickier. Since the DOM does not give resize events for non body elements, we would have to bake this pretty deep into the implementation. I think for now, the fact that is is possible is good enough while we talk about how cleanly we could implement this.
One question I have is what usecase are you using nested scenes for? Where do you see the benefits besides just adding a new subtree to the scene?
from engine.
@michaelobriena The linked example is the use case. I'd like to render a React component to a DOM element managed by famous but this React component can contain one or more famous scenes.
It allows me to reuse existing React components. More importantly, it provides developers an option for progressive enhancement with famous.
from engine.
What's the status on this issue and PR?
It appears a fix was made for the events, but curious whether a solution was also put forth regarding this issue.
from engine.
@pilwon @FarhadG, @alexanderGugel is working on a solution for the ability to get the DOM element associated with a Famous Node. This will be done via event hooks in the DOM renderer, not as a method on the component itself.
We cannot have nested compositors update their size for free since an html element resizing does not trigger an event and it is not something we want application side since it is a use case we do not want to support for a variety of reasons (Breaks in worker code, breaks in server side code, DOMElements are pooled so it isn't guaranteed to be correct forever, multiple scenes breaks the compositing abstraction). The event hooks I mentioned will give users the knowledge needed so they can trigger actions to occur when appropriate for their particular integration.
I would like to close this for now because any special casing of nested scenes is not something we are looking to handle at the rendering engine level.
from engine.
Related Issues (20)
- [question] How does Rotation component's set method work (from Position#set)? HOT 4
- [BUG?] Paths not being tracked properly HOT 13
- [question] What's the proper way to clean up nodes? HOT 2
- [BUG] when Animations with a callback is Paused, does not pause the callback HOT 2
- [Bug?] onUpdate fires continuously despite not calling requestUpdate or requestUpdateOnNextTick HOT 2
- [question] Render Size DOM wrapps the text in 2 lines HOT 6
- Flickering on IOS
- [question] what is the correct way to MOVE a subtree of Nodes to elsewhere in the scene graph?
- Bug with Materials
- [question] how does one test that the PhysicsEngine has converged?
- why DomElement not remove form dom tree when removeChild() HOT 2
- Change URL to Famous.org
- publish Famous/engine to cdnjs HOT 1
- Famous Engine - MOST STABLE RELEASE HERE HOT 36
- Program events document still miss
- Is the repository deprecated? HOT 2
- Is Famous Engine & Framework Dead ? HOT 3
- Slack sign up not working
- dead
- #THEREISNOSPOON
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine.