-
Notifications
You must be signed in to change notification settings - Fork 14
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
HTML5 support ? #2
Comments
Html5 target requires some work depending the features you want to use. But it's really easy to implement, you only have to create externs for the class you want. You can have a look at the "#if html5" part in https://github.com/boorik/smartfox-haxe-client/blob/master/com/smartfoxserver/v2/SmartFox.hx for a complex example. Some are really simplier like the LoginRequest.hx |
Hi, I would like to chime in, we are also looking forward to an HTML5 port for WebGL. Is it something you plan on doing or are you waiting for someone to help? We have no HTML5 / JS knowledge in our team but we will definitely need this feature soon. Could it be an option to include the official SFS2X Javascript client API and just wrap it from Haxe for HTML5 targets? Thanks in advance, |
"Could it be an option to include the official SFS2X Javascript client API and just wrap it from Haxe for HTML5 targets?" This is how it is currently working. Some externs are currently missing but has I said it's really easy to integrate them. You can try to add them if one that you need is missing. I can help you if you have issue to do so. |
Hi, thanks for the clarification and your help! I have some compiler issues now when targeting HTML5 while the Flash target compiles without errors. It looks like the API is changing for HTML5 so that it can not easily be used crossplatform. Here are some of the compiler errors I am seeing:
So it looks like using the external JS API is causing some compatibility issues with the Flash API. I am very new to Haxe, but can the API be unified somehow? Otherwise how would you use the library for both Flash and HTML5 targets? Thanks in advance, |
Yes, BTW the branches js-1.7.5 are more uptodate than master, use it with the last sfs version. Regards |
Hi, thanks again! Looks like you are currently actively workin on the js-1.7.5 version, right? I updated my client to the js-1.7.5 branch and first got some compilation errors in HTML5: SFSRoomManager not found in SFSRoom.hx and SFSUserManager not found in SFSUser.hx. I could solve them by putting the imports on top. Also the SFSArray seems to have the wrong externs, it uses the same functions like SFSObject (i.e. putUtfString instead of addUtfString). Do you think it would make more sense for me to wait until you are done migrating? I have no problem fixing the stuff myself as far as I can but it looks like you are working on that anyway. Thanks, Ruben |
Sorry for the errors, i m away from keyboard for 2 days. You can make a pull request so i can integrate yourte fixes. |
Ok cool, I have created the pull request now. |
Merged! |
Hi ,
Is HTML5 support still in progress ? What is the current status of the html5 target?
The text was updated successfully, but these errors were encountered: