Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
/** | |
* Tiny customElement wrapper that enables scalable web component architecture. | |
* Define custom elements with a configuration object that separates markup from css and javascript. | |
* Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension, | |
* composition and easier styling with external stylesheets and global css variables. | |
* Exports a component class that can be imported and explicitly used to be picked up by module bundlers. | |
* See comments for examples and GNU license below. | |
*/ | |
export function defineComponent(name, config) { |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);