Some z space bug fixing.

This commit is contained in:
mono 2022-01-11 21:57:07 +01:00
parent 2c3390ff13
commit 65a11991fc
12 changed files with 39 additions and 23 deletions

View File

@ -3,7 +3,14 @@ extends Button
func _on_Button_pressed(): func _on_Button_pressed():
print(SummerDay.test) SummerDay.z_space_manager.z_ranges.clear()
print(SummerDay.canvas_state.test) var a = SummerDayZRange.new()
print(SummerDay.canvas_state.fill_transform) a.index = 0
print(SummerDay.canvas_state.rect_size) var b = SummerDayZRange.new()
var c = SummerDayZRange.new()
b.index = 1
a.index = 1
c.index = 2
c.index = 0
b.index = 0
print(str(a.index) + ", " + str(b.index) + ", " + str(c.index))

View File

@ -2,7 +2,7 @@
[sub_resource type="Image" id=1] [sub_resource type="Image" id=1]
data = { data = {
"data": PoolByteArray( 163, 97, 129, 190, 169, 186, 124, 187, 0, 0, 0, 0, 134, 159, 23, 62, 35, 171, 151, 187, 128, 246, 130, 190, 0, 0, 0, 0, 174, 147, 27, 62, 235, 149, 61, 61, 170, 244, 29, 61, 0, 0, 0, 0, 0, 0, 128, 63, 235, 149, 61, 61, 170, 244, 29, 61, 0, 0, 0, 0, 0, 0, 128, 63, 149, 180, 151, 190, 43, 243, 217, 188, 0, 0, 0, 0, 194, 193, 28, 190, 74, 160, 139, 188, 18, 181, 131, 190, 0, 0, 0, 0, 105, 78, 11, 190, 170, 140, 27, 62, 130, 27, 96, 62, 0, 0, 0, 0, 0, 0, 128, 191, 170, 140, 27, 190, 130, 27, 96, 190, 0, 0, 0, 0, 0, 0, 128, 63 ), "data": PoolByteArray( 65, 239, 176, 190, 71, 61, 75, 189, 0, 0, 0, 0, 62, 8, 104, 62, 225, 23, 108, 188, 79, 178, 95, 190, 0, 0, 0, 0, 235, 85, 150, 61, 238, 130, 247, 61, 4, 190, 218, 62, 0, 0, 0, 0, 0, 0, 128, 63, 238, 130, 247, 61, 4, 190, 218, 62, 0, 0, 0, 0, 0, 0, 128, 63, 149, 180, 151, 190, 43, 243, 217, 188, 0, 0, 0, 0, 194, 193, 28, 190, 74, 160, 139, 188, 18, 181, 131, 190, 0, 0, 0, 0, 105, 78, 11, 190, 170, 140, 27, 62, 130, 27, 96, 62, 0, 0, 0, 0, 0, 0, 128, 191, 170, 140, 27, 190, 130, 27, 96, 190, 0, 0, 0, 0, 0, 0, 128, 63 ),
"format": "RGBAFloat", "format": "RGBAFloat",
"height": 1, "height": 1,
"mipmaps": false, "mipmaps": false,

View File

@ -1,6 +1,6 @@
tool tool
extends SummerDayEditable extends SummerDayEditable
class_name SummerDayEditableTube class_name SummerDayEditableCuboid
export(PoolVector2Array) var vertices = PoolVector2Array([ export(PoolVector2Array) var vertices = PoolVector2Array([
Vector2(-0.4, -0.4), Vector2(-0.4, -0.4),

View File

@ -18,11 +18,11 @@ var squished_z_front_limit: float
func _set_index(value: int): func _set_index(value: int):
if listed: if listed:
SummerDay.z_range_manager.move_z_range(self, value) SummerDay.z_space_manager.move_z_range(self, value)
_index = value _index = value
else: else:
_index = value _index = value
SummerDay.z_range_manager.add_z_range(self) SummerDay.z_space_manager.add_z_range(self)
listed = true listed = true

View File

@ -1,6 +1,6 @@
tool tool
extends Reference extends Reference
class_name SummerDayZRangeManager class_name SummerDayZSpaceManager
var z_ranges := [] var z_ranges := []

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2] [gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/summer_day/user_interface/canvas/canvas.tscn" type="PackedScene" id=1] [ext_resource path="res://addons/summer_day/user_interface/canvas/canvas.tscn" type="PackedScene" id=1]
[ext_resource path="res://addons/summer_day/main_screen.gd" type="Script" id=2] [ext_resource path="res://addons/summer_day/main_screen.gd" type="Script" id=2]
[ext_resource path="res://Buctton.gd" type="Script" id=3]
[node name="MainScreen" type="Control"] [node name="MainScreen" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
@ -13,3 +14,11 @@ __meta__ = {
} }
[node name="Canvas" parent="." instance=ExtResource( 1 )] [node name="Canvas" parent="." instance=ExtResource( 1 )]
[node name="Button" type="Button" parent="."]
margin_right = 97.0
margin_bottom = 20.0
text = "SKull"
script = ExtResource( 3 )
[connection signal="pressed" from="Button" to="Button" method="_on_Button_pressed"]

View File

@ -51,7 +51,7 @@ void fragment() {
[sub_resource type="ShaderMaterial" id=7] [sub_resource type="ShaderMaterial" id=7]
render_priority = 1 render_priority = 1
shader = SubResource( 6 ) shader = SubResource( 6 )
shader_param/canvas_transform = Basis( 0.00240964, 0, -1, 0, -0.00326797, 1, 0, 0, 1 ) shader_param/canvas_transform = Basis( 0.999548, 0, -0.339853, 0, -1.22596, 0.160758, 0, 0, 1 )
[node name="Canvas" type="PanelContainer"] [node name="Canvas" type="PanelContainer"]
anchor_right = 1.0 anchor_right = 1.0

View File

@ -4,7 +4,7 @@ extends Node
var document: SummerDayDocument var document: SummerDayDocument
var canvas_state: SummerDayCanvasState var canvas_state: SummerDayCanvasState
var z_range_manager := SummerDayZRangeManager.new() var z_space_manager := SummerDayZSpaceManager.new()
var interaction_hint: SummerDayInteractionHint var interaction_hint: SummerDayInteractionHint
var debug_info: Label var debug_info: Label

View File

@ -5,12 +5,12 @@
[ext_resource path="res://addons/summer_day/data/document/table.gd" type="Script" id=3] [ext_resource path="res://addons/summer_day/data/document/table.gd" type="Script" id=3]
[ext_resource path="res://addons/summer_day/data/document/track.gd" type="Script" id=4] [ext_resource path="res://addons/summer_day/data/document/track.gd" type="Script" id=4]
[ext_resource path="res://production/blueprints/mannequin/mannequin.tres" type="Resource" id=5] [ext_resource path="res://production/blueprints/mannequin/mannequin.tres" type="Resource" id=5]
[ext_resource path="res://addons/summer_day/data/blueprint/template_editables/tube.gd" type="Script" id=6] [ext_resource path="res://addons/summer_day/data/blueprint/template_editables/cuboid.gd" type="Script" id=6]
[ext_resource path="res://Bullshit/THIS SHOULD FIX IThoefully.tres" type="Texture" id=7] [ext_resource path="res://Bullshit/THIS SHOULD FIX IThoefully.tres" type="Texture" id=7]
[sub_resource type="Image" id=1] [sub_resource type="Image" id=1]
data = { data = {
"data": PoolByteArray( 232, 246, 173, 190, 47, 95, 49, 189, 0, 0, 0, 0, 246, 232, 104, 62, 58, 231, 73, 188, 112, 8, 93, 190, 0, 0, 0, 0, 123, 148, 148, 61, 8, 97, 252, 61, 251, 182, 221, 62, 0, 0, 0, 0, 0, 0, 128, 63, 8, 97, 252, 61, 251, 182, 221, 62, 0, 0, 0, 0, 0, 0, 128, 63, 149, 180, 151, 190, 60, 243, 217, 188, 0, 0, 0, 0, 206, 193, 28, 190, 104, 160, 139, 188, 17, 181, 131, 190, 0, 0, 0, 0, 95, 78, 11, 190, 159, 140, 27, 62, 126, 27, 96, 62, 0, 0, 0, 0, 0, 0, 128, 191, 159, 140, 27, 190, 126, 27, 96, 190, 0, 0, 0, 0, 0, 0, 128, 63 ), "data": PoolByteArray( 65, 239, 176, 190, 71, 61, 75, 189, 0, 0, 0, 0, 62, 8, 104, 62, 225, 23, 108, 188, 79, 178, 95, 190, 0, 0, 0, 0, 235, 85, 150, 61, 238, 130, 247, 61, 4, 190, 218, 62, 0, 0, 0, 0, 0, 0, 128, 63, 238, 130, 247, 61, 4, 190, 218, 62, 0, 0, 0, 0, 0, 0, 128, 63, 149, 180, 151, 190, 43, 243, 217, 188, 0, 0, 0, 0, 194, 193, 28, 190, 74, 160, 139, 188, 18, 181, 131, 190, 0, 0, 0, 0, 105, 78, 11, 190, 170, 140, 27, 62, 130, 27, 96, 62, 0, 0, 0, 0, 0, 0, 128, 191, 170, 140, 27, 190, 130, 27, 96, 190, 0, 0, 0, 0, 0, 0, 128, 63 ),
"format": "RGBAFloat", "format": "RGBAFloat",
"height": 1, "height": 1,
"mipmaps": false, "mipmaps": false,
@ -26,7 +26,7 @@ image = SubResource( 1 )
[sub_resource type="Resource" id=3] [sub_resource type="Resource" id=3]
script = ExtResource( 6 ) script = ExtResource( 6 )
table = SubResource( 2 ) table = SubResource( 2 )
vertices = PoolVector2Array( -0.756447, -0.652097, 0.124979, -0.403235, 0.123889, 0.100852, -0.396248, 0.0976196, -0.1, -0.1, 0.4, -0.1, 1.3759, 0.677717, -0.1, 0.4 ) vertices = PoolVector2Array( -0.756447, -0.652097, 0.124979, -0.403235, 0.123889, 0.100852, -0.396248, 0.0976196, -0.108909, -0.103003, 0.4, -0.1, 1.3759, 0.677717, -0.1, 0.4 )
[sub_resource type="Resource" id=4] [sub_resource type="Resource" id=4]
script = ExtResource( 2 ) script = ExtResource( 2 )

View File

@ -43,7 +43,7 @@ extends SummerDayBlueprint
func _create_cell(table: SummerDayTable): func _create_cell(table: SummerDayTable):
var cell = SummerDayCell.new() var cell = SummerDayCell.new()
var cylinder = SummerDayEditableTube.new() var cylinder = SummerDayEditableCuboid.new()
cylinder.table = table cylinder.table = table
cell.editable_list.append(cylinder) cell.editable_list.append(cylinder)
return cell return cell

View File

@ -57,5 +57,5 @@ void fragment() {
[resource] [resource]
shader = SubResource( 1 ) shader = SubResource( 1 )
shader_param/canvas_transform = Basis( 1.08434, 0, -0.963855, 0, -2, 1, 0, 0, 1 ) shader_param/canvas_transform = Basis( 0.553425, 0, -0.374799, 0, -0.678787, 0.280612, 0, 0, 1 )
shader_param/table = ExtResource( 1 ) shader_param/table = ExtResource( 1 )

View File

@ -80,9 +80,9 @@ _global_script_classes=[ {
"path": "res://addons/summer_day/data/blueprint/editable.gd" "path": "res://addons/summer_day/data/blueprint/editable.gd"
}, { }, {
"base": "SummerDayEditable", "base": "SummerDayEditable",
"class": "SummerDayEditableTube", "class": "SummerDayEditableCuboid",
"language": "GDScript", "language": "GDScript",
"path": "res://addons/summer_day/data/blueprint/template_editables/tube.gd" "path": "res://addons/summer_day/data/blueprint/template_editables/cuboid.gd"
}, { }, {
"base": "SummerDayTool", "base": "SummerDayTool",
"class": "SummerDayFreeTransformCanvasTool", "class": "SummerDayFreeTransformCanvasTool",
@ -185,9 +185,9 @@ _global_script_classes=[ {
"path": "res://addons/summer_day/data/blueprint/z_range.gd" "path": "res://addons/summer_day/data/blueprint/z_range.gd"
}, { }, {
"base": "Reference", "base": "Reference",
"class": "SummerDayZRangeManager", "class": "SummerDayZSpaceManager",
"language": "GDScript", "language": "GDScript",
"path": "res://addons/summer_day/data/blueprint/z_range_manager.gd" "path": "res://addons/summer_day/data/blueprint/z_space_manager.gd"
}, { }, {
"base": "SummerDayTool", "base": "SummerDayTool",
"class": "SummerDayZoomCanvasTool", "class": "SummerDayZoomCanvasTool",
@ -214,7 +214,7 @@ _global_script_class_icons={
"SummerDayDisplay": "", "SummerDayDisplay": "",
"SummerDayDocument": "", "SummerDayDocument": "",
"SummerDayEditable": "", "SummerDayEditable": "",
"SummerDayEditableTube": "", "SummerDayEditableCuboid": "",
"SummerDayFreeTransformCanvasTool": "", "SummerDayFreeTransformCanvasTool": "",
"SummerDayHandCanvasTool": "", "SummerDayHandCanvasTool": "",
"SummerDayInteractionHint": "", "SummerDayInteractionHint": "",
@ -235,7 +235,7 @@ _global_script_class_icons={
"SummerDayTrack": "", "SummerDayTrack": "",
"SummerDayViewportHandler": "", "SummerDayViewportHandler": "",
"SummerDayZRange": "", "SummerDayZRange": "",
"SummerDayZRangeManager": "", "SummerDayZSpaceManager": "",
"SummerDayZoomCanvasTool": "", "SummerDayZoomCanvasTool": "",
"VeryWorse": "" "VeryWorse": ""
} }