-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
createElement as method of p5.element? #395
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
is there a better way to do this than to create copies of the methods but attach them to the p5.Element then rather than using I would use |
I wonder if this is just a little too confusing? Right now all the create methods attach something to the DOM, I think it might make sense to stick with this just to make our lives easier on the development side? Or is this creating one element from another pattern something that's really common in JS? |
I'm not too keen on adding complexity so I agree this is probably something to leave out. The use case I am finding is that some of my examples do this alot:
So is this really any better or less confusing?
Now that I write these, I think the answer is likely no. Or certainly not so great that it's worth the code and reference expanding. |
I think I'd agree when comparing pros and cons; but during testing being able to create an element immediately as a child of another element feels great. |
Closing this one as it doesn't make too much sense |
I'm finding I'm doing this quite a bit in some examples:
I wonder if it would make sense to allow:
I am not at all sure about this. . .
The text was updated successfully, but these errors were encountered: