Is a customizable vector field generator created with Figma Plugin API using TypeScript. This plugins creates vector fields by allowing users to customize a small set of parameters that are used to generate a group of lines to visually simulate a vector field.
- Install on Figma
- Open a new or existing document, then either hit
cmd+/
orctrl+;
, search "Vector Field Generator" and hit enter. Or search for the the plugin on Community tab. - Start messing around and once you are done, click
Generate
to create your very first vector field.
This plugin provides two core functionalities:
- Generate vector fields: through trigonometry a matrix is generated using small lines that simulate the behavior of mathematical vector fields.
- Randomizer: you can randomize values for the number of rows, columns, padding, cell-size, allowing you to easily explore.
Note: the randomizer function will only create square matrices - which means the number of columns equals the number of rows.
To setup the environment and start coding, do as follows:
- Clone the repository:
$ git clone https://github.com/ADADDS/VectorFieldGenerator.git
- Enter the plugin directory:
$ cd VectorFieldGenerator
- Install dependencies:
$ npm install
- Build the plugin:
$ npx webpack
-
Inside figma, go to
Plugins -> Development -> New Plugin
-
Select the VectorFieldGenerator/manifest.json file as the manifest
After these 6 steps, you can now test the plugin inside any of your Figma documents, acessing it in the Plugins -> Development
menu.
When adding new features and solving bug issues, you can compile the plugin by running again the line shown in Step 4.
Pull requests are welcome. For major changes, please open an issue to discuss what you would like to change. Feel free to provide feedback and report bugs or unexpected behaviors.
These are the known limititations to the version V1.
- It's not currently possible to choose how many inflection points there will be on the matrix.
- It's not currently possible to place the inflection points whenever you please as their cartesian coordinates are generated randomly.
- It's not currently possible to control the width reduction parameters.
- It's not currently possible to control the rotation parameters.
- Due to performance issues, we are litiming the number of columns and rows to 50.
- Keyboard navigation is not working properly.
Made with ❤️ by @tuiuiu and @lucianoinfanti