-
Notifications
You must be signed in to change notification settings - Fork 3
Rendering functions does not accept custom Vec3 #6
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
Comments
It should work if the type extends the I do have this example of extending the |
Okay. I will try that. If there is no performance penalty of the flat struct then that is a fine solution. |
Looks like I can't have a custom constructor. But works otherwise! |
Basically, this should work: class SubclassWithExtraInitArguments(SubclassableWithParameter):
def __new__(cls, bar):
print("before super new")
return super().__new__(cls, foo=bool(bar))
def __init__(self, bar):
print("before super init")
super().__init__() |
A QoL feature of v4 is that it is very robust. In v4, all the rendering functions accepts custom vector objects. It just requires that the passed object had x, y, z attributes or was a 3-element list/sequence of numbers. It would be nice if this robustness returns for v5, especially for custom vector types, so you don't have to convert into
flat.Vector3
each time.The text was updated successfully, but these errors were encountered: