Skip to content
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

wrong type in getPointAT declaration in path class #692

Open
alfredo-valero opened this issue Feb 8, 2023 · 2 comments
Open

wrong type in getPointAT declaration in path class #692

alfredo-valero opened this issue Feb 8, 2023 · 2 comments
Labels

Comments

@alfredo-valero
Copy link

alfredo-valero commented Feb 8, 2023

In types.d.t , the method getPointAT is declarated with 2 params t as boolean and obj as any, when t should be a number (float)

/**
         * @name Two.Path#getPointAt
         * @function
         * @param {Boolean} t - Percentage value describing where on the {@link Two.Path} to estimate and assign coordinate values.
         * @param {Two.Vector} [object] - Object to apply calculated x, y to. If none available returns new `Object`.
         * @returns {Object}
         * @description Given a float `t` from 0 to 1, return a point or assign a passed `obj`'s coordinates to that percentage on this {@link Two.Path}'s curve.
         */
        getPointAt(t: boolean, obj: any): any;

==>

/**
         * @name Two.Path#getPointAt
         * @function
         * @param {number} t - Percentage value describing where on the {@link Two.Path} to estimate and assign coordinate values.
         * @param {Two.Vector} [object] - Object to apply calculated x, y to. If none available returns new `Object`.
         * @returns {Object}
         * @description Given a float `t` from 0 to 1, return a point or assign a passed `obj`'s coordinates to that percentage on this {@link Two.Path}'s curve.
         */
        getPointAt(t: number, obj: any): any;

Congratulations on your great work!

@jonobr1
Copy link
Owner

jonobr1 commented Feb 8, 2023

Which version of Two.js are you using? The latest dev branch actually already has this fixed.

@jonobr1
Copy link
Owner

jonobr1 commented Feb 8, 2023

This PR improves it a bit too. Thanks for sharing: #694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants