rmkit-dev / rmkit

| remarkable app framework | https://rmkit.dev
https://build.rmkit.dev
356 stars 32 forks source link

[new app] Meditation App for Remarkable Tablet #1

Closed garyzhuge closed 3 years ago

garyzhuge commented 4 years ago

Hi, Thanks for creating this framework! I am interested in porting this animation onto my remarkable as well as adding a timer for a meditation app for an animation app. However, how would I create the expanding and contracting animation effect? Looking at the documentation could you potentially chain draw_bitmap with a 3-second delay of pictures of different sizes? Or is there a better way to do it? animation

okayzed commented 4 years ago

You can try the draw_bitmap approach, i'd like to see if it works! I think you can get a smooth animation if you call draw_circle and progressively expand a circle or otherwise draw something simpler. I will try out animating a simple image, as well and post back with results.

garyzhuge commented 4 years ago

Also what is the .cpy file format? This code is c++ right?

On Fri, Aug 28, 2020, 8:29 PM okayzed notifications@github.com wrote:

You can try the draw_bitmap approach, i'd like to see if it works! I think you can get a smooth animation if you call draw_circle and progressively expand a circle or otherwise draw something simpler. I will try out animating a simple image, as well and post back with results.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rmkit-dev/rmkit/issues/1#issuecomment-683202285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUF7T2GHQKWUMZB2VCAK5TSDBDXDANCNFSM4QOOYMQQ .

okayzed commented 4 years ago

https://github.com/raisjn/okp/blob/master/USAGE.md

yes, this is C++. cpy is semantic sugar on top of C++, okp is a pre-processor that translates .cpy files to .cpp and compiles them

you'll need to pip install okp (and have gcc as well as the cross compiler for ARM), but that's about it, iirc

okayzed commented 4 years ago

https://github.com/rmkit-dev/rmkit/blob/master/src/animation_demo/main.cpy

i included a animation of image and animation by drawing circles. the image animation is not so great, but circle animation is fine. if you get it running, make sure to run top on the remarkable to see how its doing on CPU

okayzed commented 4 years ago

by the way, another conllaborator mentioned that you don't need to use cpy - you can use rmkit.h as a single file you include in a cpp project

raisjn commented 3 years ago

it would be interesting to finish the animation_demo that's checked in and package it in toltec, maybe adding a timer or breathing exercises.