ape-ecs icon indicating copy to clipboard operation
ape-ecs copied to clipboard

Support native properties for Component classes

Open fritzy opened this issue 5 years ago • 0 comments

If you're writing a Component in TS, you essentially have to define each property twice.

Internally, ES class properties use Object.defineProperty every time the class is initialized, which is slow. This is why this was avoided in the first place.

If no static properties object has been defined, we can check for class properties at registration and build it.

fritzy avatar Sep 29 '20 01:09 fritzy