maybe because the implementation in chromium is fast idk
Christopher McCormack
@cmccormack
oops was I doing that on your project?
I'm sorry!
it's really fast now though
Adel
@AdelMahjoub
wow, amazing @cmccormack
that spread operator on a HTMLCollection !!
never thought about it :laughing:
Christopher McCormack
@cmccormack
probably not the fastest but I think it looks clean in code hehe
Adel
@AdelMahjoub
it is faster than earlier
Christopher McCormack
@cmccormack
sorry for editing your project though I thought it would only change for me
Adel
@AdelMahjoub
I invited you to edit, no problem , that was the purpose
Christopher McCormack
@cmccormack
glad I didn't delete a bunch of code then!
Adel
@AdelMahjoub
No I'm convinced that it is faster :laughing:
Christopher McCormack
@cmccormack
doesn't classList have a toggle method?
Adel
@AdelMahjoub
thats jQuery I think
idk when it was added , it seems clasList has a toggle method
Christopher McCormack
@cmccormack
yeah that api is pretty good
I think to use it in this context you would only want a single class though, maybe the default for a cell is whatever style you have for dead, then cell_live would change it
Adel
@AdelMahjoub
@cmccormack well I learned a lot, thank you
Christopher McCormack
@cmccormack
np
this stuff is always fun!
if @ezioda004 hadn't fallen asleep he could probably improve performance a bit more
_
Adel
@AdelMahjoub
usually I would use canvases for this stuff, but making it fast on the dom is good to try
Christopher McCormack
@cmccormack
I think it's pretty dang fast with just HTML haha
but I agree
I would probably change mine to canvas had I planned it from the beginning, mine isn't very performant
it would be if it didn't need click handlers I think
Adel
@AdelMahjoub
I made a lot of different versions, vue, angular, react all using dom and canvases, this one is one of a lot
it can be even faster using webgl with phaser
or pixijs
but yeah, one is a video game framework the latter is a rendering library so :laughing:
Adel
@AdelMahjoub
the good thing , it is possible to create git braches from glitch, now it is merged, I guess it will be useful for future ref
Christopher McCormack
@cmccormack
didn't know you could make branches that's neat
Adel
@AdelMahjoub
yeah, it is very different from what is was, very good work
live editing was like freezing every 2sec
Maybe they 'll add private projects in the future
Christopher McCormack
@cmccormack
like private github repos?
or just not public on glitch?
Adel
@AdelMahjoub
yeah, not public on glitch, some paid service
it is very convenient for demos
Christopher McCormack
@cmccormack
I just wish it had a better editor
doesn't do auto close tags or anything
Adel
@AdelMahjoub
yeah, some editor customization is welcome
Christopher McCormack
@cmccormack
I like what codesandbox did, integrating VS Code in
Adel
@AdelMahjoub
ah, didn't know about it, I'll check it
Brad
@bradtaniguchi
Ran into a bug related to this: const num = Number(null); // num = 0