g | x | w | all
Bytes Lang Time Link
054JavaScript Node.js240902T091602Zl4m2
083Python240831T190213Zshape wa
083Charcoal240901T110835ZNeil

JavaScript (Node.js), 54 bytes

(s,i=0)=>g=(n,k)=>k?n?[...g(n-1,k),g(n,k-1)]:[]:s[i++]

Try it online!

Trivial

Python, 85 84 83 bytes

f=lambda s,n,l,r=1:n and[f(s,n-1,i+1,i%2*2-1)for i in range(l)[::r]][::r]or next(s)

Takes the string (s) as an iterator of characters -- to take a str, replace n and with n*[s:=iter(s)]and for +16 +12 bytes (-4 bytes by att).
Assumes l is nonzero -- to support the case where l is zero, change <a> and<b>or <c> to <b>if <a> else <c> for +2 bytes.

Attempt This Online! (does not have the final 3 test cases)

Ungolfed:

def snake(src, dimensions, length, reverse=False):
    if dimensions == 0:
        return next(src)
    maybe_rev = lambda seq: seq[::-1] if reverse else seq
    return maybe_rev([snake(src, dimensions - 1, length=i+1, reverse=i%2==0)
        for i in maybe_rev(range(length))])

Not really much to say -- just uses recursion to build the specified simplex, with characters coming from a stateful iterator. In the golfed code, instead of a boolean reverse parameter, we take r: 1 for forwards, -1 for backwards. With that change, maybe_rev simply becomes lambda seq: seq[::r], and we use powers of -1 to express alternating directions.

Charcoal, 83 bytes

≔⪪⮌S¹θ≔EN¹ηFNUMη…η⊕λ≔⟦⟦⟧X⊟η¹⟧η⊞υ⟦⟦⟧η⟧FυFLι«≔§ικζ¿№ζ¹F⁺²κUMζ⎇λ§⮌ζν∧μ⊟θ⊞υ⎇﹪κ²ζ⮌ζ»⭆¹⊟η

Try it online! Link is to verbose version of code. Takes input in reverse order from the test cases. Explanation: Too many edge cases costing me a whole 10 bytes.

≔⪪⮌S¹θ

Input the string and convert it into a form that can be iterated over using Pop.

≔EN¹η

Make a 1-dimensional simplex of the input length.

FNUMη…η⊕λ

Expand the simplex by the input number of dimensions. (At this point I could consider 0 dimensions to be an edge case but fortunately it doesn't cost any bytes here.)

≔⟦⟦⟧X⊟η¹⟧η

Extract the last layer of the expanded simplex, which results in the desired number of dimensions. Deep clone it, as the expansion works by duplicating nested lists. Finally, wrap that in a list, to handle the edge case of 0 dimensions.

⊞υ⟦⟦⟧η⟧Fυ

Start traversing the wrapped simplex, but wrap it again, to handle the edge case of 1 dimension.

FLι«≔§ικζ

Loop over each slice of the current simplex.

¿№ζ¹F⁺²κUMζ⎇λ§⮌ζν∧μ⊟θ

If this is an edge then fill it from the input string, reversing it in place if it's an even edge (actually reversing it in place a number of times given by one more than its index; the 2 accounts for the fill operation, which it's golfier to inline as an extra loop pass).

⊞υ⎇﹪κ²ζ⮌ζ

Otherwise add this slice to the list of simplexes to process, reversing it if it's an even slice.

»⭆¹⊟η

Pretty-print the final simplex.