Comments (2)
Hi @paulbatum thanks for the report. This is a tough issue that I probably won't be able to attack in the near term, so for now I'll give a technical brain dump for anyone who might be interested.
I think this could possibly be fixed by making a smarter rendering algorithm.
The way rendering works now, it renders the recursion to a certain depth every frame (i.e. every time there is a change, for example when you're dragging a shape). I do this because if it rendered past that depth, the UI would start becoming unresponsive. The shapes I calculate for rendering at this stage are also used to calculate if the mouse is hovering over a shape (using Canvas API's isPointInPath).
While the UI is idle, the renderer will keep rendering the recursion (on a superimposed canvas layer). This is why you'll see that when you drag something around and then let go or pause, more recursion will happen. However, because there get to be lots of shapes in this stage, I don't check to see if the mouse is over these further rendered shapes. (You'll see all these shapes grey out when you hover the mouse over an originally rendered shape.)
Usually these shapes end up being really small so one wouldn't want to manipulate them. Additionally, there are some unsolved issues with the numerical constraint solver that make manipulating shapes very far down in the recursion tree problematic.
But I think this could eventually be fixed. The renderer would have to be smarter about what parts of the recursion tree are worth rendering and testing for mouse interaction. This would improve performance in addition to fixing the problem you mention. Also, some of the constraint solving would need to be revisited to deal with manipulations deep in the recursion tree.
from recursive-drawing.
This might happen less if the default scale of a newly-added recursion was .999.
Are there any cases where you want to scale >1? I always made them smaller.
from recursive-drawing.
Related Issues (7)
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 recursive-drawing.