-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aligning with Web Core API #8224
Comments
|
I now think it is suitable. Node has a custom event class. The only real blocker is that the spec doesn't expose a way to get all listeners but browsers have implemented |
Rethinking... EDITED |
@ShaMan123 what do think will be performance impact of using DOMMatrix? |
Great question |
Yes it could work. It should not take much time to give it a try for a few methods like |
I m sceptical they can use less memory for memory multiplication. Of course you do what you want with your free time, but if you had an actual reproducible case of a crowded fabricJS situtation that can trigger GC often to the point that it bothers performances, that would be very useful because then we could tackle that specific problem When i think of GCs issues i more more scared of the work we do with the Point class rather than the array creation in the matrix multiplication. |
The difference it seems is that you'd mutate and return the same object reference, instead of creating and multiplying multiple arrays on-the-fly as With that being said, I think you're right as I don't expect much difference with DOMMatrix. From the examples I've seen, it doesn't seem to be designed for high-speed canvas use, rather convenient simple CSS transforms. |
Aligning with Web Core API
migrate
Observable
toEventTarget
?The last PRs have made
Observable
much more friendly.Returning a disposer is my favorite, cuts down a lot of boilerplate code.
Maybe we want to take it a bit further?
EventTarget
is implemented in all browsers and in node>15.Should we make
Observable
a subclass ofEventTarget
?preventDefault
There is of course the amazing
EventEmitter
of node.DOMMatrix
An amazing interface that is able to do so many useful things and is a drop replacement for the simple array used currently
preTransform and postTransform are 2 concepts that are so important.
We can subclass it and add
qrDecompose
applyToObject
etc. making it a powerful key player.It is available on in node via polyfill or via node-canvas
I am really enthusiastic about it.
The text was updated successfully, but these errors were encountered: