The following parameters are supported:
In VRSmarty xml file:
| xmlFile | xmlFile="myClock.xml" | plugin control XML file, default=panoclock.xml |
Plugin attributes:set with spot_id.content.name=value
| timeZone | timeZone='+2' | change time zone |
Plugin methods: call with spot_id.content.name(value)
| start() | start() | start stopwatch |
| stop() | stop() | stop stopwatch |
| reset() | reset() | reset stopwatch |
Plugin external xml file:
| In <panoclock> tag: |
| interval | interval="500" | interval(ms) between clock updates, default=1000 |
| stopWatch | stopWatch="1" | when you want to use the plugin as a stopwatch |
| timeZone | timeZone="+2" | use only when you want the clock to show the |
| | time in another time zone and not local time |
|
| In <clockface> tag: |
| url | url="img/clock20.png" | file containing the clock face image |
| center | center="232:163" | the coordinates of the clock face center point, |
| | default is center of image |
|
| In <hourhand> tag: |
| url | url="img/hourhand20.png" | file containing the hour hand image |
| offset | offset="27.5" | the vertical distance between the centerpoint of |
| | the image and the rotation point |
| center | center="283:396" | the coordinates of the hour hand rotation point |
| | in clock face image, default is clockface center |
|
| In <minutehand> tag: |
| url | url="img/minhand20.png" | file containing the minute hand image |
| offset | offset="27.5" | the vertical distance between the centerpoint of |
| | the image and the rotation point |
| center | center="283:396" | the coordinates of the minute hand rotation point |
| | in clock face image, default is clockface center |
|
| In <secondhand> tag: |
| url | url="img/hourhand20.png" | file containing the second hand image |
| offset | offset="27.5" | the vertical distance between the centerpoint of |
| | the image and the rotation point |
| center | center="283:396" | the coordinates of the second hand rotation point |
| | in clock face image, default is clockface center |
|
| In <reflection> tag: |
| url | url="img/reflect20.png" | file containing the face reflection image |
| alpha | alpha="65" | the transparency of the reflection image |
|
NOTES:
If you want to design your own panoclock, this is how it works:
The panoclock consists of up to
five images, from top to bottom:
face reflection (optional)
second hand (optional)
minute hand
hour hand
clock face
The clock hand images must show the hand in a
vertical position pointing at 12 o'clock, and
if you want to include a reflection image, it must have the same size as the clock face image to be
properly aligned.
You can also change the displayed
time zone at any time by setting the timeZone='...'
attribute. If you want the clock to display local time, you don't have to specify any time zone initially.
Examples:
| timezone="0" | London |
| timeZone='+3' | Moscow |
| timeZone='-5' | New York |
| timeZone='+5:30' | New Delhi |
| timeZone='' | local time |
The plugin can detect and adjust for
daylight savings time (DST) when using local time. But as
the rules for using DST varies from country to country it would need a large lookup table for
other time zones. Therefore, if DST is in use locally, it will also be applied to all other time
zones.
When the plugin is used as a
stopwatch, it is handled by the following commands:
| start | (re)start clock |
| stop | stop the clock |
| reset | reset clock |
Example plugin XML file:
<?xml version = '1.0'?>
<panoclock>
<clockFace url="img/tableclock.png" center="232:163" />
<hourHand url="img/hourhand3.png" offset="21" />
<minuteHand url="img/minhand3.png" offset="31" />
<secondHand url="img/sechand3.png" offset="19" />
<reflection url="img/reflection3.png" alpha="0.95" />
</panoclock>
Version history: