-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #330
- Loading branch information
1 parent
a9c7193
commit 5afe404
Showing
10 changed files
with
308 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://bff7cwmpisihj"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_52jwf"] | ||
|
||
[resource] | ||
script = ExtResource("1_52jwf") | ||
name = &"vector3_multiply" | ||
target_node_class = "" | ||
description = "Multiplies a Vector3 with a number. Use this, for example, to get a point some distance away along an angle." | ||
category = "Math" | ||
type = 3 | ||
variant_type = 9 | ||
display_template = "multiply {vector: VECTOR3} by {number: FLOAT}" | ||
code_template = "{vector} * {number}" | ||
defaults = { | ||
"number": 1.0, | ||
"vector": Vector3(1, 1, 1) | ||
} | ||
signal_name = "" | ||
scope = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://cehtd3jqu5es2"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_p3bft"] | ||
|
||
[resource] | ||
script = ExtResource("1_p3bft") | ||
name = &"vector3_x" | ||
target_node_class = "" | ||
description = "Gives the x of a [i]Vector3[/i]" | ||
category = "Math" | ||
type = 3 | ||
variant_type = 3 | ||
display_template = "x of {vector3: VECTOR3}" | ||
code_template = "{vector3}.x" | ||
defaults = { | ||
"vector3": Vector3(0, 0, 0) | ||
} | ||
signal_name = "" | ||
scope = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://cehtd3jqu5es2"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_p3bft"] | ||
|
||
[resource] | ||
script = ExtResource("1_p3bft") | ||
name = &"vector3_y" | ||
target_node_class = "" | ||
description = "Gives the y of a [i]Vector3[/i]" | ||
category = "Math" | ||
type = 3 | ||
variant_type = 3 | ||
display_template = "y of {vector3: VECTOR3}" | ||
code_template = "{vector3}.y" | ||
defaults = { | ||
"vector3": Vector3(0, 0, 0) | ||
} | ||
signal_name = "" | ||
scope = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://cehtd3jqu5es2"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_p3bft"] | ||
|
||
[resource] | ||
script = ExtResource("1_p3bft") | ||
name = &"vector3_z" | ||
target_node_class = "" | ||
description = "Gives the z of a [i]Vector3[/i]" | ||
category = "Math" | ||
type = 3 | ||
variant_type = 3 | ||
display_template = "z of {vector3: VECTOR3}" | ||
code_template = "{vector3}.z" | ||
defaults = { | ||
"vector3": Vector3(0, 0, 0) | ||
} | ||
signal_name = "" | ||
scope = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://ddj24k1fp0s82"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_ilw3v"] | ||
|
||
[resource] | ||
script = ExtResource("1_ilw3v") | ||
name = &"vector3" | ||
target_node_class = "" | ||
description = "" | ||
category = "Math" | ||
type = 3 | ||
variant_type = 9 | ||
display_template = "vector3 x: {x: FLOAT} y: {y: FLOAT}: z: {z: FLOAT}" | ||
code_template = "Vector3({x}, {y}, {z})" | ||
defaults = { | ||
"x": 0.0, | ||
"y": 0.0, | ||
"z": 0.0 | ||
} | ||
signal_name = "" | ||
scope = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.