mothervolcano / polka-folks Goto Github PK
View Code? Open in Web Editor NEWGround testing project for vector drawing framework.
License: GNU General Public License v3.0
Ground testing project for vector drawing framework.
License: GNU General Public License v3.0
The method is beyond the scope of the class and what it does can be easily achieved by a helper function or utility class.
Implement the ModelConfig interface in each of the three pioneer Archetype-based classes. The goal is to accommodate specific configuration needs for each Archetype and evaluate which implementation is the most suitable.
In our codebase, we have three Archetypes, which are the first to test the system. Each archetype import and configure a variety of Models (based on the Model base class). To ensure flexibility and maintainability a common interface is introduced, ModelConfig, to define the configuration needs for each Model in the context each Archetype.
2.Implementation for Each Archetype-Based Class:
Remove Plotter as a dependency of the Polka class. Plotter should not be an object of Polka but rather a module used by Polka.
Figure out some possible solutions for alternating the orientation of the Attractors on a Spinal Field.
... to be filled in.
The current implementation of the Spine class in spine.ts relies heavily on the project function to handle different Spine creation scenarios, such as creation from 2 points, 1 point and a length property, or a fully defined path. This approach has led to complexity and tight coupling with an external library (e.g., Paper.js), making the code less maintainable and adaptable.
Refactor the Spine creation process to make it more modular, maintainable, and independent of external libraries. The goal is to have a well-structured codebase that can handle different Spine creation scenarios in a clear and library-agnostic way.
Separate the several creation scenarios and define them clearly.
Abstract and delegate Path Creation: Move the creation of the path itself away from the class, abstracting it as much as possible to reduce dependency on external libraries.
Remove or Replace project Function: Evaluate whether the project function is needed, and if not, remove it. If needed, break it down into separate functions or classes that handle different Spine creation scenarios.
Type Definitions: could Typescript overloads be a good approach here? Learn more about them and how to apply them.
Implement unit testing
NOTE: starting a new branch for this might be advisable.
Replace the switch statement below with the following logic:
switch (action.type) { case "PUNK": selectedModel = models.find((model: Model) => model.option === "PUNK") || models[0]; break; case "BAROQUE": selectedModel = models.find((model: Model) => model.option === "BAROQUE") || models[0]; break; case "NERD": selectedModel = models.find((model: Model) => model.option === "NERD") || models[0]; break; default: throw new Error(
ERROR: ${action.type} is not a valid archetype); }
Remember what it was intended for and if it is actually being used anywhere.
###Current State:
The implementation of the Orientation and Polarity properties in the Attractor classes (Orbital and Spine) is currently convoluted and inconsistent. The behavior and purpose of these properties are not well-defined, leading to confusion and potential issues in future development.
In the case of Orbitals, the concept of Orientation is well-defined. Consider a circle divided by a line that passes through the points at 1/4 and 3/4 of the path defining the OrbitalField. The attractors positioned before 1/4 and after 3/4 have a positive orientation value of 1, while the others have a value of -1. The Orientation affects the orientation of the circle, meaning that circles with an orientation of -1 are mirror images of the attractors with an Orientation of 1. This system exists to facilitate and control symmetry in the construction of paths.
###Problem Statement:
-Complex Implementation: The current implementation involves a chain of methods starting with arrangeAttractors, leading to complexity in calculating the position, orientation, and polarity of the attractors.
-Design Limitations: The current design does not easily accommodate future types of Attractors, limiting the extensibility of the system.
Note: An additional layer of complexity arises from the ability to add Spine attractors to OrbitalFields and vice versa (Orbitals to SpinalFields). This feature introduces further challenges in defining and implementing the 'Orientation' and 'Polarity' properties consistently across different types of Attractors. Careful consideration and design are required to ensure that these properties function as intended in all scenarios.
Define Clear Concepts: Establish clear and consistent definitions for 'orientation' and 'polarity' that apply to all types of Attractors.
Simplify and Centralize Implementation: Refactor the code to centralize the calculation and assignment of orientation and polarity within the base classes that all types of attractors extend.
... so that it can accommodate future types of Attractors without significant changes to the existing code.
Separate specification data from state logic
Implement an additional pair of methods in Model that can be used to pass paths/instructions between two models.
Such methods should be available during the mounting stage.
Separate specification data from state logic
The current flow within the Archetype classes, from model configuration to generation, is overly complex and segmented. This premature segmentation has led to code duplication and could potentially constrain the project's combinatorial capabilities in the long term.
This model appears to have been messed up after the recent updates to the core engine. Unlike most other models, which remain unaffected, the points are not being plotted as expected.
The model is tightly coupled with another model, adding to the complexity of the issue and making it difficult to understand what is going on even in debug mode.
However this has a low impact on the overall project, not only this model is not a high-priority component but also seems to be an exception.
TODO:
##Current State:
The OrbitalField class requires the position parameter to be an HyperPoint, while the Spine class accepts a different type for the position.
##Expected Behavior:
The position parameter should have a consistent type across different classes that are meant to work together. This will ensure a uniform and predictable interface.
Ideally operations like this should either be implemented downstream of the inheritance chain or delegated to specialised modules.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.