Slideshow with animation (example implementation) #1143
mgabor01
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I added basic animation capabilities to the slideshow script, freedraw elements are drawn, rest fades in. I am sharing it in case this has any useful ideas.
excal_anim.mov
Currently I use distinct rectangles as slides instead of a continous arrow. The main idea of the script is to add labels to the elements in a way that slides and their animated elements can be connected. And there is a control-text that has the order in which the slides should play, and some information about their corresponding animations.
As my knowledge of excalidraw and javascript is very limited I only use the link property of an element to add labels.
![image](https://private-user-images.githubusercontent.com/129623874/240049728-eef374e9-a806-4f1b-b87d-64d6547cd619.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM3OTYsIm5iZiI6MTczOTI2MzQ5NiwicGF0aCI6Ii8xMjk2MjM4NzQvMjQwMDQ5NzI4LWVlZjM3NGU5LWE4MDYtNGYxYi1iODdkLTY0ZDY1NDdjZDYxOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODQ0NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NGI4YTM2MjZlNDAyMjY5ZjY0ZTgyZmRkNzQ2N2I2Y2QzN2Q0NjFkODYyNGU0MWI2NzVmZmEyYTkzMzgxNGE2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.FVyeXyT8EuoKU30CgqHS-zvnoQd_hMb_pTp6E2qBaQU)
![image](https://private-user-images.githubusercontent.com/129623874/240050133-9e4ed61d-182b-4458-bbb8-06ba873433cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM3OTYsIm5iZiI6MTczOTI2MzQ5NiwicGF0aCI6Ii8xMjk2MjM4NzQvMjQwMDUwMTMzLTllNGVkNjFkLTE4MmItNDQ1OC1iYmI4LTA2YmE4NzM0MzNjZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODQ0NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNmY5ZGE5NGUyY2IyYWJiZDcwOTM4ZDNhY2RhNTM2MjcwNTYxNGZmMmI0YTZlNjc5MjU5ODZhYjc4NzAwN2U1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.4suq0QNkLXgGMMWNd2FDyoy3ByA6avCQr0yGxqfvQYE)
![Screenshot 2023-05-22 at 23 53 25](https://private-user-images.githubusercontent.com/129623874/240052149-964e971b-3249-4e52-86d4-45476bae016f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM3OTYsIm5iZiI6MTczOTI2MzQ5NiwicGF0aCI6Ii8xMjk2MjM4NzQvMjQwMDUyMTQ5LTk2NGU5NzFiLTMyNDktNGU1Mi04NmQ0LTQ1NDc2YmFlMDE2Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODQ0NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZTczY2UzY2YxZTM0MDgyMjI5OGI0MjMzNWMwZDI0MWQzYWVjNTJiNWJjMWYyODE1M2U5OGJkMTdhNWM3MmIyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.T95MFWmS9tI77oXpSS3m5CbfwjSfYPar8S4QjVhjxwc)
s1 is the label of the first slide, a 1 1 is the first animation of the first slide. The s1 :a means s1 will be the first slide, and play all its animations when the slide is active. (It is done like this for easy slide reordering, and more control over animation and slide order, but there are a lot of possibilities like using groups - same group for slide and corresponding elements etc.)
Issues
There are issues, such as the image flickering when drawing other elements as it can be seen on the vid.
Zsolt, is this even the right way to change end redraw elements?: with sleep and ea.addElements?
Notes
the camera movement is the linear one that I posted previously, but of course that has no relevance.
If any of this is interesting I can post/put in more details or the code, but it is less then fancy...:)
(Zsolt, this plugin is remarkable!)
Beta Was this translation helpful? Give feedback.
All reactions