We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
world.createJoint
Avoid casting when doing something as:
PrismaticJoint prismaticJoint = world.createJoint(prismaticJointDef) as PrismaticJoint
Use of generics to avoid casting:
PrismaticJoint prismaticJoint = world.createJoint<PrismaticJoint>(prismaticJointDef)
T createJoint<T extends Joint>(JointDef def)
return joint as T;
joint.dart
static Joint create(World world, JointDef def)
I'm interested in working on a PR for this.
The text was updated successfully, but these errors were encountered:
Sounds good to me! Feel free to put a PR for it 🚀
Sorry, something went wrong.
Sounds good to me too, there are a lot of these things that have been passed along through all the ports from C++. I assigned you to the issue.
Joint
JointDef
createJoint
alestiago
No branches or pull requests
Problem to solve
Avoid casting when doing something as:
PrismaticJoint prismaticJoint = world.createJoint(prismaticJointDef) as PrismaticJoint
Proposal
Use of generics to avoid casting:
PrismaticJoint prismaticJoint = world.createJoint<PrismaticJoint>(prismaticJointDef)
More information
Possible solutions
T createJoint<T extends Joint>(JointDef def)
and return toreturn joint as T;
(Simplest Solution)joint.dart
to perhaps benefit from OOP and simplify static methodstatic Joint create(World world, JointDef def)
I'm interested in working on a PR for this.
The text was updated successfully, but these errors were encountered: