### Description Related: #683, #684 Implement an `ASCIIEffect`. ### Tasks - [x] Create `ASCIITexture`. - [x] Create `ASCIIEffect`. - [x] Create `ascii` demo under `special-effects`. - [x] Add unit test. ### Implementation Details - The implementation from v6 can be ported mostly as-is.
Activity
LucaArgentieri commentedon Feb 17, 2025
I’m working on it!
Do I have to wait for the effect in the package to be published before creating the demo/unit test?
vanruesc commentedon Feb 17, 2025
No, you can go ahead 👌
FYI: there are some relevant notes in #600 for the PR workflow.
LucaArgentieri commentedon Feb 18, 2025
@vanruesc How can I test the effect if I cannot import it in the demo?
Forgive me if I ask for banalities 🙇♂️
vanruesc commentedon Feb 18, 2025
I'm not sure I understand the question 🤔
My approach would be like this:
v7branch.ASCIITextureinsrc/texturesandASCIIEffectinsrc/effects(using the v6 implementation as reference).index.jsfiles in those folders to re-export the new classes.ascii.jsinmanual/assets/js/src/demos/(copying an existing demo such ascolor-depth).ascii.en.mdinmanual/content/demos/special-effects/.npm run watchto build and run the manual locally.It's also a good idea to run
npm testbefore creating a PR to auto-fix formatting issues.If anything is unclear feel free to ask 👍
LucaArgentieri commentedon Feb 19, 2025
Hi @vanruesc,
I got this error:
Could not find a valid mainImage or mainUv function (ASCIIEffect), something seems to be broken in theascii.fragThis test fail:
I also commented setSize because I can’t access
this.resolutionand don’t know if this function is useful.Is it better for you to review the PR so that you understand the errors?
I hope I didn’t create problems and complicated the task
Add ASCIITexture and ASCIIEffect (#688)
Refactor ASCIITexture and ASCIIEffect
vanruesc commentedon Mar 2, 2025
FYI: I've updated the demos to make them look a bit more interesting.
You can get some pretty cool visuals when blending the ASCII effect with the original image: