Openframeworks > 按每日计划动态更改(加载)图像

Openframeworks > Dynamically changing(loading) images on daily schedule

作为 x 用户的新手,加载动态媒体很容易,但我有一个项目需要更改 - 根据一天中的时间重新加载不同的图像。是否有可能有助于实现此目的的现有插件?

您可以使用https://github.com/bakercp/ofxTime to do some basic time calculations or if you have a icalendar-based schedule you can use https://github.com/bakercp/ofxICalendar which will give you ofEvents for each calendar event. Easier though may be to just use the built-in C++11 time functions (available in openFrameworks 0.9+) http://en.cppreference.com/w/cpp/chrono, http://en.cppreference.com/w/cpp/chrono/duration等。然后由您创建一些控制逻辑(if语句等)来确定当前加载的内容以及应该[=14=的内容] ] 根据当前时间加载。