curve_base now has different initialization methods for the curve. sd_shape_line now initializes it's curve to the 1,1 variant.

This commit is contained in:
Relintai 2021-10-26 11:36:48 +02:00
parent 920d4895e1
commit c7a2fea2c4
2 changed files with 12 additions and 1 deletions

View File

@ -10,7 +10,15 @@ class Point:
ls = nls ls = nls
rs = nrs rs = nrs
export(PoolRealArray) var points = [ 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0 ] export(PoolRealArray) var points
func init_points_01():
if points.size() == 0:
points = [ 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0 ]
func init_points_11():
if points.size() == 0:
points = [ 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0 ]
func to_string() -> String: func to_string() -> String:
var rv = PoolStringArray() var rv = PoolStringArray()

View File

@ -10,6 +10,9 @@ export(Vector2) var A : Vector2 = Vector2(-0.3, -0.3)
export(Vector2) var B : Vector2 = Vector2(0.3, 0.3) export(Vector2) var B : Vector2 = Vector2(0.3, 0.3)
export(float) var width : float = 0.1 export(float) var width : float = 0.1
func _init():
init_points_11()
func _init_properties(): func _init_properties():
if !output: if !output:
output = MMNodeUniversalProperty.new() output = MMNodeUniversalProperty.new()