AsteroidOS / asteroidos.org

AsteroidOS official website. Built using Assemble, Grunt, Bootstrap and Less.
Other
23 stars 37 forks source link

Include a watchfaces prototyping webpage #3

Open FlorentRevest opened 7 years ago

FlorentRevest commented 7 years ago

Currently, watchfaces can be prototyped from a computer using some hacks and wizardry described in the following documentation page. https://asteroidos.org/wiki/watchfaces-creation/ This requires a very complex development workflow including an entire SDK. However, the QmlWeb project https://qmlweb.github.io/ provides an open source in-browser live coding platform that could easily be integrated in a webpage of asteroidos.org https://github.com/qmlweb/qmlweb.github.io/blob/master/index.html#L29 It would even remove the need for the background Image component and "new Date()" hacks. Moreover, the webpage could export the .qml file and .jpg preview into a tarball that could be deployed on the watch.

TheLastProject commented 7 years ago

When trying to work on this, I found out that QMLWeb doesn't support Canvas yet (only a stub according to https://github.com/qmlweb/qmlweb/projects/8, and it failed to load all the current watchfaces, even when removing the AsteroidOS specific bits like in the documentation page), which is really necessary for the AsteroidOS watches. It still seems to be very incomplete.

So, unfortunately, this seems to not be possible with QMLWeb for now. Not for creating actual watchfaces at least. Quick research of the alternatives gives me the following info:

Qt Quick WebGL streaming: Planned to be released in Qt 5.10, which is scheduled for November 2017. Will require a server.

PureQml framework: Seems possible, but will require a server.

Qt/QML + Emscripten: Can't find any source code with instructions and have no experience with any of this. Most links on the page are dead. Hacker news talks about it being a 30MB JavaScript library, that will hurt to run in any browser.

I probably won't be working on this as it's too much work for me to want to bother with right now, but I hope this info helps whoever tries next.

FlorentRevest commented 4 years ago

Maybe https://www.qt.io/blog/web-based-qt-design-viewer could do the trick :)

jrtberlin commented 4 years ago

QML online seems like a possible base too. It uses web assembly and has a code editor, samples and sharing built-in. Source code

image

beroset commented 2 years ago

I've been working on this with the previously mentioned QML online. Its implementation of QML is definitely sufficient: https://tinyurl.com/2ormgzq9 Here is what I think would be needed