Constructor
new ClockUtil(parent, bc, clock_inf)
- Source:
Properties:
Name | Type | Description |
---|---|---|
num_divs_time |
number | The number of unique hour hand phases (determined by rotation period and framerate). |
spaced |
SpacedArray | The instance of the |
hl |
HourLocs | The instance of the |
cur_hours |
Array.<number> | An array specifying the hour hand locations for each clock. This value corresponds to an index in the `SpacedArray'. |
clock_angles |
Array.<number> | An array specifying the angle of the clock hand corresponding to each entry in |
Parameters:
Name | Type | Description |
---|---|---|
parent |
Keyboard | The instance of the |
bc |
BroderClocks | The instance of the |
clock_inf |
ClockInference | The instance of the |
Methods
change_period(new_period)
- Description:
Recalculates the clock hours and spacedArray given the new rotation period.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
new_period |
number | The time in seconds of the new clock rotation period. |
increment(clock_index_list)
- Description:
Updates the cur hours by 1, and update both the screen and the parameters of the clocks.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
clock_index_list |
Array.<number> | Array containing the indices of all active clocks to increment. |
update_curhours(update_clocks_list)
- Description:
Updates cur hours by one for all clocks: increment the index among [0,80] by 1 for where the clock hand exists.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
update_clocks_list |
Array.<number> | Array containing the indices of all active clocks to increment. |