|
Steampunk Clock Calendar Yahoo Widget part 13 |
|
|
|
Friday, 26 November 2010 |
|
I have found photoshop to be a great boon when designing the graphics
for your widget, but note that if you keep all your layers unflattened
on a complicated image like the one for the clock/calendar then it
starts to use a very large of memory. In fact once you have used the
photoshop yahoo widget converter tool it may best to work to extract and
work on portions of the image as seperate PSD files.
The animation - Without the pendulum operating, the clock works at
approx. 5% of cpu usage with the continuous rotation of the second hand
on a one second timer. This is trivial cpu usage. However, as soon as
you turn on the pendulum the cpu usage jumps significantly due to the
continuous nature of the pendulum and the small timer interval it uses
to achieve a smooth animation. I have tuned the pendulum so it now uses
very little cpu in comparison to it's original incarnation. This was
done by removing the pendulum bar altogether and reducing the angle of
the pendulum swing. I also have some alternative code form a well-wisher
which I will try!
I have added some extra graphical elements in the dropdown help
canvases, the brass switches, there is one more graphical element to add
and then we are done with the clock/calendar MkI.
Tasks to complete the widget:
1. The H button - Move the open & close code to a separate function
2. The A button - give it a slide out animation like the H
3. The M button - check it mutes chimes
4. Clock chimes 24 on the 24 hour calendar! - fix
5. The sliderset is disconnected from the cable, reconnect it
6. Check the C button actually mutes chimes
7. Add a C button staus check to the startup
8. Add an alarm indicator flag to the right hand side
9. Calendar/clock rotation to be animated on slider move
10. Implement an alarm System for storing up to five alarms
11. Add appropriate sounds for mechanisms
12. Auto-turn off for pendulum when it reaches 40% cpu and back-end
configuration too
13. New code for pendulum, try it and test
14. Use JSlint to test code
15. Remove unnecessary, unwanted code and test
16. More valves and cables behind the slider.
16. Release MkI!
Noticed a couple of things, firstly a limitation in .js, there is no
pause function to pause between lines of code, there is only a sleep
function which puts the whole program to sleep, this pauses the pendulum
which is not a good thing.
Secondly, deleting a widget from the dock bar deletes the associated
.kon file so if you are testing multiple versions you cannot delete them
from the dock bar without backing up the .kon file first.
Sounds - A good source of sounds is www.freesounds.org. they don't have
everything but they have a lot and many sounds that can be adapted. On
the newest version of the widget there are some new sounds, the bell
rings, the buttons 'clunk' and the slider gives out some electrical
interference when it moves.
You will note the new look of the widget in the image below, it is
looking significantly different from the idea I started out with. I have
realised (not for the first time) that working in collaboration with
others is a way to stimulate thought and come up with new ideas.
The new look is below in the previous blog.
|
|
Last Updated ( Friday, 16 September 2011 )
|