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

Add vector3 #340

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Add vector3 #340

merged 1 commit into from
Dec 17, 2024

Conversation

urbit-pilled
Copy link
Contributor

/claim #330

I added Vector3 support to parameter_input and blocks_catalog.

@manuq
Copy link
Contributor

manuq commented Dec 17, 2024

Good start! I can add Block Code to a Node3D and see the Vector3 input of position, rotation, scale. Now when I try to add some numbers for the X, Y, Z I see errors in the output:

  res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.gd:173 - Invalid access to property or key 'V3XLineEdit:<LineEdit#2924352752547>' on a base object of type 'Dictionary'.
  res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.gd:173 - Invalid access to property or key 'V3YLineEdit:<LineEdit#2924587633585>' on a base object of type 'Dictionary'.
  res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.gd:173 - Invalid access to property or key 'V3ZLineEdit:<LineEdit#2924822514623>' on a base object of type 'Dictionary'.

@urbit-pilled
Copy link
Contributor Author

@manuq fixed in bba1d22

Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working very well now!
Grabación de pantalla desde 2024-12-17 09-03-13.webm

As last thing, could you add some blocks for Vector3 handling? Like these ones for Vector2:
Captura desde 2024-12-17 09-05-51

Basically:

  • Blocks for obtaining the Vector3 components (x, y, z).
  • A block for composing a Vector3 with 3 components.

Then it's good to merge.

@urbit-pilled
Copy link
Contributor Author

Ok, just added the new blocks in e2e7397 @manuq

@urbit-pilled urbit-pilled requested a review from manuq December 17, 2024 13:09
Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new blocks look good! As with the previous PR, please rebase into one or multiple commits with descriptive commit messages.

Vector3 was previously only supported as a getter block, now it also is supported as a setter along with new math blocks and a new vector3 variable block.

I made the following changes
- adding vector3 to the parameter_input scene
- adding vector3 to types.gd
- adding vector3 to blocks_catalog.gd and blocks_ast.gd
- created new math blocks: vector3_x, vector3_y, vector3_z and vector3_multiply
- created new vector3 variable block

Fixes endlessm#330
@urbit-pilled
Copy link
Contributor Author

just squashed the commits, should be ready to merge now.

@manuq
Copy link
Contributor

manuq commented Dec 17, 2024

The blocks for Vector3 operations are working!
Grabación de pantalla desde 2024-12-17 13-34-32.webm

@manuq manuq merged commit 28f102e into endlessm:main Dec 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants