Summary
The Trail renderable (#1368) currently draws solid-color quads with gradient interpolation. A textured ribbon mode would allow mapping a texture (or sprite sheet frame) along the trail, enabling effects like:
- Sword slash arcs with a blade texture
- Magic spell trails with animated glow textures
- Smoke/fire trails with particle-like textures
- Rope/chain rendering
Requirements
texture option in Trail constructor — accepts an image or TextureAtlas region
- UV mapping along the ribbon: U stretches along the trail length (0=head, 1=tail), V spans the width
- Compatible with the existing gradient/opacity/blendMode options (tint the texture with the gradient)
- Works on both WebGL (textured quads via drawImage or batcher) and Canvas (drawImage with transform per segment)
References
- Godot Line2D
texture_mode — stretch/tile/fit modes
- Unity TrailRenderer
material — texture mapped along trail
- Current Trail implementation:
src/renderable/trail.js
Notes
This was identified during the Trail implementation (#1368) but deferred to keep the initial PR focused on the core ribbon rendering.
Summary
The Trail renderable (#1368) currently draws solid-color quads with gradient interpolation. A textured ribbon mode would allow mapping a texture (or sprite sheet frame) along the trail, enabling effects like:
Requirements
textureoption in Trail constructor — accepts an image or TextureAtlas regionReferences
texture_mode— stretch/tile/fit modesmaterial— texture mapped along trailsrc/renderable/trail.jsNotes
This was identified during the Trail implementation (#1368) but deferred to keep the initial PR focused on the core ribbon rendering.