Gif created by Bruno Ruchiga
Daniel Shiffman's code playing with Simone Giertz's Everyday Calendar.
From The Coding Train: Live from the Attic 2! Live Stream.
Original code available on Simone's GitLab under The Every Day Calendar Repository.
Code for Simone Giertz's Every Day Calendar experiments
License: MIT License
Gif created by Bruno Ruchiga
Daniel Shiffman's code playing with Simone Giertz's Everyday Calendar.
From The Coding Train: Live from the Attic 2! Live Stream.
Original code available on Simone's GitLab under The Every Day Calendar Repository.
scanForTouch() apparently takes 100 milliseconds, according to the source code:
// This whole procedure should take about 100 milliseconds
bool EverydayCalendar_touch::scanForTouch(){
If that's accurate, the best frame rate you could possibly hope for would be 10FPS even if the rest of the code took no time.
Find a fast way to check for touch - interrupt-based?
instead of scanForTouch every frame, do it only one in 5 or one in 10 "frames". However, that will give us an unpleasant irregular frame duration. (e.g. 4 fast frames, 1 slow, etc)
Model two modes: a "pattern programming" mode and a "run simulation" mode. In pattern programming mode, you'd scanForTouch every frame to be nice and responsive to touch - we don't care about the slow frame rate when programming patterns.
In "run simulation" mode, however, only scan for touch rarely (e.g. once every 5 seconds?) - the user will have to hold a button down for a while to get out of simulation mode and back into pattern programming mode.
This would still give us one slower frame every 5 seconds but hopefully that's not too noticeable.
Maybe check only one key to get out of "run simulation" mode, if it's significantly faster to check one key for touch than all.
I created a pull request and explained this more deeply in #5. I guess more open-source-i-an way was to create an issue before sending a PR so here it is.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.