Comments (5)
+1 for this idea. Perhaps just having several emotes, so yentPepoGun yentBlobGun would merge these two into one image (or gif if one or several of those was animated)
Would probably be a pain to implement this, but hey, the rest of the plugin is already glorious
from betterdiscord-emotereplacer.
I think I could add this with some good ole canvas image composition.
Working with images on the canvas isn't that bad for static images IMO. For gifs, it should be technically possible (anything is ;)), but to do it all in JS, performantly, would be a huge pain, for example, stringing them together in a way that they all appear coherently. If gif A has 41 frames forming one perfect loop, and gif B has 55 frames forming a perfect loop, and gif C has 13 frames forming a perfect loop, you'll need 29,315 frames to loop it all perfectly in a perfect gif. And of course there's heuristics you could take to try and cut the gif at less destructive points, but it would be complicated and janky to do this the "right" way, no matter how you define "right" IMO.
I was able to put this together: https://jsfiddle.net/m28djz1c/. Obviously extremely jank (images aren't sorted, aren't split up etc), but that's the nature of a PoC.
Is anyone able to test at what point emotes starting wrapping on small screens? I'd want to stay as close to a native experience as possible. I think some simple logic to split up the images into eg, chunks of 3 so that they render semi-nicely on mobile would be nice.
from betterdiscord-emotereplacer.
I think something like Rust and compiling to WASM for performance might be an option, no idea if that will work with a BD plugin as I haven't tested it but yeah trying to manipulate gifs decently is a large pain.
FYI gif processing happens here: https://github.com/Yentis/betterdiscord-emotereplacer/blob/master/src/services/gifsicleService.ts
from betterdiscord-emotereplacer.
Hmm, come to think of it, as gifs are generally small already, you may be able to line them up like I described earlier, and then maybe do min(lcm(...framerates), maxframerate*2) frames, then interpolate the gifs with less frames for the other GIFs.
from betterdiscord-emotereplacer.
This is definitely possible with static images, but I think it would be a little trickier to do robustly. I might try my hand at doing it in a simpler plugin first
from betterdiscord-emotereplacer.
Related Issues (20)
- Add possibility to Bypass Emote restriction HOT 1
- [Suggestion] Hide emojis I can't use for reactions HOT 2
- Emote Replacer will always ping on reply messages HOT 1
- Emote are sent in "main" channel if thread isn't "fully" open HOT 1
- Plugin not working HOT 1
- Plugin broken: this.modulesService.cloudUploader.n is not a constructor HOT 1
- Plugin broken: TypeError: Illegal invocation HOT 2
- Seemingly broken on newest discord update. HOT 18
- Unable to select emote from the list. HOT 2
- not working since betterdiscord update HOT 1
- Could not open settings. HOT 1
- Sticker support HOT 4
- [Suggestion] Implementing the plugin to Vencord HOT 1
- [Bug] Cannot open settings. HOT 2
- Autocomplete list is too long HOT 2
- [Bug] Plugin isn't working until I send first available emoji HOT 1
- Plugin doesn't work anymore HOT 2
- [Bug] Prefix and custom emotes doesn't work HOT 1
- [Bug] Plugin no longer work after recent discord and betterdiscord update HOT 2
- [Suggestion] Disable or improve stickers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from betterdiscord-emotereplacer.