Created by Pavel Klavík
Preparation of replacing react-motion with animation generated by solving second-order differential equations of the spring motion.
We have to animate u towards w such that w rotated is mapped to u. So we apply inverse rotations in the opposite order.
We have rotation ordering R1,R2,…,Rk and position u as :unit/pos. The displayed position is RkRk-1...R2R1u. When Rt is finished, we want to remove it from the sequence of all rotations and apply it directly towards u.
Should not take that long and we won't have to deal with permuting rotations.
Otherwise we would have to continue unit animation after rotation, which itself would have to be rotated.
Zero-sided element placed at :unit/pos and :unit/z.
But we can just shift it for another target position, so it should not be a problem.
Just a transparent box of its size. Overflow is set to hidden to deal with larger contents.
But is it within React motion???
Takes the rest of size available in the unit.
Just title background which is animated. Overflow is set to hidden to deal with larger titles.
It changes as the unit is opened.
We only use this class for title-bg, the title text is always displayed with the correct title height.
Of zero size positioned in the middle of currently visible content.
Double eigenvalue.
Of zero size positioned in the middle of title background.
Fade-out for this. Used for both title and content.
Starts when fade-out is 80% done. It should already be bearly visible, so shrinking the unit little bit should not look strange.
It's width and height changes.
The new unit size should be pretty much ok, so we can start fade-in new content.
Fade-in for new content.
http://www.ambrsoft.com/CalcPhysics/Spring/SpringData.htm
c^2-4k = -700
We should probably just increase the value of damping to make it feel better. Also it should be faster than it is currently.
A = s
-(c/2)*A+B = v,
so B = v + cs/2
c^2-4k = -300
c^2-4k = 400
It moves quite slowly towards the target.
https://medium.com/@dtinth/spring-animation-in-css-2039de6e1a03
e^(ct) = 1
sin(dt) = 0
cos(dt) = 1
Where a=-c/2 and
We are sending all initial information about canvas, including pos, zoom, size, etc.
For unit tracking, presentations, etc.
We are sending new :canvas/pos and new :canvas/zoom.
We are sending new :canvas/width and :canvas/height.
Whether to set the frame once after the change. Maybe we can just set canvas directly, not calling set-frame function.
We automatically check whether it should be set repeatedly.
Sets bbox of the SVG element and the wrapping div element.
Map from percentage to keyword/vector of Re-frame event.
Seems quite broken in Chrome, so a different solution will be likely needed:
http://hoffmann.bplaced.net/svgtest/index.php?in=attributes#pathd
We need to communicate changes in canvas.
New values are stored and style for #root-map is immediately changes.
Length of the entire animation.
By calling (system-time) at the animation start.
A keyword or a vector of Re-frame event which runs when animation is finished.
Map from percentage to keyword/vector of Re-frame event. It is called approximately, based on computed values.
https://codepen.io/jorgeatgu/pen/bEEemM
This should be a normal function, not an anim-effect. It will also cause changes changes in values of animated objects.
As fast animation is done? Or almost done? It should not take too long, otherwise OrgPad will seem slow.
Contains all informations about a single animation.
Optional arguments capping the values. Used when outputting current-value and also in frame computation. Not used for source and target values.
Based on a element for which animation occurs, so it either will be a keyword for special elements like side-panel, or a string like "unit-<id>" for unit animation.
A map keyed by profile id.
Computed from profile or given directly.
Do we want to keep Re-frame style architecture, so the entire db is stored under the key :db, so other keys are free to run side-effects?
Another input should be system-time and all inputs of the function.
The function frame-anim/dispatch is passed event described either by a keyword or a vector starting with the keyword. This keyword is used to dispatch an event multi-fn.
A map from param ids to params map, containing information for animation of each param which are independent.
Id of the used spring profile.
This value is only used when there is no ongoing animation for this :anim/id.
A keyword representing type of the spring:
It is no longer animating just canvas and also fast animations is a confusing name. Frame-animations are much more descriptive since we animate everything frame by frame.
In case of underdamped spring, we store -c/2 and delta which are real and imaginary parts of an eigenvalue.
Since Chrome is stupid, so changing a CSS class causes the events such as on-mouse-over or on-mouse-out to be randomly called.
We should also update positions of canvas/unit/link to its final position, since it won't happen within set-frame! anymore.
The value to which the param should be animated.
multipliers A and B in the equation
We have all paths defined. For each path, we have assoc, get and update. They will be used as anim-db/get-unit, etc.
Combines multiple different spring types together. The resulting value is created by multiplying the values together.
Combines multiple different spring types together. The resulting value is created by summing the values together.
Source and target values are computed for totals, and also :anim-param/from and :anim-param/to, by summing or multiplying the spring targets together.
There is an extra parameter :anim-param/springs which is a map from :spring/id to anim-param map containing from, from-velocities, to and other anim-param values.
And updating it should just update innerHTML instead of adding and removing it. It will be faster.
For multispring params only, animates the total value of the anim-param towards new-to-value while changing the value of the spring given in the last component and preserving the other spring targets.
Likely at least whether requestAnimationFrame function is running right now, maybe a few others??
Which link-ids are updated by dragging the given set of all units.
Animates the anim-param to its target value increased by new-to-value.
Same as :anim-param/diff, but uses the current value instead of the target value.
Either the passed :anim/current-time, or (system-time) at the beginning.
Animates the anim-param towards new-to-value.
For multispring params only, it describes which spring is altered.
If so, run anim-map/done.
Store them in anim-param maps.
With respect to target-type and the given spring.
Sets the value immediately without any animation.
Each target is a vector consisting of up-to four components.
https://jakearchibald.com/2021/dom-cross-fade/
https://doi.org/10.1145/1390156.1390191
For pages, we have opacities
such that
and
All solutions form a probability simplex, for example for
, it is a triangle in
.
We can just store all anim-effects state. After recording is done, animation engine will be stopped and rewinding will work with respect to the rendering.
It switches the current state towards and
.
The previous state and the current velocity is preserved.
For example, while switching from 1 to 2, a switch to 3 begins. Or the unit will start closing.
Probably happens more frequently than one would expect.
Animates :unit/content-opacity towards 1.
Applies opacity on unit DOM node, but not on just-image images/hyperlinks.
Animates :unit/content-opacity towards 0
It might fade-out little bit before fading in, but this is likely visible only for very similar page content.
We would have to ensure that all page-opacities always sum up to 1. This might be tricky. We could always animate at most k-1 opacities and compute the last opacity so that they add to 1.
Something written right here and more.
And some other page content is here as well.
And another point is here as well.
Some text written inside the cell so it has a page content.
And with some list: