opsoro.module¶
-
class
opsoro.module.
Module
(data=None)[source]¶ Bases:
object
-
__init__
(data=None)[source]¶ Module default class. Custom modules should inherit this class and can override functions.
Parameters: data (dict) – configuration data to setup the module
-
alive_trigger
(count_seed=1)[source]¶ This is triggered frequently, when the aliveness is turned on.
Parameters: count_seed (float) – seed value for randomization Returns: True if the module updated something Return type: bool
-
apply_poly
(r, phi, anim_time=-1)[source]¶ Apply poly values r and phi to the module and calculate dof values
Parameters: - r (float) – r radius value
- phi (float) – phi angle value
- anim_time (int) – animation time in ms
-
load_module
(data)[source]¶ Setup modules with given configuration data
Parameters: data (dict) – configuration data to setup the module
-
set_dof
(tags=[], value=0, anim_time=-1)[source]¶ Set the value of a dof with the given tags. If no tags are provided, all dofs are set with the given value.
Parameters: - tags (list) – name of the DOF
- value (float) – value to set the DOF
- anim_time (int) – animation time in ms
-
opsoro.module.eye¶
-
class
opsoro.module.eye.
Eye
(data=None)[source]¶ Bases:
opsoro.module.Module
-
__init__
(data=None)[source]¶ Eye module class inherits default module class.
Parameters: data (dict) – configuration data to setup the module
-
alive_trigger
(count_seed)[source]¶ This is triggered frequently, when the aliveness is turned on.
Parameters: count_seed (float) – seed value for randomization Returns: True if the module updated something Return type: bool
-
opsoro.module.eyebrow¶
-
class
opsoro.module.eyebrow.
Eyebrow
(data=None)[source]¶ Bases:
opsoro.module.Module
opsoro.module.mouth¶
-
class
opsoro.module.mouth.
Mouth
(data=None)[source]¶ Bases:
opsoro.module.Module
opsoro.module.turn¶
-
class
opsoro.module.turn.
Turn
(data=None)[source]¶ Bases:
opsoro.module.Module