Open czyzby opened 8 years ago
Official requestAnimationFrame
does not return ID of the request, so I reimplemented it based on Window
class in DragomeRenderer
.
requestAnimationFrame return ID is fixed wtih https://github.com/dragome/dragome-sdk/commit/9b00baf85979fce69caa355ef79f227f3952946a
gdx-dragome
project is on hold until the missing Dragome features are implemented.
Initial support for annotations added: https://github.com/dragome/dragome-sdk/commit/a8c8a05038ce5f5806c19f0b440949eb066005c0 Now we can read annotations from classes, methods and method parameters. Tests for these new reflection features here: dragome/dragome-examples@d6794f2
LibGDX reflection API also allows to read field annotations. I don't think it provides constructor annotations though.
Anyway, every platform allows to scan existing classes one way or the other. This allows frameworks like my Autumn to work. While not crucial, it would be nice if you could choose to generate meta-data storing all available classes, so you could easily scan them.
Field annotations support added in: https://github.com/dragome/dragome-sdk/commit/f02ccf6bb5dcab4e61c58f341ff79f39b6058292
Field reflection support including annotations tests: https://github.com/dragome/dragome-examples/commit/687e1e933db8816dd57a07ee5cb081e568c682f3?diff=unified#diff-0f897e29823e24d97bc52189f86de715
That's great, I think that now reflection support is sufficient to run LibGDX without any additional fuss like the GWT reflection pool generator.
Official bridge ready! Webgl and typedarrays bridges were implemented.
Both bridges were automatically created using w3c webidl files: webgl webidl typedarrays webidl
They were processed using https://github.com/esrille/esidl and the resulting interfaces were located inside dragome-w3c-standards module. Almost no code is required for implementing these bridges. Most changes were performed in DomHandlerDelegateStrategy which was updated to allow polymorphic getContext result in CanvasElement, as well to handle "set" and "get" methods as array access (array[index]).
Using this automatic approach, Dragome can create any kind of bridge just using WebIDL specifications to create interfaces directly, and performing a tiny setup for typing return values for certain js methods.
I'm not sure how to use the Function
interface when passing callbacks. Shouldn't classes like XMLHttpRequest
have their own custom listeners for common callbacks like onreadystatechange
? @fpetrola, see DragomeNet#sendHttpRequest
method and check if this is the correct way of passing functions.
Take a look at https://github.com/dragome/dragome-sdk/commit/08065f372d09f57472323a9994f380757bf580e8
I've changed idl to reflect eventhandler instead of function.
Gradle support is working. I've moved standalone js generator to web module and I'm calling it from build.gradle:
task generateStandalone(type:JavaExec) {
main = "com.dragome.web.helpers.serverside.StandaloneDragomeAppGenerator"
classpath = sourceSets.main.runtimeClasspath
args = [
"./dist",
"./webapp",
"true",
"true"
].toList()
}
Let's keep this issue open until nearly 100% features from GWT are ported.
In order to fully implement Dragome backend for LibGDX, we need to support some JS/Gradle related features:
requestAnimationFrame
,cancelAnimationFrame
support. We can use this polyfill to provide the same API for all browsers. #8Document
mapping. MissingaddEventListener
method.I think all of these should be somehow provided by Dragome modules/plugins, but we can implement them in
gdx-dragome
and transfer them to official repos when necessary.