Simplify & fix AntialiasedRegularPolygon2D angle#13
Simplify & fix AntialiasedRegularPolygon2D angle#13razcore-rad wants to merge 7 commits intogodot-extended-libraries:masterfrom
AntialiasedRegularPolygon2D angle#13Conversation
- Generate the AA texture with `generate_antialiased_texture.gd` as a binary resource and save it to disk instead of in-memory. Stops Godot from complaining that the scene file is too large. - Simplify code by reusing classes. - Other defaults and shuffle code around. For example we usually rewrite `_ready()`, so instead of remembering to call `super()`, moved all relevant property assignments to `_init()` instead. - Made the `Line2D` an internal node. - Rename regular polygon 2D `angle_degrees` to `arc`. - Fix issue with `arc` not spanning the correct angle. - Other export QoL like `arc` showing in degrees, but value being radians, etc.
|
Also fixes #12, and started the regular polygon from X-axis instead of Y. Even if the rotation is inverted (goes down with positive angle), it's closer to how we think of angles from math. |
fix godot-extended-libraries#12 by updating stroke using `draw` signal instead of handling updates in `_set()`
There was a problem hiding this comment.
Sorry for the delay in reviewing. Code looks good to me.
Can you remove top-level files? There is already a demo project in a separate repository: https://github.com/godot-extended-libraries/godot-antialiased-line2d-demo
(It's kept separate so that it can be listed separately in the asset library, and to avoid installing unneeded files in projects.)
|
Oh, for some reason I thought that the top-level files don't show up for installation, I thought only what's under I'll get to cleaning the PR up, although I'll put it on DRAFT for now because I have more work on it, just found out a few days ago about |
Since `_is_instantiated` is only updated propertly in `_ready()` I reverted all scripts to using `_ready()` instead of `_init()` to be symetrical and not have `AntialiasedLine2D` the only odd one with potentially both `_init()` & `_ready()` or just `_ready()`. - removed commented out code from `plug.gd` - removed top-level files - added `AntialiasedLine2D` revert defaults for built-in `texture`, `texture_mode` & `texture_filter` properties
|
Alright, all should be checked and ready for merge. Check the commit message for more details |
generate_antialiased_texture.gdas a binary resource and save it to disk instead of in-memory. Stops Godot from complaining that the scene files using these custom nodes are too large._ready(), so instead of remembering to callsuper(), moved all relevant property assignments to_init()instead.Line2Dan internal node.angle_degreestoarc.arcnot spanning the correct angle.arcshowing in degrees, but value being radians, etc.See images for


arcfix.vs