Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| /* | |
| * MIT License | |
| * | |
| * Copyright (c) 2021-2022 John "Nielk1" Klein | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| #define V ImVec2 | |
| #define F float | |
| #define D 2048 | |
| F m[D*D],I,O,w,x,y,z,h,u,v,l;int q,i,j,T,M;F&A(int x,int y){return m[(x&(D-1))+(y&(D-1))*D];} | |
| F S(F x,F y){I=A(x*D,y*D);return 1-I*I*9;} | |
| void L(F& x,F a,F c){x=sqrt(1.-exp(-a*I*(1.-O)-c*O));} | |
| #define R ((rand()%98)/49.-1)*l | |
| void FX(ImDrawList*d,V a,V b,V B,ImVec4 o,F t){ | |
| if(!q){q=1;m[0]=0;l=.5; | |
| for(T=D;T>1;l=l/2,T=T/2){M=T/2;for(j=0;j<D;j+=T){for(i=0;i<D;i+=T){w=A(i,j);x=A(i+T,j);y=A(i,j+T);z=A(i+T,j+T); |