Golf me a polygonal loader Codidact post, CGCC Sandbox, Codidact Sandbox
Given three positive integers as input, animate an ascii-art polygonal loading symbol on the screen.
Intro
You will be given three inputs, \$n\$, \$l\$, and \$d\$...
\$n\$ (one of \$3\$, \$4\$, \$6\$, or \$8\$), is the number of sides of a polygon:
                           * * *
                          *     *
                * * *    *       *
               *     *   *       *
  *    * * *  *       *  *       *
 * *   *   *   *     *    *     *
* * *  * * *    * * *      * * *

\$l\$ is the side length to use. (The above all use \$l = 3\$, the minimum possible value).
You may use any printable ASCII character other than space instead of *.
\$d\$ is the load length and is less than the perimeter.
The task is to create a loading animation as follows:

Make the first frame of the animation by starting at any one of the topmost corners and drawing the perimeter until its length is \$d\$.
Make the next frame by shifting this partial perimeter by 1 clockwise.
Repeat step 2 ad-infinitum.

For example, \$n=3,l=3,d=4\$ would result in the following steps:
  *                          *       *        *
   *  -&gt;    *  -&gt;  *    -&gt;  *   -&gt;  * *  -&gt;  * *  -&gt; . . .
  * *    * * *    * * *    * *     *            *

Example
Here is a solution made by Hakerh400: Try It Online!
Further details(important):

You are guaranteed that \$n∊(3,4,6,8)\$
You are guaranteed that \$l≥3.\$
You are guaranteed that \$d&lt;(l-1)×n.\$
There must be a delay of at least 0.1 s between each step. You can have a delay of up to 10 seconds.
Your language is allowed to output a list of steps infinitely if and only if it cannot clear the screen or do something similar.
If so, there must be at least 2 newlines between each step.
This is not graphical-output.

Scoring
This is code-golf. Shortest answer in each language wins.
JavaScript (V8), 353 318 bytes

f=(n,l,d,o=0)=&gt;{w=[...{3:'330231',4:'42240220',6:'423313021131',8:'4233231302112131'}[n]]
a=Array(3*l).fill().map(_=&gt;Array(4*l).fill` `)
x=n==4?0:l,y=0
for(i=0;i&lt;d+o;++i){a[y][x]=i&gt;=o?'*':' '
j=~~(i/(l-1))%n*2
x+=w[j]-2
y+=w[j+1]-2}(c=console).clear()
c.log(a.join`
`.replace(/,/g,''))
setTimeout(_=&gt;f(n,l,d,o+1),100)}

Try it online!
On the tio.run it displays all output instantly, but in the browser console it animates as it should.


f=(n,l,d,o=0)=&gt;{w=[...{3:'330231',4:'42240220',6:'423313021131',8:'4233231302112131'}[n]]
a=Array(3*l).fill().map(_=&gt;Array(4*l).fill` `)
x=n==4?0:l,y=0
for(i=0;i&lt;d+o;++i){a[y][x]=i&gt;=o?'*':' '
j=~~(i/(l-1))%n*2
x+=w[j]-2
y+=w[j+1]-2}(c=console).clear()
c.log(a.join`
`.replace(/,/g,''))
setTimeout(_=&gt;f(n,l,d,o+1),100)}
f(3,3,4)