-
Notifications
You must be signed in to change notification settings - Fork 18
TypeScript types #27
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
TypeScript types #27
Conversation
|
A better approach would be to convert all of the JS to TS right in the source code instead of having this separate type file to maintain. Let me know if you are interested in that instead. |
|
@coopbri many thanks. Yes, converting direct to TS would make sense, it's something I've been meaning to do for a while but haven't had the time yet. By the way, |
No problem. If TS is something you're looking for sooner than later, want me to migrate this repo to TS as part of this PR instead of just the raw declaration file? Thanks man! I'm relatively new to the more advanced side of the XR space so deep learning mode right now. I am so excited to continue to contributing back to the eco, and thank you for working on such amazing projects in the space (AR.js and beyond) |
|
Thanks! Glad you've chosen to use AR.js and locar.js! That would be great, thanks! If you can do a full TS conversion on the code that would be most welcome. Only if you have the time though of course... no worries if not. |
You got it my friend :) Will circle back on this PR |
|
@kalwalt good point. @coopbri what I might do for now is merge your PR (once tested) and then we can do a full TS conversion later, or as soon as you are able to. That means there's no rush to do this immediately. BTW what I have been meaning to do for a while is to convert my project hikar.js (https://github.com/nickw1/hikar.js) to use LocAR.js (currently it uses the older location-based part of AR.js, which lacks some of the recent iOS fixes - i.e. it doesn't really support iOS properly). Having seen RDK I'm inclined to give that a go (i.e. use RDK with LocAR.js backend). I like the idea of being able to use React to develop AR webapps. This will be an opportunity to try out RDK on a real project, which means I might be able to feed suggestions and PRs back to RDK, so both RDK and LocAR.js benefit. |
|
Good point indeed. That incremental plan sounds good to me (test + merge -> full migration separate dev step). Oh! That would be amazing. I partially guessed on how the API will look and be useful for users, so your feedback (especially with your expert experience in the XR space as a dev + user) would be monumentally helpful. RDK is so new that I imagine the way it is structured right now will change drastically (and be very buggy, of course). Btw hikar.js is so cool, I explored it when I started tapping into location-based AR. I will share this project with my friends too now that you brought it up. If you want to chat further feel free to DM, I have socials on https://github.com/coopbri We are working on a project you might be interested in and we may have some funding around the corner, not sure if you're looking for work at the moment but would be fun to chat no matter what! |
|
@coopbri thanks for your comments. Would be good to DM, it would be certainly good to hear more about your project at least. I'm generally fairly low-profile on social media but I am on LinkedIn (haven't used it in a while though) so will probably message you there later in the week. |
|
@coopbri have tested, will merge. |
Closes #14
Implemented TypeScript types for LocAR.js. There are some guesses, adjust as you see fit.
Also, I did not wrap the types into the bundle (
dist/). They are present withnpm pack. Let me know if you'd like this adjusted.Based on an open-source, web-based XR React framework we are building at Omni called Reality Development Kit (LocAR.js types: https://github.com/omnidotdev/rdk/blob/3506933c996d2d9d78cf9a60d1590ddb12078b16/packages/rdk/src/lib/types/locar.d.ts)