This commit introduces the core functionality of the project, including the implementation of key classes and methods for drawing shapes. It also adds initial unit tests to ensure the correctness of the implemented features. Changes include: - Implementation of the `ZcDrawShapeFactory` class for managing and drawing shapes. - Implementation of the `ZcCircle` class for drawing circle shapes. - Implementation of the `ZcColor` class for handling colors and conversions between RGB and hex. - Utility functions added to `helpers.py` for common operations. - Abstract base class `BaseShape` defined for future shape extensions. - Unit tests for `ZcDrawShapeFactory`, `ZcCircle`, `ZcColor`, and utility functions in `tests` directory. All modules are documented with docstrings, and initial test coverage has been verified.
17 lines
536 B
Python
17 lines
536 B
Python
from .nodes.zc_draw_shape_factory import ZcDrawShapeFactory
|
|
|
|
# Set the web directory,
|
|
# any .js file in that directory will be loaded by the frontend as a frontend extension
|
|
# WEB_DIRECTORY = "./somejs"
|
|
|
|
# A dictionary that contains all nodes you want to export with their names
|
|
# NOTE: names should be globally unique
|
|
NODE_CLASS_MAPPINGS = {
|
|
"ZcDrawShape": ZcDrawShapeFactory
|
|
}
|
|
|
|
# A dictionary that contains the friendly/humanly readable titles for the nodes
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"ZcDrawShape": "ZC DrawShape Node"
|
|
}
|