Giter VIP home page Giter VIP logo

Comments (13)

probablytukars avatar probablytukars commented on July 27, 2024

I will take a look at it in a couple days when I have the time to, since I haven't made an npm package before. Out of interest, would you also be interested in this being published to wally (package manager for roblox)? Also, if you could tell me more information about your workflow so I can replicate it, that would be much appreciated, by this I mean: What editor are you using, how are you integrating with roblox (rojo), I assume you are using roblox-ts at some point?

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

I never use Wally and I think npm is enough. As well some methods are missing e.g. .Add .Mul .Pow etc.
roblox ts doesn't have these for classes. It would be great if you could add them as well.
Right now I'm making sort of animation tooling with bezier/splines. I think your quaternion library can come in handy

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

and as well it would be great if each of these had a method
image

from luaquaternion.

probablytukars avatar probablytukars commented on July 27, 2024

I've created an npm package npm i @tukars/luaquaternion is how you can install it.

Also, regarding your second comment, these do have functions, they are quat:Normalize() and quat:Length(), if you are talking about the cached versions, then you can just index using quat.unit and quat.magnitude, unless you are talking about methods to directly access the cached functionality? Please clarify, and if it seems reasonable, I will add them :)

I have never used roblox-ts, so I can't confirm whether or not the types work, I just add them for people who use roblox-ts and requested them. If you know how to add metatable methods into roblox-ts I think they could help other people who use this library also :)

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

Thank you! It's interesting that you have .d.ts file and you are not using the Roblox TS. About TS you can still set the metametods but you not able to use something like Vector3 + Vector3 so you have to use macros like Vector3.add(Vector3) at the end it compiles to +.

There's no implementations of these macros for classes for now so it's better to add the methods like add mul div etc. I think.

For Roblox TS you have to tell in the .d.ts file that the parameters like . magnitude exist, it's not about the metatables but more about the types

interface ITest{
Test1(): void // compiles to object:Test1()
Test2: () => void // compiles to object.Test2()
}

from luaquaternion.

probablytukars avatar probablytukars commented on July 27, 2024

I downloaded roblox-ts just to help fix this issue, I expect it to be finished within ~2 hours because I want to overhaul some metamethods to support strict typing within roblox studio (as a major revision). I apologize for the original delay in getting to this issue and hope I can make the roblox-ts experience much better :)

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

Thank you a lot for this. Not everyone will decide to try ts just to expand the reach to his package.
The time is not a problem, especially if that package will be on npm after this

from luaquaternion.

probablytukars avatar probablytukars commented on July 27, 2024

I believe all of your concerns have now been addressed with the release of v2.0.2! If you have any problems let me know, otherwise I will be closing this issue as completed :).

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

You can as well make an announcement in the RobloxTS server to get more people to download the package

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

btw why you didnt join rbxts, it will not be considered as valid package

from luaquaternion.

Velover avatar Velover commented on July 27, 2024

https://roblox-ts.com/docs/guides/typescript-packages

from luaquaternion.

probablytukars avatar probablytukars commented on July 27, 2024

No worries, I will take a look at it

from luaquaternion.

probablytukars avatar probablytukars commented on July 27, 2024

Issues have now been addressed in the latest release. :)

from luaquaternion.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.