mrmaxm

Results 342 comments of mrmaxm

I've looked into issue of conflicting attributes with class properties. Because attributes are declared as a prototype accessors after class definition, but properties are not defined as accessors (get/set), there...

> Hey @Maksims, sorry for taking so long on this. Just reviewing now, is this PR still required? it seems like the `name` property already works if it's explicitly defined...

Based on the initial implementation, using `static attributes` would be somewhat difficult, as it conflicts with static `attributes` getter on the `ScriptType`. We can propose a different name for a...

> This reminds me. The ScriptType 2.0 cannot be used when trying to run engine in headless mode. The current script handler is using window. Perhaps 2.1 could be made...

> > We've used current script system in node.js. > > Right. I am referring to this `document` dependency: > > https://github.com/playcanvas/engine/blob/dfc4512e89d9eee155f34087f1a4d54ffc6397bf/src/framework/handlers/script.js#L99-L102 > > I don't see how it can...

> This may be ok though, as we just exclude ES Module Scripts from the loading order API. In addition any es module should probably be excluded from the loadingOrder,...

> One thing that could become more problematic is that attributes with getters/setters would not work using ScriptType > > ```js > class Rotator extends ScriptType { > __offset =...

I think yes. One thing to test with another PR, is how it works with script-name, when async adding to script registry, to trigger either initialize or swap.

This is vastly different functionality from the current ScriptType. Few things: 1. Attributes are not editor-only, as they do provide better initialisation process and provide runtime events. 2. Swap method...

Well, no one really stopping developers of doing their own classes for script systems already, the only thing you need a way to attach them from the Editor, which you...