├── .gitignore ├── example ├── assets │ ├── basic.png │ ├── shadow.png │ └── tileset.png ├── code │ ├── example.gd │ ├── shadow_example_body.gd │ └── player.gd ├── static_daicon.tscn ├── sort_system_example.tscn ├── shadow_example.tscn ├── example.tscn ├── shader_example.tscn └── player.tscn ├── addons └── daicon │ ├── mesh │ ├── blocks.blend │ └── blocks.tscn │ ├── press_kit │ ├── logo.png │ ├── nodes.png │ ├── favicon.png │ ├── 1 version.png │ ├── 1-5 version.png │ ├── logo_monochrome.png │ └── daicon_docs_logo.png │ ├── nodes │ ├── daicon_node.gd │ ├── daicon_map_layer_node.gd │ ├── daicon_map_node.gd │ ├── daicon_shadow.gd │ └── static_daicon_node.gd │ ├── scripts │ ├── static_daicon.gd │ ├── rigid_daicon.gd │ ├── animated_daicon.gd │ ├── kinematic_daicon.gd │ └── daicon.gd │ ├── plugin.cfg │ ├── shaders │ ├── circle.gdshader │ └── blur_circle.gdshader │ ├── daicon_plugin.gd │ └── icons │ ├── daicon_shadow.svg │ ├── daicon_map.svg │ ├── daicon.svg │ ├── daicon_map_layer.svg │ ├── static_daicon.svg │ ├── kinematic_daicon.svg │ ├── animated_daicon.svg │ └── rigid_daicon.svg ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .venv 3 | .git -------------------------------------------------------------------------------- /example/assets/basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/example/assets/basic.png -------------------------------------------------------------------------------- /example/assets/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/example/assets/shadow.png -------------------------------------------------------------------------------- /example/assets/tileset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/example/assets/tileset.png -------------------------------------------------------------------------------- /addons/daicon/mesh/blocks.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/mesh/blocks.blend -------------------------------------------------------------------------------- /addons/daicon/press_kit/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/logo.png -------------------------------------------------------------------------------- /addons/daicon/press_kit/nodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/nodes.png -------------------------------------------------------------------------------- /addons/daicon/press_kit/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/favicon.png -------------------------------------------------------------------------------- /addons/daicon/press_kit/1 version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/1 version.png -------------------------------------------------------------------------------- /addons/daicon/press_kit/1-5 version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/1-5 version.png -------------------------------------------------------------------------------- /addons/daicon/press_kit/logo_monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/logo_monochrome.png -------------------------------------------------------------------------------- /addons/daicon/press_kit/daicon_docs_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arukurei/Daicon/HEAD/addons/daicon/press_kit/daicon_docs_logo.png -------------------------------------------------------------------------------- /addons/daicon/mesh/blocks.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://danxqtmwyagwn"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://b5sdpxhwm5e1x" path="res://addons/daicon/mesh/blocks.blend" id="1_6hmc7"] 4 | 5 | [node name="blocks" instance=ExtResource("1_6hmc7")] 6 | -------------------------------------------------------------------------------- /addons/daicon/nodes/daicon_node.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | @icon("res://addons/daicon/icons/daicon.svg") 3 | class_name Daicon extends Node2D 4 | 5 | @export var shader_trigger_nodes : Array[Node] 6 | @export var shader_target_nodes : Array[Node] 7 | 8 | func _ready() -> void: 9 | self.set_y_sort_enabled(true) 10 | -------------------------------------------------------------------------------- /addons/daicon/scripts/static_daicon.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends StaticDaicon 3 | 4 | func _ready() -> void: 5 | super._ready() 6 | 7 | func _process(delta: float) -> void: 8 | super._process(delta) 9 | 10 | func _physics_process(delta: float) -> void: 11 | if not Engine.is_editor_hint(): 12 | #LOGIC 13 | 14 | #LOGIC END 15 | pass 16 | 17 | func _validate_property(property: Dictionary) -> void: 18 | super._validate_property(property) 19 | -------------------------------------------------------------------------------- /addons/daicon/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="Daicon" 4 | description="Daicon is a Godot plugin for creating 2.5D games. 5 | 6 | Its principle is to use 3D space to move 2D objects. In this way it simulates the 3D depth of the environment in 2D dimension. 7 | 8 | The addon provides the developer with a set of new nodes and additional tools that combine 3D and 2D capabilities simultaneously." 9 | author="Alkrei" 10 | version="1.5" 11 | script="daicon_plugin.gd" 12 | -------------------------------------------------------------------------------- /addons/daicon/scripts/rigid_daicon.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends RigidDaicon 3 | 4 | func _ready() -> void: 5 | super._ready() 6 | 7 | func _process(delta: float) -> void: 8 | super._process(delta) 9 | 10 | func _physics_process(delta: float) -> void: 11 | super._physics_process(delta) 12 | if not Engine.is_editor_hint(): 13 | #LOGIC 14 | 15 | #LOGIC END 16 | pass 17 | 18 | func _validate_property(property: Dictionary) -> void: 19 | super._validate_property(property) 20 | -------------------------------------------------------------------------------- /addons/daicon/scripts/animated_daicon.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends AnimatedDaicon 3 | 4 | func _ready() -> void: 5 | super._ready() 6 | 7 | func _process(delta: float) -> void: 8 | super._process(delta) 9 | 10 | func _physics_process(delta: float) -> void: 11 | if not Engine.is_editor_hint(): 12 | #LOGIC 13 | 14 | #LOGIC END 15 | 16 | #d3.move_and_slide() 17 | #update_pos() 18 | pass 19 | 20 | func _validate_property(property: Dictionary) -> void: 21 | super._validate_property(property) 22 | -------------------------------------------------------------------------------- /addons/daicon/scripts/kinematic_daicon.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends KinematicDaicon 3 | 4 | func _ready() -> void: 5 | super._ready() 6 | 7 | func _process(delta: float) -> void: 8 | super._process(delta) 9 | 10 | func _physics_process(delta: float) -> void: 11 | if not Engine.is_editor_hint(): 12 | #LOGIC 13 | 14 | #LOGIC END 15 | 16 | #d3.move_and_slide() 17 | #update_pos() 18 | pass 19 | 20 | func _validate_property(property: Dictionary) -> void: 21 | super._validate_property(property) 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /example/code/example.gd: -------------------------------------------------------------------------------- 1 | extends Daicon 2 | 3 | var PositionArray : Array[Vector2] = [] 4 | 5 | func _ready() -> void: 6 | super._ready() 7 | 8 | func _physics_process(delta: float) -> void: 9 | shader_target_nodes.sort_custom(func(a, b): return a.z_index < b.z_index) 10 | for shader_target in shader_target_nodes: 11 | PositionArray.clear() 12 | shader_trigger_nodes.sort_custom(func(a, b): return a.z_index < b.z_index) 13 | for shader_trigger in shader_trigger_nodes: 14 | if shader_trigger.shader_cast.is_colliding() and shader_target.z_index >= shader_trigger.z_index: 15 | PositionArray.append(get_viewport().get_final_transform() * shader_trigger.get_global_transform_with_canvas() * Vector2(0,0)) 16 | shader_target.material.set_shader_parameter("CircleCentres", PositionArray) 17 | shader_target.material.set_shader_parameter("NumCircleCentres", PositionArray.size()) 18 | -------------------------------------------------------------------------------- /addons/daicon/scripts/daicon.gd: -------------------------------------------------------------------------------- 1 | extends Daicon 2 | 3 | var PositionArray : Array[Vector2] = [] 4 | 5 | func _ready() -> void: 6 | super._ready() 7 | 8 | func _physics_process(delta: float) -> void: 9 | shader_target_nodes.sort_custom(func(a, b): return a.z_index < b.z_index) 10 | for shader_target in shader_target_nodes: 11 | PositionArray.clear() 12 | shader_trigger_nodes.sort_custom(func(a, b): return a.z_index < b.z_index) 13 | for shader_trigger in shader_trigger_nodes: 14 | if shader_trigger.shader_cast.is_colliding() and shader_target.z_index >= shader_trigger.z_index: 15 | PositionArray.append(get_viewport().get_final_transform() * shader_trigger.get_global_transform_with_canvas() * Vector2(0,0)) 16 | shader_target.material.set_shader_parameter("CircleCentres", PositionArray) 17 | shader_target.material.set_shader_parameter("NumCircleCentres", PositionArray.size()) 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /example/code/shadow_example_body.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends KinematicDaicon 3 | 4 | const SPEED = 5 5 | const JUMP_VELOCITY = 5 6 | const gravity = 10 7 | const accelaration = 20 8 | 9 | var movement_input := Vector2.ZERO 10 | 11 | func _ready() -> void: 12 | super._ready() 13 | 14 | func _process(delta: float) -> void: 15 | super._process(delta) 16 | 17 | func _physics_process(delta: float) -> void: 18 | if not Engine.is_editor_hint(): 19 | movement_input = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") 20 | var direction := Vector3(movement_input.x, 0, movement_input.y).normalized() 21 | 22 | var y_vel = d3.velocity.y 23 | d3.velocity = d3.velocity.move_toward(direction * SPEED, accelaration * delta) 24 | d3.velocity.y = y_vel - gravity * delta 25 | 26 | if Input.is_action_just_pressed("ui_accept") and d3.is_on_floor(): 27 | d3.velocity.y += JUMP_VELOCITY 28 | 29 | d3.move_and_slide() 30 | update_pos() 31 | 32 | func _validate_property(property: Dictionary) -> void: 33 | super._validate_property(property) 34 | -------------------------------------------------------------------------------- /addons/daicon/shaders/circle.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | // needs to match the number of values being sent 4 | const int MAX_POSITIONS = 100; 5 | 6 | uniform vec2 CircleCentres[MAX_POSITIONS]; 7 | uniform int NumCircleCentres : hint_range(0, 100, 1) = 0; 8 | uniform float CircleRadius = 75.0; 9 | uniform float CircleBlur : hint_range(0.0, 1.0, 0.01) = 0.01; 10 | 11 | void fragment() 12 | { 13 | float circle_signal = 0.0; 14 | // loop over possible centres 15 | for ( int i = 0; i < NumCircleCentres; ++i ) 16 | { 17 | // compute distance between fragment and circle centre 18 | float circle_dist = distance( CircleCentres[i], FRAGCOORD.xy ); 19 | // compute signal based on circle radius 20 | circle_signal = max( circle_signal, smoothstep( CircleRadius, CircleRadius*(1.0-CircleBlur), circle_dist ) ); 21 | } 22 | // read the base texture color 23 | vec4 tex_color = texture( TEXTURE, UV ); 24 | // set output color to the read texture value 25 | COLOR = tex_color; 26 | // now modify the alpha by the circle 27 | COLOR.a *= ( 1.0 - circle_signal ); 28 | } -------------------------------------------------------------------------------- /addons/daicon/shaders/blur_circle.gdshader: -------------------------------------------------------------------------------- 1 | shader_type canvas_item; 2 | 3 | // needs to match the number of values being sent 4 | const int MAX_POSITIONS = 100; 5 | 6 | uniform vec2 CircleCentres[MAX_POSITIONS]; 7 | uniform int NumCircleCentres : hint_range(0, 100, 1) = 0; 8 | uniform float CircleRadius = 100.0; 9 | uniform float CircleBlur : hint_range(0.0, 1.0, 0.01) = 0.01; 10 | 11 | void fragment() 12 | { 13 | float circle_signal = 0.0; 14 | // loop over possible centres 15 | for ( int i = 0; i < NumCircleCentres; ++i ) 16 | { 17 | // compute distance between fragment and circle centre 18 | float circle_blur = clamp( 0.0, 1.0, CircleBlur ); 19 | float circle_dist = distance( CircleCentres[i], FRAGCOORD.xy ); 20 | // compute signal based on circle radius 21 | circle_signal = max( circle_signal, smoothstep( CircleRadius, CircleRadius*(1.0-circle_blur), circle_dist ) ); 22 | } 23 | // read the base texture color 24 | vec4 tex_color = texture( TEXTURE, UV ); 25 | // set output color to the read texture value 26 | COLOR = tex_color; 27 | // now modify the alpha by the circle 28 | COLOR.a *= ( 1.0 - circle_signal ); 29 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Alkrei 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![1-5 version.png](addons/daicon/press_kit/1-5%20version.png) 2 | 3 | # Daicon 4 | 5 | Daicon is a Godot plugin for creating 2.5D games. 6 | Its principle is to use 3D space to move 2D objects. In this way it simulates the 3D depth of the environment in 2D dimension. 7 | The addon provides the developer with a set of new nodes and additional tools that combine 3D and 2D capabilities simultaneously. 8 | 9 | ![NODES](https://github.com/user-attachments/assets/fd7c5759-a461-488b-a838-b340924e372b) 10 | 11 | # Links & Support 12 | 13 | - [Documentation](https://daicon-docs.readthedocs.io/en/latest/) 14 | 15 | - [ItchIO](https://alkrei.itch.io/daicon) 16 | 17 | - [Bluesky](https://bsky.app/profile/arukurei.bsky.social) 18 | 19 | - [Telegram](https://t.me/G_Quasar) 20 | 21 | - [YouTube](https://www.youtube.com/@arukurei) 22 | 23 | - [Discord](https://discord.gg/663eYk5ZGA) 24 | 25 | If you like Daicon and want to support its development, you can donate to the project via [PayPal](https://www.paypal.com/donate/?hosted_button_id=LF5SHGQDXK2PG) or [ItchIO](https://alkrei.itch.io/daicon). Your support is very much appreciated and helps keep the project going! 26 | -------------------------------------------------------------------------------- /addons/daicon/daicon_plugin.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends EditorPlugin 3 | 4 | var addon_path = get_script().get_path().get_base_dir() 5 | var template_search_path = ProjectSettings.get('editor/script/templates_search_path') 6 | 7 | var pathes = {template_search_path + '/Daicon/' : 'daicon.gd', 8 | template_search_path + '/KinematicDaicon/' : 'kinematic_daicon.gd', 9 | template_search_path + '/StaticDaicon/' : 'static_daicon.gd', 10 | template_search_path + '/AnimatedDaicon/' : 'animated_daicon.gd', 11 | template_search_path + '/RigidDaicon/' : 'rigid_daicon.gd'} 12 | 13 | func _enter_tree() -> void: 14 | print_debug("Daicon Enabled") 15 | create_templates() 16 | 17 | func create_templates(): 18 | for path in pathes: 19 | if not DirAccess.dir_exists_absolute(path): 20 | var dir = DirAccess.open('res://') 21 | if dir: dir.make_dir_recursive(path) 22 | if not FileAccess.file_exists(path + pathes.get(path)): 23 | var source = ResourceLoader.load(addon_path + '/scripts/' + pathes.get(path)) 24 | if source: ResourceSaver.save(source.duplicate(true), path + pathes.get(path)) 25 | 26 | func _exit_tree() -> void: 27 | print_debug('Daicon Disabled') 28 | -------------------------------------------------------------------------------- /addons/daicon/icons/daicon_shadow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/code/player.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends KinematicDaicon 3 | 4 | const SPEED = 5 5 | const JUMP_VELOCITY = 5 6 | const gravity = 10 7 | const accelaration = 20 8 | @onready var animation_tree : AnimationTree = $AnimationTree 9 | @onready var animation = animation_tree.get("parameters/playback") 10 | 11 | var movement_input := Vector2.ZERO 12 | 13 | func _ready() -> void: 14 | super._ready() 15 | 16 | func _process(delta: float) -> void: 17 | super._process(delta) 18 | 19 | func _validate_property(property: Dictionary) -> void: 20 | super._validate_property(property) 21 | 22 | func _physics_process(delta: float) -> void: 23 | if not Engine.is_editor_hint(): 24 | movement_input = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down") 25 | var direction := Vector3(movement_input.x, 0, movement_input.y).normalized() 26 | if direction != Vector3.ZERO: 27 | set_animation_direction(movement_input) 28 | 29 | var y_vel = d3.velocity.y 30 | d3.velocity = d3.velocity.move_toward(direction * SPEED, accelaration * delta) 31 | d3.velocity.y = y_vel - gravity * delta 32 | 33 | if Input.is_action_just_pressed("ui_accept") and d3.is_on_floor(): 34 | d3.velocity.y += JUMP_VELOCITY 35 | 36 | d3.move_and_slide() 37 | player_animation(direction, d3.velocity) 38 | update_pos() 39 | 40 | func player_animation(direction, d3_velocity): 41 | if d3_velocity == Vector3.ZERO: 42 | animation.travel("Idle") 43 | elif d3_velocity != Vector3.ZERO: 44 | if direction: 45 | if d3.is_on_floor(): 46 | animation.travel("Move") 47 | else: 48 | animation.travel("Jump") 49 | else: 50 | if not d3.is_on_floor(): 51 | animation.travel("Jump Down") 52 | 53 | func set_animation_direction(direction): 54 | animation_tree.set("parameters/Idle/blend_position", direction) 55 | animation_tree.set("parameters/Move/blend_position", direction) 56 | animation_tree.set("parameters/Jump/blend_position", direction) 57 | animation_tree.set("parameters/Jump Down/blend_position", direction) 58 | -------------------------------------------------------------------------------- /addons/daicon/nodes/daicon_map_layer_node.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | @icon("res://addons/daicon/icons/daicon_map_layer.svg") 3 | class_name DaiconMapLayer extends TileMapLayer 4 | 5 | var grid_map : GridMap 6 | 7 | #region DaiconMapLayer Exports 8 | 9 | @export var mesh_library : MeshLibrary: 10 | set(library): 11 | if grid_map: grid_map.mesh_library = library 12 | mesh_library = library 13 | get(): 14 | return mesh_library 15 | @export var physics_material : PhysicsMaterial: 16 | set(library): 17 | if grid_map: grid_map.physics_material = library 18 | physics_material = library 19 | get(): 20 | return physics_material 21 | @export var visible_3d: bool = true: 22 | set(value): 23 | if grid_map: grid_map.visible = value 24 | visible_3d = value 25 | get(): 26 | return visible_3d 27 | 28 | @export_group("Cell") 29 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var size: Vector3 = Vector3(1, 1, 1): 30 | set(v_3): 31 | if grid_map: grid_map.cell_size = v_3 32 | size = v_3 33 | get(): 34 | return size 35 | 36 | @export_group("Collision") 37 | @export_flags_3d_physics var layer: int = 1: 38 | set(collision_layer): 39 | if grid_map: grid_map.collision_layer = collision_layer 40 | layer = collision_layer 41 | get(): 42 | return layer 43 | @export_flags_3d_navigation var mask: int = 1: 44 | set(collision_mask): 45 | if grid_map: grid_map.collision_mask = collision_mask 46 | mask = collision_mask 47 | get(): 48 | return mask 49 | @export_group("Navigation") 50 | @export var bake_navigation: bool = false: 51 | set(value): 52 | if grid_map: grid_map.bake_navigation = value 53 | bake_navigation = value 54 | get(): 55 | return bake_navigation 56 | @export_group("Transorm") 57 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var rotation_3d: Vector3 = Vector3(0, 0, 0): 58 | set(v_3): 59 | if grid_map: grid_map.rotation = v_3 60 | rotation_3d = v_3 61 | get(): 62 | return rotation_3d 63 | @export_custom(PROPERTY_HINT_LINK, "") var scale_3d: Vector3 = Vector3(1, 1, 1): 64 | set(v_3): 65 | if grid_map: grid_map.scale = v_3 66 | scale_3d = v_3 67 | get(): 68 | return scale_3d 69 | 70 | #endregion 71 | 72 | func _ready() -> void: 73 | if not tile_set: 74 | self.set_y_sort_enabled(true) 75 | self.tile_set = TileSet.new() 76 | self.tile_set.add_custom_data_layer(0) 77 | self.tile_set.set_custom_data_layer_name(0, "Item") 78 | self.tile_set.set_custom_data_layer_type(0, TYPE_INT) 79 | #Expand GridMap 80 | grid_map = GridMap.new() 81 | grid_map.set_name("GridMap") 82 | add_child(grid_map) 83 | move_child(grid_map, 0) 84 | 85 | grid_map.position.z = -0.5 86 | grid_map = get_child(0) 87 | 88 | grid_map.mesh_library = mesh_library 89 | grid_map.physics_material = physics_material 90 | grid_map.cell_size = size 91 | grid_map.collision_layer = layer 92 | grid_map.collision_mask = mask 93 | grid_map.bake_navigation = bake_navigation 94 | 95 | grid_map.rotation = rotation_3d 96 | grid_map.scale = scale_3d 97 | 98 | update_grid_map() 99 | 100 | func _process(delta: float) -> void: 101 | if Engine.is_editor_hint(): 102 | if len(get_used_cells()) != len(grid_map.get_used_cells()): 103 | update_grid_map() 104 | if position.x != grid_map.position.x * tile_set.tile_size.x: 105 | grid_map.position.x = position.x / tile_set.tile_size.x 106 | if position.y != grid_map.position.z * tile_set.tile_size.y: 107 | grid_map.position.z = position.y / tile_set.tile_size.y -0.5 108 | 109 | func update_grid_map(): 110 | grid_map.clear() 111 | for tile in get_used_cells(): 112 | var tile_data = get_cell_tile_data(Vector2(tile.x, tile.y)) 113 | grid_map.set_cell_item(Vector3(tile.x, z_index-1, tile.y+z_index), tile_data.get_custom_data("Item")) 114 | -------------------------------------------------------------------------------- /addons/daicon/icons/daicon_map.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /example/static_daicon.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=9 format=3 uid="uid://bo8sog8wpw4n4"] 2 | 3 | [ext_resource type="Script" uid="uid://bdlkwnwao7rg5" path="res://addons/daicon/nodes/static_daicon_node.gd" id="1_kumnq"] 4 | [ext_resource type="Texture2D" uid="uid://c8yh603f8hoqt" path="res://example/assets/basic.png" id="2_hf6pr"] 5 | [ext_resource type="Texture2D" uid="uid://bwnwa7yih5ous" path="res://example/assets/shadow.png" id="3_8l230"] 6 | [ext_resource type="Script" uid="uid://geccrkqt6jtq" path="res://addons/daicon/nodes/daicon_shadow.gd" id="4_l47av"] 7 | 8 | [sub_resource type="BoxMesh" id="BoxMesh_kumnq"] 9 | 10 | [sub_resource type="BoxShape3D" id="BoxShape3D_8l230"] 11 | 12 | [sub_resource type="BoxShape3D" id="BoxShape3D_hf6pr"] 13 | size = Vector3(0.9, 0.9, 0.9) 14 | 15 | [sub_resource type="BoxShape3D" id="BoxShape3D_l47av"] 16 | size = Vector3(1, 0, 1) 17 | 18 | [node name="StaticDaicon" type="StaticBody2D" node_paths=PackedStringArray("mesh", "shape", "whisker_shape")] 19 | z_index = 1 20 | y_sort_enabled = true 21 | script = ExtResource("1_kumnq") 22 | tile_size = 16 23 | mesh = NodePath("StaticBody3D/Mesh") 24 | shape = NodePath("StaticBody3D/Shape") 25 | current_mesh = SubResource("BoxMesh_kumnq") 26 | current_shape = SubResource("BoxShape3D_8l230") 27 | child_count = 4 28 | mesh_properties = { 29 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 30 | "CastShadow": 1, 31 | "CustomAABB": AABB(0, 0, 0, 0, 0, 0), 32 | "ExtraCullMargin": 0.0, 33 | "GILightmapScale": 0, 34 | "GIMode": 1, 35 | "IgnoreOcclusionCulling": false, 36 | "LODBais": 1.0, 37 | "Layers": 1, 38 | "MaterialOverlay": null, 39 | "MaterialOverride": null, 40 | "Mesh": SubResource("BoxMesh_kumnq"), 41 | "Name": &"Mesh", 42 | "Position": Vector3(0, 0, 0), 43 | "Quaternion": Quaternion(0, 0, 0, 1), 44 | "Rotation": Vector3(0, 0, 0), 45 | "RotationEditMode": 0, 46 | "RotationOrder": 2, 47 | "Scale": Vector3(1, 1, 1), 48 | "Skeleton": NodePath(".."), 49 | "Skin": null, 50 | "SortingOffset": 0.0, 51 | "SortingUseAABBCenter": true, 52 | "TopLevel": false, 53 | "Transparency": 0.0, 54 | "VisibilityRangeBegin": 0.0, 55 | "VisibilityRangeBeginMargin": 0.0, 56 | "VisibilityRangeEnd": 0.0, 57 | "VisibilityRangeEndMargin": 0.0, 58 | "VisibilityRangeFadeMode": 0 59 | } 60 | shape_properties = { 61 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 62 | "Disabled": false, 63 | "Name": &"Shape", 64 | "Position": Vector3(0, 0, 0), 65 | "Quaternion": Quaternion(0, 0, 0, 1), 66 | "Rotation": Vector3(0, 0, 0), 67 | "RotationEditMode": 0, 68 | "RotationOrder": 2, 69 | "Scale": Vector3(1, 1, 1), 70 | "Shape": SubResource("BoxShape3D_8l230"), 71 | "TopLevel": false 72 | } 73 | whisker_shape = NodePath("StaticBody3D/Whisker/Shape") 74 | whisker_shape_properties = { 75 | "Class": "CollisionShape3D", 76 | "Name": &"Shape", 77 | "Properties": { 78 | "_import_path": NodePath(""), 79 | "auto_translate_mode": 0, 80 | "debug_fill": true, 81 | "disabled": false, 82 | "editor_description": "", 83 | "physics_interpolation_mode": 0, 84 | "process_mode": 0, 85 | "process_physics_priority": 0, 86 | "process_priority": 0, 87 | "process_thread_group": 0, 88 | "rotation_edit_mode": 0, 89 | "rotation_order": 2, 90 | "script": null, 91 | "shape": SubResource("BoxShape3D_hf6pr"), 92 | "top_level": false, 93 | "transform": Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), 94 | "unique_name_in_owner": false, 95 | "visibility_parent": NodePath(""), 96 | "visible": true 97 | } 98 | } 99 | 100 | [node name="Sprite2D" type="Sprite2D" parent="."] 101 | position = Vector2(-1, -1) 102 | texture = ExtResource("2_hf6pr") 103 | offset = Vector2(0, -8) 104 | flip_h = true 105 | hframes = 10 106 | vframes = 16 107 | 108 | [node name="DaiconShadow" type="Sprite2D" parent="." node_paths=PackedStringArray("daicon_parent", "shape")] 109 | show_behind_parent = true 110 | z_as_relative = false 111 | y_sort_enabled = true 112 | position = Vector2(0, 8) 113 | texture = ExtResource("3_8l230") 114 | script = ExtResource("4_l47av") 115 | daicon_parent = NodePath("..") 116 | tile_size = 16 117 | min_distance = 0.5 118 | stream_mode = 1 119 | shape = NodePath("KinematicBody3D/ShadowShape") 120 | current_shape = SubResource("BoxShape3D_l47av") 121 | shape_properties = { 122 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 123 | "Disabled": false, 124 | "Name": &"ShadowShape", 125 | "Position": Vector3(0, 0, 0), 126 | "Quaternion": Quaternion(0, 0, 0, 1), 127 | "Rotation": Vector3(0, 0, 0), 128 | "RotationEditMode": 0, 129 | "RotationOrder": 2, 130 | "Scale": Vector3(1, 1, 1), 131 | "Shape": SubResource("BoxShape3D_l47av"), 132 | "TopLevel": false 133 | } 134 | metadata/_custom_type_script = "uid://geccrkqt6jtq" 135 | -------------------------------------------------------------------------------- /example/sort_system_example.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=9 format=3 uid="uid://cfiur8plu3wwj"] 2 | 3 | [ext_resource type="Script" uid="uid://eidynimsomkm" path="res://addons/daicon/nodes/daicon_node.gd" id="1_d45pw"] 4 | [ext_resource type="PackedScene" uid="uid://d1sgg3bial5f7" path="res://example/player.tscn" id="2_mwxfw"] 5 | [ext_resource type="PackedScene" uid="uid://bo8sog8wpw4n4" path="res://example/static_daicon.tscn" id="3_nhb8p"] 6 | [ext_resource type="Texture2D" uid="uid://dldfpbgt8823o" path="res://example/assets/tileset.png" id="4_nce33"] 7 | [ext_resource type="Script" uid="uid://baffwcreehsd7" path="res://addons/daicon/nodes/daicon_map_node.gd" id="5_s7rhr"] 8 | [ext_resource type="MeshLibrary" uid="uid://rm1kdg06ylaf" path="res://example/mesh/tiles_mesh.tres" id="6_hc7oc"] 9 | 10 | [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ogekl"] 11 | texture = ExtResource("4_nce33") 12 | 0:0/0 = 0 13 | 1:0/0 = 0 14 | 2:0/0 = 0 15 | 3:0/0 = 0 16 | 4:0/0 = 0 17 | 5:0/0 = 0 18 | 6:0/0 = 0 19 | 0:1/0 = 0 20 | 1:1/0 = 0 21 | 2:1/0 = 0 22 | 3:1/0 = 0 23 | 4:1/0 = 0 24 | 5:1/0 = 0 25 | 6:1/0 = 0 26 | 2:2/0 = 0 27 | 3:2/0 = 0 28 | 4:2/0 = 0 29 | 5:2/0 = 0 30 | 6:2/0 = 0 31 | 2:3/0 = 0 32 | 3:3/0 = 0 33 | 4:3/0 = 0 34 | 5:3/0 = 0 35 | 6:3/0 = 0 36 | 37 | [sub_resource type="TileSet" id="TileSet_ogy1d"] 38 | custom_data_layer_0/name = "Item" 39 | custom_data_layer_0/type = 2 40 | sources/0 = SubResource("TileSetAtlasSource_ogekl") 41 | 42 | [node name="Daicon" type="Node2D"] 43 | y_sort_enabled = true 44 | script = ExtResource("1_d45pw") 45 | metadata/_custom_type_script = "uid://eidynimsomkm" 46 | 47 | [node name="Player" parent="." instance=ExtResource("2_mwxfw")] 48 | position = Vector2(62, -14) 49 | 50 | [node name="1" parent="." instance=ExtResource("3_nhb8p")] 51 | position = Vector2(0, 37) 52 | 53 | [node name="3" parent="." instance=ExtResource("3_nhb8p")] 54 | position = Vector2(0, -18) 55 | 56 | [node name="2" parent="." instance=ExtResource("3_nhb8p")] 57 | position = Vector2(0, 9) 58 | 59 | [node name="4" parent="." instance=ExtResource("3_nhb8p")] 60 | position = Vector2(0, -54) 61 | 62 | [node name="DaiconMap" type="TileMap" parent="."] 63 | y_sort_enabled = true 64 | tile_set = SubResource("TileSet_ogy1d") 65 | format = 2 66 | layer_0/name = "-1" 67 | layer_0/y_sort_enabled = true 68 | layer_0/z_index = -10 69 | layer_0/tile_data = PackedInt32Array(393210, 65536, 0, 393211, 65536, 0, 393212, 65536, 0, 393213, 65536, 0, 393214, 65536, 0, 393215, 65536, 0, 327680, 65536, 0, 327681, 65536, 0, 327682, 65536, 0, 327683, 65536, 0, 327684, 65536, 0, 327685, 65536, 0) 70 | layer_1/name = "0" 71 | layer_1/y_sort_enabled = true 72 | layer_1/tile_data = PackedInt32Array(-196612, 0, 1, -131076, 0, 1, -65540, 65536, 0, -4, 0, 1, 65532, 0, 1, 131068, 0, 1, 196604, 0, 1, -196611, 0, 1, -131075, 65536, 0, -65539, 0, 1, -3, 0, 1, 65533, 0, 1, 131069, 0, 1, 196605, 0, 1, -196610, 0, 1, -131074, 0, 1, -65538, 0, 1, -2, 0, 1, 65534, 0, 1, 131070, 0, 1, 196606, 0, 1, -196609, 0, 1, -131073, 0, 1, -65537, 0, 1, -1, 0, 1, 65535, 0, 1, 131071, 0, 1, 196607, 0, 1, -262144, 0, 1, -196608, 0, 1, -131072, 0, 1, -65536, 0, 1, 0, 0, 1, 65536, 0, 1, 131072, 0, 1, -262143, 0, 1, -196607, 0, 1, -131071, 0, 1, -65535, 0, 1, 1, 0, 1, 65537, 0, 1, 131073, 0, 1, -262142, 0, 1, -196606, 0, 1, -131070, 0, 1, -65534, 0, 1, 2, 0, 1, 65538, 0, 1, 131074, 0, 1, -262141, 0, 1, -196605, 0, 1, -131069, 0, 1, -65533, 0, 1, 3, 0, 1, 65539, 0, 1, 131075, 0, 1, 262140, 0, 1, 262141, 0, 1, 262142, 0, 1, 262143, 0, 1, 196608, 0, 1, 196609, 0, 1, 196610, 0, 1, 196611, 65536, 0, 196612, 65536, 0, -262140, 0, 1, -196604, 0, 1, -131068, 0, 1, -65532, 0, 1, 4, 0, 1, 65540, 0, 1, 131076, 0, 1, -196613, 0, 1, -131077, 0, 1, -65541, 0, 1, -5, 0, 1, 65531, 0, 1, 131067, 0, 1, 196603, 0, 1, 262139, 0, 1, -262150, 0, 1, -196614, 0, 1, -131078, 0, 1, -65542, 0, 1, -6, 0, 1, 65530, 0, 1, 131066, 0, 1, 196602, 0, 1, 262138, 0, 1, 327674, 0, 1, -262149, 0, 1, 327675, 0, 1, -262148, 0, 1, 327676, 0, 1, -262147, 0, 1, 327677, 0, 1, -262146, 0, 1, 327678, 0, 1, -262145, 0, 1, 327679, 0, 1, -327680, 0, 1, 262144, 0, 1, -327679, 0, 1, 262145, 0, 1, -327678, 0, 1, 262146, 0, 1, -327677, 0, 1, 262147, 0, 1, -327676, 0, 1, 262148, 0, 1, -327675, 0, 1, -262139, 0, 1, -196603, 0, 1, -131067, 0, 1, -65531, 0, 1, 5, 0, 1, 65541, 0, 1, 131077, 0, 1, 196613, 0, 1, 262149, 0, 1, -327686, 0, 1, -327685, 0, 1, -327684, 0, 1, -327683, 0, 1, -327682, 0, 1, -327681, 0, 1, -393216, 0, 1, -393215, 0, 1, -393214, 0, 1, -393213, 0, 1, -393212, 0, 1, -393211, 0, 1) 73 | layer_2/name = "1" 74 | layer_2/y_sort_enabled = true 75 | layer_2/z_index = 10 76 | layer_2/tile_data = PackedInt32Array(131075, 0, 0, 131076, 0, 0, -196612, 0, 0, -131076, 0, 0, -196611, 0, 0) 77 | script = ExtResource("5_s7rhr") 78 | mesh_library = ExtResource("6_hc7oc") 79 | metadata/_custom_type_script = "uid://baffwcreehsd7" 80 | -------------------------------------------------------------------------------- /addons/daicon/nodes/daicon_map_node.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | @icon("res://addons/daicon/icons/daicon_map.svg") 3 | class_name DaiconMap extends TileMap 4 | 5 | var grid_map : GridMap 6 | var cells_count : int = get_cells() 7 | var _cells_count : int 8 | 9 | #region DaiconMap Exports 10 | 11 | @export var mesh_library : MeshLibrary: 12 | set(library): 13 | if grid_map: grid_map.mesh_library = library 14 | mesh_library = library 15 | get(): 16 | return mesh_library 17 | @export var physics_material : PhysicsMaterial: 18 | set(library): 19 | if grid_map: grid_map.physics_material = library 20 | physics_material = library 21 | get(): 22 | return physics_material 23 | ## Z-step in sortable system between height levels. 24 | @export var z_step : int = 10: 25 | set(step): 26 | z_step = step 27 | get(): 28 | return z_step 29 | @export var visible_3d: bool = true: 30 | set(value): 31 | if grid_map: grid_map.visible = value 32 | visible_3d = value 33 | get(): 34 | return visible_3d 35 | 36 | @export_group("Cell") 37 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var size: Vector3 = Vector3(1, 1, 1): 38 | set(v_3): 39 | if grid_map: grid_map.cell_size = v_3 40 | size = v_3 41 | get(): 42 | return size 43 | 44 | @export_group("Collision") 45 | @export_flags_3d_physics var layer: int = 1: 46 | set(collision_layer): 47 | if grid_map: grid_map.collision_layer = collision_layer 48 | layer = collision_layer 49 | get(): 50 | return layer 51 | @export_flags_3d_navigation var mask: int = 1: 52 | set(collision_mask): 53 | if grid_map: grid_map.collision_mask = collision_mask 54 | mask = collision_mask 55 | get(): 56 | return mask 57 | @export_group("Navigation") 58 | @export var bake_navigation: bool = false: 59 | set(value): 60 | if grid_map: grid_map.bake_navigation = value 61 | bake_navigation = value 62 | get(): 63 | return bake_navigation 64 | @export_group("Transorm") 65 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var rotation_3d: Vector3 = Vector3(0, 0, 0): 66 | set(v_3): 67 | if grid_map: grid_map.rotation = v_3 68 | rotation_3d = v_3 69 | get(): 70 | return rotation_3d 71 | @export_custom(PROPERTY_HINT_LINK, "") var scale_3d: Vector3 = Vector3(1, 1, 1): 72 | set(v_3): 73 | if grid_map: grid_map.scale = v_3 74 | scale_3d = v_3 75 | get(): 76 | return scale_3d 77 | 78 | #endregion 79 | 80 | func _ready() -> void: 81 | if not tile_set: 82 | self.set_y_sort_enabled(true) 83 | self.set_layer_y_sort_enabled(0, true) 84 | 85 | self.set_tileset(TileSet.new()) 86 | self.tile_set.add_custom_data_layer(0) 87 | self.tile_set.set_custom_data_layer_name(0, "Item") 88 | self.tile_set.set_custom_data_layer_type(0, TYPE_INT) 89 | #Expand GridMap 90 | grid_map = GridMap.new() 91 | grid_map.set_name("GridMap") 92 | add_child(grid_map) 93 | move_child(grid_map, 0) 94 | 95 | grid_map.position.z = -0.5 96 | grid_map = get_child(0) 97 | 98 | grid_map.mesh_library = mesh_library 99 | grid_map.physics_material = physics_material 100 | grid_map.cell_size = size 101 | grid_map.collision_layer = layer 102 | grid_map.collision_mask = mask 103 | grid_map.bake_navigation = bake_navigation 104 | 105 | grid_map.rotation = rotation_3d 106 | grid_map.scale = scale_3d 107 | 108 | update_grid_map() 109 | 110 | func _process(delta: float) -> void: 111 | if Engine.is_editor_hint(): 112 | cells_count = get_cells() 113 | if cells_count != len(grid_map.get_used_cells()): 114 | update_grid_map() 115 | if position.x != grid_map.position.x * tile_set.tile_size.x: 116 | grid_map.position.x = position.x / tile_set.tile_size.x 117 | if position.y != grid_map.position.z * tile_set.tile_size.y: 118 | grid_map.position.z = position.y / tile_set.tile_size.y - 0.5 119 | 120 | func get_cells() -> int: 121 | _cells_count = 0 122 | for layer_index in range(0, get_layers_count()): 123 | _cells_count += len(get_used_cells(layer_index)) 124 | for layer in get_children(): 125 | if layer is TileMapLayer: 126 | _cells_count += len(layer.get_used_cells()) 127 | return _cells_count 128 | 129 | func update_grid_map(): 130 | grid_map.clear() 131 | for layer_index in range(0, get_layers_count()): 132 | var z = get_layer_z_index(layer_index) / z_step 133 | for tile in get_used_cells(layer_index): 134 | var tile_data = get_cell_tile_data(layer_index, Vector2(tile.x, tile.y)) 135 | grid_map.set_cell_item(Vector3(tile.x, z-1, tile.y+z), tile_data.get_custom_data("Item")) 136 | for layer in get_children(): 137 | if layer is TileMapLayer: 138 | var z = layer.z_index / z_step 139 | for tile in layer.get_used_cells(): 140 | var tile_data = layer.get_cell_tile_data(Vector2(tile.x, tile.y)) 141 | grid_map.set_cell_item(Vector3(tile.x, z-1, tile.y+z), tile_data.get_custom_data("Item")) 142 | -------------------------------------------------------------------------------- /addons/daicon/icons/daicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /addons/daicon/icons/daicon_map_layer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /addons/daicon/icons/static_daicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /addons/daicon/icons/kinematic_daicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /addons/daicon/icons/animated_daicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /example/shadow_example.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=15 format=3 uid="uid://dq0owsrd447fy"] 2 | 3 | [ext_resource type="Script" uid="uid://eidynimsomkm" path="res://addons/daicon/nodes/daicon_node.gd" id="1_rm2qp"] 4 | [ext_resource type="Texture2D" uid="uid://dldfpbgt8823o" path="res://example/assets/tileset.png" id="2_geley"] 5 | [ext_resource type="Script" uid="uid://baffwcreehsd7" path="res://addons/daicon/nodes/daicon_map_node.gd" id="3_a23ui"] 6 | [ext_resource type="MeshLibrary" uid="uid://rm1kdg06ylaf" path="res://example/mesh/tiles_mesh.tres" id="4_uaaxx"] 7 | [ext_resource type="Script" uid="uid://geccrkqt6jtq" path="res://addons/daicon/nodes/daicon_shadow.gd" id="6_uaaxx"] 8 | [ext_resource type="Texture2D" uid="uid://bwnwa7yih5ous" path="res://example/assets/shadow.png" id="6_uhfqq"] 9 | [ext_resource type="Texture2D" uid="uid://c8yh603f8hoqt" path="res://example/assets/basic.png" id="8_qtgls"] 10 | [ext_resource type="Script" uid="uid://cci852k2i01yu" path="res://example/code/shadow_example_body.gd" id="9_qtgls"] 11 | 12 | [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_uhfqq"] 13 | texture = ExtResource("2_geley") 14 | 0:0/0 = 0 15 | 1:0/0 = 0 16 | 2:0/0 = 0 17 | 3:0/0 = 0 18 | 4:0/0 = 0 19 | 5:0/0 = 0 20 | 6:0/0 = 0 21 | 0:1/0 = 0 22 | 1:1/0 = 0 23 | 2:1/0 = 0 24 | 3:1/0 = 0 25 | 4:1/0 = 0 26 | 5:1/0 = 0 27 | 6:1/0 = 0 28 | 2:2/0 = 0 29 | 3:2/0 = 0 30 | 4:2/0 = 0 31 | 5:2/0 = 0 32 | 6:2/0 = 0 33 | 2:3/0 = 0 34 | 3:3/0 = 0 35 | 4:3/0 = 0 36 | 5:3/0 = 0 37 | 6:3/0 = 0 38 | 39 | [sub_resource type="TileSet" id="TileSet_qtgls"] 40 | custom_data_layer_0/name = "Item" 41 | custom_data_layer_0/type = 2 42 | sources/0 = SubResource("TileSetAtlasSource_uhfqq") 43 | 44 | [sub_resource type="BoxMesh" id="BoxMesh_uaaxx"] 45 | 46 | [sub_resource type="BoxShape3D" id="BoxShape3D_uhfqq"] 47 | 48 | [sub_resource type="BoxShape3D" id="BoxShape3D_vstwl"] 49 | size = Vector3(1, 0, 1) 50 | 51 | [sub_resource type="BoxShape3D" id="BoxShape3D_a23ui"] 52 | size = Vector3(1, 0, 1) 53 | 54 | [node name="Daicon" type="Node2D"] 55 | y_sort_enabled = true 56 | script = ExtResource("1_rm2qp") 57 | metadata/_custom_type_script = "uid://eidynimsomkm" 58 | 59 | [node name="DaiconMap" type="TileMap" parent="."] 60 | y_sort_enabled = true 61 | tile_set = SubResource("TileSet_qtgls") 62 | format = 2 63 | layer_0/name = "-1" 64 | layer_0/y_sort_enabled = true 65 | layer_0/z_index = -10 66 | layer_0/tile_data = PackedInt32Array(131066, 65536, 0, 131067, 65536, 0, 131068, 65536, 0, 131069, 65536, 0, 131070, 65536, 0, 131071, 65536, 0, 65536, 65536, 0, 65537, 65536, 0, 65538, 65536, 0, 65539, 65536, 0, 65540, 65536, 0, 65541, 65536, 0) 67 | layer_1/name = "0" 68 | layer_1/y_sort_enabled = true 69 | layer_1/tile_data = PackedInt32Array(-1, 0, 0, -65537, 0, 0, -65538, 0, 0, -2, 0, 0, -3, 0, 0, -65539, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -131072, 0, 0, -65536, 0, 0, -65535, 0, 0, -131071, 0, 0, -196607, 0, 0, -196606, 0, 0, -131070, 0, 0, -65534, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -196605, 0, 0, -131069, 0, 0, -65533, 0, 0, 3, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 65535, 0, 0, 65534, 0, 0, 65533, 0, 0, 65532, 0, 0, -4, 0, 0, -65540, 0, 0, -131076, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262140, 0, 0, -196604, 0, 0, -131068, 0, 0, -65532, 0, 0, 4, 0, 0, 5, 0, 0, -65531, 0, 0, -196603, 0, 0, -131067, 0, 0, -262139, 0, 0, -196613, 0, 0, -131077, 0, 0, -65541, 0, 0, -5, 0, 0, 65531, 0, 0, 65530, 0, 0, -6, 0, 0, -131078, 0, 0, -65542, 0, 0, -196614, 0, 0) 70 | script = ExtResource("3_a23ui") 71 | mesh_library = ExtResource("4_uaaxx") 72 | metadata/_custom_type_script = "uid://baffwcreehsd7" 73 | 74 | [node name="Camera2D" type="Camera2D" parent="."] 75 | position = Vector2(0, -23) 76 | zoom = Vector2(4, 4) 77 | 78 | [node name="Coloration" type="CharacterBody2D" parent="." node_paths=PackedStringArray("mesh", "shape")] 79 | z_index = 1 80 | y_sort_enabled = true 81 | position = Vector2(-51, -23) 82 | script = ExtResource("9_qtgls") 83 | tile_size = 16 84 | mesh = NodePath("KinematicBody3D/Mesh") 85 | shape = NodePath("KinematicBody3D/Shape") 86 | current_mesh = SubResource("BoxMesh_uaaxx") 87 | current_shape = SubResource("BoxShape3D_uhfqq") 88 | child_count = 4 89 | mesh_properties = { 90 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 91 | "CastShadow": 1, 92 | "CustomAABB": AABB(0, 0, 0, 0, 0, 0), 93 | "ExtraCullMargin": 0.0, 94 | "GILightmapScale": 0, 95 | "GIMode": 1, 96 | "IgnoreOcclusionCulling": false, 97 | "LODBais": 1.0, 98 | "Layers": 1, 99 | "MaterialOverlay": null, 100 | "MaterialOverride": null, 101 | "Mesh": SubResource("BoxMesh_uaaxx"), 102 | "Name": &"Mesh", 103 | "Position": Vector3(0, 0, 0), 104 | "Quaternion": Quaternion(0, 0, 0, 1), 105 | "Rotation": Vector3(0, 0, 0), 106 | "RotationEditMode": 0, 107 | "RotationOrder": 2, 108 | "Scale": Vector3(1, 1, 1), 109 | "Skeleton": NodePath(".."), 110 | "Skin": null, 111 | "SortingOffset": 0.0, 112 | "SortingUseAABBCenter": true, 113 | "TopLevel": false, 114 | "Transparency": 0.0, 115 | "VisibilityRangeBegin": 0.0, 116 | "VisibilityRangeBeginMargin": 0.0, 117 | "VisibilityRangeEnd": 0.0, 118 | "VisibilityRangeEndMargin": 0.0, 119 | "VisibilityRangeFadeMode": 0 120 | } 121 | shape_properties = { 122 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 123 | "Disabled": false, 124 | "Name": &"Shape", 125 | "Position": Vector3(0, 0, 0), 126 | "Quaternion": Quaternion(0, 0, 0, 1), 127 | "Rotation": Vector3(0, 0, 0), 128 | "RotationEditMode": 0, 129 | "RotationOrder": 2, 130 | "Scale": Vector3(1, 1, 1), 131 | "Shape": SubResource("BoxShape3D_uhfqq"), 132 | "TopLevel": false 133 | } 134 | metadata/_custom_type_script = "uid://dce71mslqcpnm" 135 | 136 | [node name="DaiconShadow" type="Sprite2D" parent="Coloration" node_paths=PackedStringArray("daicon_parent", "shape")] 137 | z_as_relative = false 138 | y_sort_enabled = true 139 | position = Vector2(0, 8) 140 | texture = ExtResource("6_uhfqq") 141 | script = ExtResource("6_uaaxx") 142 | daicon_parent = NodePath("..") 143 | tile_size = 16 144 | min_distance = 2.0 145 | shadow_mode = 1 146 | shape = NodePath("KinematicBody3D/ShadowShape") 147 | current_shape = SubResource("BoxShape3D_vstwl") 148 | shape_properties = { 149 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 150 | "Disabled": false, 151 | "Name": &"ShadowShape", 152 | "Position": Vector3(0, 0, 0), 153 | "Quaternion": Quaternion(0, 0, 0, 1), 154 | "Rotation": Vector3(0, 0, 0), 155 | "RotationEditMode": 0, 156 | "RotationOrder": 2, 157 | "Scale": Vector3(1, 1, 1), 158 | "Shape": SubResource("BoxShape3D_vstwl"), 159 | "TopLevel": false 160 | } 161 | metadata/_custom_type_script = "uid://geccrkqt6jtq" 162 | 163 | [node name="Sprite2D" type="Sprite2D" parent="Coloration"] 164 | position = Vector2(-1, -1) 165 | texture = ExtResource("8_qtgls") 166 | offset = Vector2(0, -8) 167 | flip_h = true 168 | hframes = 10 169 | vframes = 16 170 | 171 | [node name="Discoloration" type="CharacterBody2D" parent="." node_paths=PackedStringArray("mesh", "shape")] 172 | z_index = 1 173 | y_sort_enabled = true 174 | position = Vector2(52, -23) 175 | script = ExtResource("9_qtgls") 176 | tile_size = 16 177 | mesh = NodePath("KinematicBody3D/Mesh") 178 | shape = NodePath("KinematicBody3D/Shape") 179 | current_mesh = SubResource("BoxMesh_uaaxx") 180 | current_shape = SubResource("BoxShape3D_uhfqq") 181 | child_count = 4 182 | mesh_properties = { 183 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 184 | "CastShadow": 1, 185 | "CustomAABB": AABB(0, 0, 0, 0, 0, 0), 186 | "ExtraCullMargin": 0.0, 187 | "GILightmapScale": 0, 188 | "GIMode": 1, 189 | "IgnoreOcclusionCulling": false, 190 | "LODBais": 1.0, 191 | "Layers": 1, 192 | "MaterialOverlay": null, 193 | "MaterialOverride": null, 194 | "Mesh": SubResource("BoxMesh_uaaxx"), 195 | "Name": &"Mesh", 196 | "Position": Vector3(0, 0, 0), 197 | "Quaternion": Quaternion(0, 0, 0, 1), 198 | "Rotation": Vector3(0, 0, 0), 199 | "RotationEditMode": 0, 200 | "RotationOrder": 2, 201 | "Scale": Vector3(1, 1, 1), 202 | "Skeleton": NodePath(".."), 203 | "Skin": null, 204 | "SortingOffset": 0.0, 205 | "SortingUseAABBCenter": true, 206 | "TopLevel": false, 207 | "Transparency": 0.0, 208 | "VisibilityRangeBegin": 0.0, 209 | "VisibilityRangeBeginMargin": 0.0, 210 | "VisibilityRangeEnd": 0.0, 211 | "VisibilityRangeEndMargin": 0.0, 212 | "VisibilityRangeFadeMode": 0 213 | } 214 | shape_properties = { 215 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 216 | "Disabled": false, 217 | "Name": &"Shape", 218 | "Position": Vector3(0, 0, 0), 219 | "Quaternion": Quaternion(0, 0, 0, 1), 220 | "Rotation": Vector3(0, 0, 0), 221 | "RotationEditMode": 0, 222 | "RotationOrder": 2, 223 | "Scale": Vector3(1, 1, 1), 224 | "Shape": SubResource("BoxShape3D_uhfqq"), 225 | "TopLevel": false 226 | } 227 | metadata/_custom_type_script = "uid://dce71mslqcpnm" 228 | 229 | [node name="DaiconShadow" type="Sprite2D" parent="Discoloration" node_paths=PackedStringArray("daicon_parent", "shape")] 230 | z_as_relative = false 231 | y_sort_enabled = true 232 | position = Vector2(0, 8) 233 | texture = ExtResource("6_uhfqq") 234 | script = ExtResource("6_uaaxx") 235 | daicon_parent = NodePath("..") 236 | tile_size = 16 237 | min_distance = 0.5 238 | shape = NodePath("KinematicBody3D/ShadowShape") 239 | current_shape = SubResource("BoxShape3D_a23ui") 240 | shape_properties = { 241 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 242 | "Disabled": false, 243 | "Name": &"ShadowShape", 244 | "Position": Vector3(0, 0, 0), 245 | "Quaternion": Quaternion(0, 0, 0, 1), 246 | "Rotation": Vector3(0, 0, 0), 247 | "RotationEditMode": 0, 248 | "RotationOrder": 2, 249 | "Scale": Vector3(1, 1, 1), 250 | "Shape": SubResource("BoxShape3D_a23ui"), 251 | "TopLevel": false 252 | } 253 | metadata/_custom_type_script = "uid://geccrkqt6jtq" 254 | 255 | [node name="Sprite2D" type="Sprite2D" parent="Discoloration"] 256 | position = Vector2(-1, -1) 257 | texture = ExtResource("8_qtgls") 258 | offset = Vector2(0, -8) 259 | flip_h = true 260 | hframes = 10 261 | vframes = 16 262 | -------------------------------------------------------------------------------- /addons/daicon/icons/rigid_daicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /example/example.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=15 format=4 uid="uid://ckqo7xx5ntlpq"] 2 | 3 | [ext_resource type="Script" uid="uid://ds6hjghkuhoej" path="res://example/code/example.gd" id="1_wmyp6"] 4 | [ext_resource type="Texture2D" uid="uid://dldfpbgt8823o" path="res://example/assets/tileset.png" id="2_8clr1"] 5 | [ext_resource type="Script" uid="uid://baffwcreehsd7" path="res://addons/daicon/nodes/daicon_map_node.gd" id="2_pjyox"] 6 | [ext_resource type="MeshLibrary" uid="uid://rm1kdg06ylaf" path="res://example/mesh/tiles_mesh.tres" id="4_7cn0y"] 7 | [ext_resource type="Shader" uid="uid://bylposfd34arx" path="res://addons/daicon/shaders/blur_circle.gdshader" id="5_wmyp6"] 8 | [ext_resource type="PackedScene" uid="uid://bo8sog8wpw4n4" path="res://example/static_daicon.tscn" id="7_6rqat"] 9 | [ext_resource type="PackedScene" uid="uid://d1sgg3bial5f7" path="res://example/player.tscn" id="8_h7cfd"] 10 | 11 | [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_7cn0y"] 12 | texture = ExtResource("2_8clr1") 13 | 0:0/0 = 0 14 | 1:0/0 = 0 15 | 1:0/0/z_index = -1 16 | 2:0/0 = 0 17 | 2:0/0/custom_data_0 = 1 18 | 3:0/0 = 0 19 | 3:0/0/custom_data_0 = 1 20 | 4:0/0 = 0 21 | 4:0/0/custom_data_0 = 2 22 | 5:0/0 = 0 23 | 5:0/0/custom_data_0 = 2 24 | 6:0/0 = 0 25 | 6:0/0/custom_data_0 = 3 26 | 0:1/0 = 0 27 | 1:1/0 = 0 28 | 2:1/0 = 0 29 | 3:1/0 = 0 30 | 4:1/0 = 0 31 | 5:1/0 = 0 32 | 6:1/0 = 0 33 | 6:1/0/custom_data_0 = 3 34 | 2:2/0 = 0 35 | 2:2/0/custom_data_0 = 1 36 | 3:2/0 = 0 37 | 3:2/0/custom_data_0 = 1 38 | 4:2/0 = 0 39 | 4:2/0/custom_data_0 = 2 40 | 5:2/0 = 0 41 | 5:2/0/custom_data_0 = 2 42 | 6:2/0 = 0 43 | 6:2/0/custom_data_0 = 3 44 | 2:3/0 = 0 45 | 3:3/0 = 0 46 | 4:3/0 = 0 47 | 5:3/0 = 0 48 | 6:3/0 = 0 49 | 6:3/0/custom_data_0 = 3 50 | 51 | [sub_resource type="TileSet" id="TileSet_8clr1"] 52 | custom_data_layer_0/name = "Item" 53 | custom_data_layer_0/type = 2 54 | sources/0 = SubResource("TileSetAtlasSource_7cn0y") 55 | 56 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_6rqat"] 57 | shader = ExtResource("5_wmyp6") 58 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 59 | shader_parameter/NumCircleCentres = 0 60 | shader_parameter/CircleRadius = 100.0 61 | shader_parameter/CircleBlur = 0.01 62 | 63 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_2xiy6"] 64 | shader = ExtResource("5_wmyp6") 65 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 66 | shader_parameter/NumCircleCentres = 0 67 | shader_parameter/CircleRadius = 100.0 68 | shader_parameter/CircleBlur = 0.01 69 | 70 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_h7cfd"] 71 | shader = ExtResource("5_wmyp6") 72 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 73 | shader_parameter/NumCircleCentres = 0 74 | shader_parameter/CircleRadius = 100.0 75 | shader_parameter/CircleBlur = 0.01 76 | 77 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_ntg8m"] 78 | shader = ExtResource("5_wmyp6") 79 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 80 | shader_parameter/NumCircleCentres = 0 81 | shader_parameter/CircleRadius = 100.0 82 | shader_parameter/CircleBlur = 0.01 83 | 84 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_8a8t6"] 85 | shader = ExtResource("5_wmyp6") 86 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 87 | shader_parameter/NumCircleCentres = 0 88 | shader_parameter/CircleRadius = 100.0 89 | shader_parameter/CircleBlur = 0.01 90 | 91 | [node name="Example" type="Node2D" node_paths=PackedStringArray("shader_trigger_nodes", "shader_target_nodes")] 92 | y_sort_enabled = true 93 | script = ExtResource("1_wmyp6") 94 | shader_trigger_nodes = [NodePath("Player"), NodePath("StaticDaicon")] 95 | shader_target_nodes = [NodePath("DaiconMap/-2"), NodePath("DaiconMap/-1"), NodePath("DaiconMap/0"), NodePath("DaiconMap/1"), NodePath("DaiconMap/2")] 96 | 97 | [node name="DaiconMap" type="TileMap" parent="."] 98 | y_sort_enabled = true 99 | tile_set = SubResource("TileSet_8clr1") 100 | format = 2 101 | script = ExtResource("2_pjyox") 102 | mesh_library = ExtResource("4_7cn0y") 103 | 104 | [node name="-2" type="TileMapLayer" parent="DaiconMap"] 105 | z_index = -20 106 | y_sort_enabled = true 107 | material = SubResource("ShaderMaterial_6rqat") 108 | tile_map_data = PackedByteArray("AAABAAoAAAABAAAAAAACAAoAAAABAAAAAAADAAoAAAABAAAAAAAEAAoAAAABAAAAAAAFAAoAAAABAAAAAAAGAAoAAAABAAAAAAAHAAoAAAABAAAAAAAIAAoAAAABAAAAAAAJAAoAAAABAAAAAAD6/woAAAABAAAAAAD7/woAAAABAAAAAAD8/woAAAABAAAAAAD9/woAAAABAAAAAAD+/woAAAABAAAAAAD4/woAAAABAAAAAAD5/woAAAABAAAAAAD//woAAAABAAAAAAAAAAoAAAABAAAAAAAKAAoAAAABAAAAAAALAAoAAAABAAAAAAA=") 109 | tile_set = SubResource("TileSet_8clr1") 110 | 111 | [node name="-1" type="TileMapLayer" parent="DaiconMap"] 112 | z_index = -10 113 | y_sort_enabled = true 114 | material = SubResource("ShaderMaterial_2xiy6") 115 | tile_map_data = PackedByteArray("AAABAAcAAAABAAEAAAABAAgAAAABAAEAAAABAAkAAAABAAAAAAACAAcAAAABAAEAAAACAAgAAAABAAEAAAACAAkAAAABAAAAAAAHAP7/AAABAAEAAAAHAP//AAABAAEAAAAHAAAAAAABAAEAAAAHAAQAAAABAAEAAAAIAP7/AAABAAEAAAAIAP//AAABAAEAAAAIAAAAAAABAAEAAAAIAAQAAAABAAEAAAAJAP7/AAABAAEAAAAJAP//AAABAAEAAAAJAAAAAAABAAEAAAAJAAQAAAABAAEAAAAHAAEAAAABAAEAAAAHAAIAAAABAAEAAAAHAAMAAAABAAEAAAAIAAMAAAABAAEAAAAIAAIAAAABAAEAAAAIAAEAAAABAAEAAAAJAAEAAAABAAEAAAAJAAIAAAABAAEAAAAJAAMAAAABAAEAAAABAAYAAAABAAEAAAACAAYAAAABAAEAAAD6/wYAAAABAAEAAAD6/wcAAAABAAEAAAD6/wgAAAABAAEAAAD6/wkAAAABAAAAAAD7/wYAAAABAAEAAAD7/wcAAAABAAEAAAD7/wgAAAABAAEAAAD7/wkAAAABAAAAAAD8/wYAAAABAAEAAAD8/wcAAAABAAEAAAD8/wgAAAABAAEAAAD8/wkAAAABAAEAAAD9/wYAAAABAAEAAAD9/wcAAAABAAEAAAD9/wgAAAABAAEAAAD9/wkAAAABAAEAAAD+/wYAAAABAAEAAAD+/wcAAAABAAEAAAD+/wgAAAABAAEAAAD+/wkAAAABAAEAAAD4//7/AAABAAEAAAD4////AAABAAEAAAD4/wAAAAABAAEAAAD4/wEAAAABAAEAAAD4/wIAAAABAAEAAAD4/wMAAAABAAEAAAD4/wQAAAABAAEAAAD4/wUAAAABAAEAAAD4/wYAAAABAAEAAAD4/wcAAAABAAEAAAD4/wgAAAABAAEAAAD4/wkAAAABAAEAAAD5//7/AAABAAEAAAD5////AAABAAEAAAD5/wAAAAABAAEAAAD5/wEAAAABAAEAAAD5/wIAAAABAAEAAAD5/wMAAAABAAEAAAD5/wQAAAABAAEAAAD5/wUAAAABAAEAAAD5/wYAAAABAAEAAAD5/wcAAAABAAEAAAD5/wgAAAABAAEAAAD5/wkAAAABAAEAAAD//wYAAAABAAEAAAAAAAYAAAABAAEAAAAAAAcAAAABAAEAAAD//wcAAAABAAEAAAD//wgAAAABAAEAAAD//wkAAAABAAEAAAAAAAkAAAABAAAAAAAAAAgAAAABAAEAAAAEAAYAAAABAAEAAAAEAAcAAAABAAEAAAAEAAgAAAABAAEAAAAFAAYAAAABAAEAAAAFAAcAAAABAAEAAAAFAAgAAAABAAEAAAAGAAYAAAABAAEAAAAGAAcAAAABAAEAAAAGAAgAAAABAAEAAAAHAAUAAAABAAEAAAAHAAYAAAABAAEAAAAHAAcAAAABAAEAAAAHAAgAAAABAAEAAAAIAAUAAAABAAEAAAAIAAYAAAABAAEAAAAIAAcAAAABAAEAAAAIAAgAAAABAAEAAAAJAAUAAAABAAEAAAAJAAYAAAABAAEAAAAJAAcAAAABAAEAAAAJAAgAAAABAAEAAAADAAYAAAABAAEAAAADAAcAAAABAAEAAAADAAgAAAABAAEAAAADAAkAAAABAAEAAAAHAAkAAAABAAAAAAAIAAkAAAABAAAAAAAJAAkAAAABAAAAAAAKAAkAAAABAAAAAAALAAkAAAABAAAAAAAGAAkAAAAEAAEAAAAEAAkAAAABAAEAAAAFAAkAAAABAAEAAAAKAP7/AAABAAEAAAAKAP//AAABAAEAAAAKAAAAAAABAAEAAAAKAAEAAAABAAEAAAAKAAIAAAABAAEAAAAKAAMAAAABAAEAAAAKAAQAAAABAAEAAAAKAAUAAAABAAEAAAAKAAYAAAABAAEAAAAKAAcAAAABAAEAAAAKAAgAAAABAAEAAAALAP7/AAABAAEAAAALAP//AAABAAEAAAALAAAAAAABAAEAAAALAAEAAAABAAEAAAALAAIAAAABAAEAAAALAAMAAAABAAEAAAALAAQAAAABAAEAAAALAAUAAAABAAEAAAALAAYAAAABAAEAAAALAAcAAAABAAEAAAALAAgAAAABAAEAAAD6/wUAAAABAAAAAAD7/wUAAAABAAAAAAD8/wUAAAABAAAAAAD9/wUAAAABAAAAAAD+/wUAAAABAAAAAAD//wUAAAABAAAAAAAAAAUAAAABAAAAAAABAAUAAAABAAAAAAACAAUAAAABAAAAAAADAAUAAAABAAAAAAAEAAUAAAABAAAAAAAFAAUAAAABAAAAAAAGAAUAAAABAAAAAAA=") 116 | tile_set = SubResource("TileSet_8clr1") 117 | 118 | [node name="0" type="TileMapLayer" parent="DaiconMap"] 119 | y_sort_enabled = true 120 | material = SubResource("ShaderMaterial_h7cfd") 121 | tile_map_data = PackedByteArray("AAADAP3/AAAAAAEAAAADAP7/AAAAAAEAAAADAP//AAAAAAEAAAADAAMAAAAAAAEAAAADAAQAAAAAAAEAAAAEAP3/AAAGAAAAAAAEAP7/AAAAAAEAAAAEAP//AAAAAAEAAAAEAAMAAAAAAAEAAAAEAAQAAAABAAAAAAAFAP3/AAAAAAEAAAAFAP7/AAAAAAEAAAAFAP//AAAAAAEAAAAFAAMAAAAAAAEAAAAFAAQAAAABAAAAAAAGAP3/AAAAAAEAAAAGAP7/AAAAAAEAAAAGAP//AAAAAAEAAAAGAAMAAAAAAAEAAAAGAAQAAAABAAAAAAABAAAAAAAAAAEAAAACAAAAAAAAAAEAAAADAAAAAAAAAAEAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAEAAAAGAAAAAAAAAAEAAAAGAAEAAAAAAAEAAAAFAAEAAAAAAAEAAAAEAAEAAAAAAAEAAAADAAEAAAAAAAEAAAACAAEAAAAAAAEAAAABAAEAAAAAAAEAAAABAAIAAAAAAAEAAAACAAIAAAAAAAEAAAADAAIAAAAAAAEAAAAEAAIAAAAAAAEAAAAFAAIAAAAAAAEAAAAGAAIAAAAAAAEAAAACAAMAAAAAAAEAAAABAAMAAAAAAAEAAAABAAQAAAAAAAEAAAACAAQAAAAAAAEAAAABAP3/AAAAAAEAAAACAP3/AAAAAAEAAAACAP7/AAAAAAEAAAABAP7/AAAAAAEAAAABAP//AAAAAAEAAAACAP//AAAAAAEAAAADAPz/AAABAAAAAAAFAPz/AAABAAAAAAAGAPz/AAABAAAAAAD8//3/AAAAAAEAAAD8//7/AAAAAAEAAAD8////AAAAAAEAAAD8/wAAAAABAAAAAAD8/wEAAAAAAAEAAAD8/wIAAAAAAAEAAAD8/wMAAAAAAAEAAAD8/wQAAAAAAAEAAAD9//3/AAAAAAEAAAD9//7/AAAAAAEAAAD9////AAAAAAEAAAD9/wAAAAABAAAAAAD9/wEAAAAAAAEAAAD9/wIAAAAAAAEAAAD9/wMAAAAAAAEAAAD9/wQAAAAAAAEAAAD+//3/AAAAAAEAAAD+//7/AAAAAAEAAAD+////AAAAAAEAAAD+/wAAAAADAAEAAAD+/wEAAAAAAAEAAAD+/wIAAAAAAAEAAAD+/wMAAAAAAAEAAAD+/wQAAAAAAAEAAAD6//3/AAAAAAEAAAD6//7/AAAAAAEAAAD6////AAAAAAEAAAD6/wAAAAAAAAEAAAD6/wEAAAAAAAEAAAD6/wIAAAAAAAEAAAD6/wMAAAAAAAEAAAD6/wQAAAAAAAEAAAD6/wgAAAABAAAAAAD7//3/AAAAAAEAAAD7//7/AAAAAAEAAAD7////AAAAAAEAAAD7/wAAAAAAAAEAAAD7/wEAAAAAAAEAAAD7/wIAAAAAAAEAAAD7/wMAAAAAAAEAAAD7/wQAAAAAAAEAAAD7/wgAAAABAAAAAAD//wQAAAAAAAEAAAD//wMAAAAAAAEAAAAAAAMAAAAAAAEAAAD//wIAAAAAAAEAAAAAAAEAAAAAAAEAAAD//wAAAAAAAAEAAAD/////AAAAAAEAAAD///7/AAAAAAEAAAD///3/AAAAAAEAAAAAAP3/AAAAAAEAAAAAAP7/AAAAAAEAAAD//wEAAAAAAAEAAAAAAAIAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAP//AAAAAAEAAAAAAAQAAAAAAAEAAAAGAAgAAAAEAAAAAAAHAAgAAAAFAAEAAAAIAAgAAAABAAAAAAAJAAgAAAABAAAAAAAKAAgAAAABAAAAAAALAAgAAAABAAAAAAAAAAgAAAAAAAAAAAABAAgAAAAAAAAAAAACAAgAAAAAAAAAAAA=") 122 | tile_set = SubResource("TileSet_8clr1") 123 | 124 | [node name="1" type="TileMapLayer" parent="DaiconMap"] 125 | z_index = 10 126 | y_sort_enabled = true 127 | material = SubResource("ShaderMaterial_ntg8m") 128 | tile_map_data = PackedByteArray("AAAEAAMAAAAAAAAAAAAFAAMAAAAAAAAAAAAGAAMAAAAAAAAAAAAGAAIAAAAAAAAAAAAFAAIAAAAAAAAAAAAEAAIAAAAAAAAAAAAEAPz/AAAGAAEAAAADAPv/AAAAAAAAAAAEAPv/AAAAAAAAAAAFAPv/AAAAAAAAAAAGAPv/AAAAAAAAAAAGAPr/AAAAAAAAAAAFAPr/AAAAAAAAAAAFAPn/AAAAAAAAAAAEAPn/AAAAAAAAAAAEAPr/AAAAAAAAAAADAPr/AAAAAAAAAAADAPn/AAAAAAAAAAAGAPn/AAAAAAAAAAD6/wcAAAAAAAAAAAD7/wcAAAAAAAAAAAD8////AAAAAAAAAAD9////AAAAAAAAAAD+////AAADAAAAAAAHAAcAAAAFAAAAAAAIAAcAAAAEAAEAAAAJAAcAAAABAAAAAAAKAAcAAAABAAAAAAALAAcAAAABAAAAAAA=") 129 | tile_set = SubResource("TileSet_8clr1") 130 | 131 | [node name="2" type="TileMapLayer" parent="DaiconMap"] 132 | z_index = 20 133 | y_sort_enabled = true 134 | material = SubResource("ShaderMaterial_8a8t6") 135 | tile_map_data = PackedByteArray("AAAIAAYAAAAEAAAAAAAJAAYAAAAAAAAAAAAKAAYAAAAAAAAAAAALAAYAAAAAAAAAAAA=") 136 | tile_set = SubResource("TileSet_8clr1") 137 | 138 | [node name="StaticDaicon" parent="." instance=ExtResource("7_6rqat")] 139 | position = Vector2(161, 107) 140 | y_3d = -1 141 | 142 | [node name="Player" parent="." instance=ExtResource("8_h7cfd")] 143 | -------------------------------------------------------------------------------- /example/shader_example.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=22 format=4 uid="uid://djpcak2vydegu"] 2 | 3 | [ext_resource type="Script" uid="uid://ds6hjghkuhoej" path="res://example/code/example.gd" id="1_jtpl2"] 4 | [ext_resource type="Texture2D" uid="uid://dldfpbgt8823o" path="res://example/assets/tileset.png" id="2_ku1xe"] 5 | [ext_resource type="Shader" uid="uid://bylposfd34arx" path="res://addons/daicon/shaders/blur_circle.gdshader" id="2_m256f"] 6 | [ext_resource type="Script" uid="uid://baffwcreehsd7" path="res://addons/daicon/nodes/daicon_map_node.gd" id="3_m256f"] 7 | [ext_resource type="MeshLibrary" uid="uid://rm1kdg06ylaf" path="res://example/mesh/tiles_mesh.tres" id="4_tqpdw"] 8 | [ext_resource type="Shader" uid="uid://bq0fx1lrq41io" path="res://addons/daicon/shaders/circle.gdshader" id="6_tqpdw"] 9 | [ext_resource type="PackedScene" uid="uid://bo8sog8wpw4n4" path="res://example/static_daicon.tscn" id="7_jtpl2"] 10 | [ext_resource type="PackedScene" uid="uid://d1sgg3bial5f7" path="res://example/player.tscn" id="8_lbvrf"] 11 | 12 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_jtpl2"] 13 | 14 | [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_jtpl2"] 15 | texture = ExtResource("2_ku1xe") 16 | 0:0/0 = 0 17 | 1:0/0 = 0 18 | 1:0/0/z_index = -1 19 | 2:0/0 = 0 20 | 3:0/0 = 0 21 | 4:0/0 = 0 22 | 5:0/0 = 0 23 | 6:0/0 = 0 24 | 0:1/0 = 0 25 | 1:1/0 = 0 26 | 2:1/0 = 0 27 | 3:1/0 = 0 28 | 4:1/0 = 0 29 | 5:1/0 = 0 30 | 6:1/0 = 0 31 | 2:2/0 = 0 32 | 3:2/0 = 0 33 | 4:2/0 = 0 34 | 5:2/0 = 0 35 | 6:2/0 = 0 36 | 2:3/0 = 0 37 | 3:3/0 = 0 38 | 4:3/0 = 0 39 | 5:3/0 = 0 40 | 6:3/0 = 0 41 | 42 | [sub_resource type="TileSet" id="TileSet_lbvrf"] 43 | custom_data_layer_0/name = "Item" 44 | custom_data_layer_0/type = 2 45 | sources/0 = SubResource("TileSetAtlasSource_jtpl2") 46 | 47 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_k5xfw"] 48 | shader = ExtResource("2_m256f") 49 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 50 | shader_parameter/NumCircleCentres = 0 51 | shader_parameter/CircleRadius = 100.0 52 | shader_parameter/CircleBlur = 0.01 53 | 54 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_cafgl"] 55 | shader = ExtResource("2_m256f") 56 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 57 | shader_parameter/NumCircleCentres = 0 58 | shader_parameter/CircleRadius = 100.0 59 | shader_parameter/CircleBlur = 0.01 60 | 61 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_ho0iv"] 62 | shader = ExtResource("2_m256f") 63 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 64 | shader_parameter/NumCircleCentres = 0 65 | shader_parameter/CircleRadius = 100.0 66 | shader_parameter/CircleBlur = 0.01 67 | 68 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_6m1ea"] 69 | shader = ExtResource("2_m256f") 70 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 71 | shader_parameter/NumCircleCentres = 0 72 | shader_parameter/CircleRadius = 100.0 73 | shader_parameter/CircleBlur = 0.01 74 | 75 | [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_k5xfw"] 76 | texture = ExtResource("2_ku1xe") 77 | 0:0/0 = 0 78 | 1:0/0 = 0 79 | 1:0/0/z_index = -1 80 | 2:0/0 = 0 81 | 3:0/0 = 0 82 | 4:0/0 = 0 83 | 5:0/0 = 0 84 | 6:0/0 = 0 85 | 0:1/0 = 0 86 | 1:1/0 = 0 87 | 2:1/0 = 0 88 | 3:1/0 = 0 89 | 4:1/0 = 0 90 | 5:1/0 = 0 91 | 6:1/0 = 0 92 | 2:2/0 = 0 93 | 3:2/0 = 0 94 | 4:2/0 = 0 95 | 5:2/0 = 0 96 | 6:2/0 = 0 97 | 2:3/0 = 0 98 | 3:3/0 = 0 99 | 4:3/0 = 0 100 | 5:3/0 = 0 101 | 6:3/0 = 0 102 | 103 | [sub_resource type="TileSet" id="TileSet_cafgl"] 104 | custom_data_layer_0/name = "Item" 105 | custom_data_layer_0/type = 2 106 | sources/0 = SubResource("TileSetAtlasSource_k5xfw") 107 | 108 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_lbvrf"] 109 | shader = ExtResource("6_tqpdw") 110 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 111 | shader_parameter/NumCircleCentres = 0 112 | shader_parameter/CircleRadius = 75.0 113 | shader_parameter/CircleBlur = 0.01 114 | 115 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_xarji"] 116 | shader = ExtResource("6_tqpdw") 117 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 118 | shader_parameter/NumCircleCentres = 0 119 | shader_parameter/CircleRadius = 75.0 120 | shader_parameter/CircleBlur = 0.01 121 | 122 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_57b5b"] 123 | shader = ExtResource("6_tqpdw") 124 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 125 | shader_parameter/NumCircleCentres = 0 126 | shader_parameter/CircleRadius = 75.0 127 | shader_parameter/CircleBlur = 0.01 128 | 129 | [sub_resource type="ShaderMaterial" id="ShaderMaterial_p2xtl"] 130 | shader = ExtResource("6_tqpdw") 131 | shader_parameter/CircleCentres = PackedVector2Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 132 | shader_parameter/NumCircleCentres = 0 133 | shader_parameter/CircleRadius = 75.0 134 | shader_parameter/CircleBlur = 0.01 135 | 136 | [node name="Daicon" type="Node2D" node_paths=PackedStringArray("shader_trigger_nodes", "shader_target_nodes")] 137 | y_sort_enabled = true 138 | script = ExtResource("1_jtpl2") 139 | shader_trigger_nodes = [NodePath("Player"), NodePath("StaticDaicon_1"), NodePath("StaticDaicon_2")] 140 | shader_target_nodes = [NodePath("Blur/2"), NodePath("Blur/1"), NodePath("Blur/0"), NodePath("Blur/-1"), NodePath("Circle/-1"), NodePath("Circle/0"), NodePath("Circle/1"), NodePath("Circle/2")] 141 | metadata/_custom_type_script = "uid://eidynimsomkm" 142 | 143 | [node name="Blur" type="TileMap" parent="."] 144 | y_sort_enabled = true 145 | material = SubResource("ShaderMaterial_jtpl2") 146 | tile_set = SubResource("TileSet_lbvrf") 147 | format = 2 148 | script = ExtResource("3_m256f") 149 | mesh_library = ExtResource("4_tqpdw") 150 | metadata/_custom_type_script = "uid://baffwcreehsd7" 151 | 152 | [node name="-1" type="TileMapLayer" parent="Blur"] 153 | z_index = -10 154 | y_sort_enabled = true 155 | material = SubResource("ShaderMaterial_k5xfw") 156 | tile_map_data = PackedByteArray("AAD2/wAAAAABAAAAAAD3/wAAAAABAAAAAAD4/wAAAAABAAAAAAD5/wAAAAABAAAAAAD6/wAAAAABAAAAAAD7/wAAAAABAAAAAAD8/wAAAAABAAAAAAD9/wAAAAABAAAAAAD+/wAAAAABAAAAAAD1/wAAAAABAAAAAAD1/wMAAAABAAAAAAD2/wMAAAABAAAAAAD3/wMAAAABAAAAAAD4/wMAAAABAAAAAAD5/wMAAAABAAAAAAD6/wMAAAABAAAAAAD7/wMAAAABAAAAAAD8/wMAAAABAAAAAAD9/wMAAAABAAAAAAD+/wMAAAABAAAAAAD//wMAAAABAAAAAAA=") 157 | tile_set = SubResource("TileSet_lbvrf") 158 | 159 | [node name="0" type="TileMapLayer" parent="Blur"] 160 | y_sort_enabled = true 161 | material = SubResource("ShaderMaterial_cafgl") 162 | tile_map_data = PackedByteArray("AAD2//3/AAAAAAEAAAD2//7/AAAAAAEAAAD2////AAABAAAAAAD3//3/AAAAAAEAAAD3//7/AAAAAAEAAAD3////AAABAAAAAAD4//3/AAAAAAEAAAD4//7/AAAAAAEAAAD4////AAABAAAAAAD5//3/AAAAAAEAAAD5//7/AAAAAAEAAAD5////AAAAAAEAAAD6//3/AAAAAAEAAAD6//7/AAAAAAEAAAD6////AAAAAAEAAAD7//3/AAAAAAEAAAD7//7/AAAAAAEAAAD7////AAABAAAAAAD8//3/AAAAAAEAAAD8//7/AAAAAAEAAAD8////AAABAAAAAAD9//3/AAAAAAEAAAD9//7/AAAAAAEAAAD9////AAABAAAAAAD+//3/AAAAAAEAAAD+//7/AAAAAAEAAAD+////AAAAAAEAAAD1//3/AAAAAAEAAAD1//7/AAAAAAEAAAD1////AAAAAAEAAAD1/wEAAAAAAAEAAAD1/wIAAAAAAAEAAAD2/wEAAAAAAAEAAAD2/wIAAAAAAAEAAAD3/wEAAAAAAAEAAAD3/wIAAAAAAAEAAAD4/wEAAAAAAAEAAAD4/wIAAAAAAAEAAAD5/wEAAAAAAAEAAAD5/wIAAAAAAAEAAAD6/wEAAAAAAAEAAAD6/wIAAAAAAAEAAAD7/wEAAAAAAAEAAAD7/wIAAAABAAAAAAD8/wEAAAAAAAEAAAD8/wIAAAABAAAAAAD9/wEAAAAAAAEAAAD9/wIAAAABAAAAAAD+/wEAAAAAAAEAAAD+/wIAAAAAAAEAAAD//wEAAAAAAAEAAAD//wIAAAAAAAEAAAD1/wAAAAAAAAEAAAD2/wAAAAAAAAEAAAD3/wAAAAAAAAEAAAD4/wAAAAAAAAEAAAD5/wAAAAAAAAEAAAD6/wAAAAAAAAEAAAD7/wAAAAAAAAEAAAD8/wAAAAAAAAEAAAD9/wAAAAAAAAEAAAD+/wAAAAAAAAEAAAD//wAAAAAAAAEAAAA=") 163 | tile_set = SubResource("TileSet_lbvrf") 164 | 165 | [node name="1" type="TileMapLayer" parent="Blur"] 166 | z_index = 10 167 | y_sort_enabled = true 168 | material = SubResource("ShaderMaterial_ho0iv") 169 | tile_map_data = PackedByteArray("AAD3//7/AAABAAAAAAD4//7/AAABAAAAAAD8//7/AAABAAAAAAD9//7/AAABAAAAAAD2//7/AAABAAAAAAD7//7/AAABAAAAAAD7/wEAAAABAAAAAAD8/wEAAAABAAAAAAD9/wEAAAABAAAAAAA=") 170 | tile_set = SubResource("TileSet_lbvrf") 171 | 172 | [node name="2" type="TileMapLayer" parent="Blur"] 173 | z_index = 20 174 | y_sort_enabled = true 175 | material = SubResource("ShaderMaterial_6m1ea") 176 | tile_map_data = PackedByteArray("AAD3//3/AAAAAAAAAAD4//3/AAAAAAAAAAD8//3/AAAAAAAAAAD9//3/AAAAAAAAAAD2//3/AAAAAAAAAAD7//3/AAAAAAAAAAD7/wAAAAAAAAAAAAD8/wAAAAAAAAAAAAD9/wAAAAAAAAAAAAA=") 177 | tile_set = SubResource("TileSet_lbvrf") 178 | 179 | [node name="Circle" type="TileMap" parent="."] 180 | y_sort_enabled = true 181 | tile_set = SubResource("TileSet_cafgl") 182 | format = 2 183 | script = ExtResource("3_m256f") 184 | mesh_library = ExtResource("4_tqpdw") 185 | metadata/_custom_type_script = "uid://baffwcreehsd7" 186 | 187 | [node name="-1" type="TileMapLayer" parent="Circle"] 188 | z_index = -10 189 | y_sort_enabled = true 190 | material = SubResource("ShaderMaterial_lbvrf") 191 | tile_map_data = PackedByteArray("AAACAAAAAAABAAAAAAADAAAAAAABAAAAAAAEAAAAAAABAAAAAAAHAAAAAAABAAAAAAAIAAAAAAABAAAAAAAJAAAAAAABAAAAAAABAAAAAAABAAAAAAAFAAAAAAABAAAAAAAGAAAAAAABAAAAAAAKAAAAAAABAAAAAAAAAAMAAAABAAAAAAABAAMAAAABAAAAAAACAAMAAAABAAAAAAADAAMAAAABAAAAAAAEAAMAAAABAAAAAAAFAAMAAAABAAAAAAAGAAMAAAABAAAAAAAHAAMAAAABAAAAAAAIAAMAAAABAAAAAAAJAAMAAAABAAAAAAAKAAMAAAABAAAAAAA=") 192 | tile_set = SubResource("TileSet_cafgl") 193 | 194 | [node name="0" type="TileMapLayer" parent="Circle"] 195 | y_sort_enabled = true 196 | material = SubResource("ShaderMaterial_xarji") 197 | tile_map_data = PackedByteArray("AAACAP//AAABAAAAAAACAP7/AAAAAAEAAAACAP3/AAAAAAEAAAAEAP3/AAAAAAEAAAAEAP7/AAAAAAEAAAADAP7/AAAAAAEAAAADAP3/AAAAAAEAAAADAP//AAABAAAAAAAEAP//AAABAAAAAAAHAP3/AAAAAAEAAAAHAP7/AAAAAAEAAAAHAP//AAABAAAAAAAIAP//AAABAAAAAAAJAP//AAABAAAAAAAJAP7/AAAAAAEAAAAJAP3/AAAAAAEAAAAIAP3/AAAAAAEAAAAIAP7/AAAAAAEAAAABAP3/AAAAAAEAAAABAP7/AAAAAAEAAAABAP//AAAAAAEAAAAFAP//AAAAAAEAAAAFAP7/AAAAAAEAAAAFAP3/AAAAAAEAAAAGAP3/AAAAAAEAAAAGAP7/AAAAAAEAAAAGAP//AAAAAAEAAAAKAP//AAAAAAEAAAAKAP7/AAAAAAEAAAAKAP3/AAAAAAEAAAAAAAAAAAAAAAEAAAAAAAEAAAAAAAEAAAAAAAIAAAAAAAEAAAABAAAAAAAAAAEAAAABAAEAAAAAAAEAAAABAAIAAAAAAAEAAAACAAAAAAAAAAEAAAACAAEAAAAAAAEAAAACAAIAAAAAAAEAAAADAAAAAAAAAAEAAAADAAEAAAAAAAEAAAADAAIAAAAAAAEAAAAEAAAAAAAAAAEAAAAEAAEAAAAAAAEAAAAEAAIAAAAAAAEAAAAFAAAAAAAAAAEAAAAFAAEAAAAAAAEAAAAFAAIAAAAAAAEAAAAGAAAAAAAAAAEAAAAGAAEAAAAAAAEAAAAGAAIAAAAAAAEAAAAHAAAAAAAAAAEAAAAHAAEAAAAAAAEAAAAHAAIAAAABAAAAAAAIAAAAAAAAAAEAAAAIAAEAAAAAAAEAAAAIAAIAAAABAAAAAAAJAAAAAAAAAAEAAAAJAAEAAAAAAAEAAAAJAAIAAAABAAAAAAAKAAAAAAAAAAEAAAAKAAEAAAAAAAEAAAAKAAIAAAAAAAEAAAA=") 198 | tile_set = SubResource("TileSet_cafgl") 199 | 200 | [node name="1" type="TileMapLayer" parent="Circle"] 201 | z_index = 10 202 | y_sort_enabled = true 203 | material = SubResource("ShaderMaterial_57b5b") 204 | tile_map_data = PackedByteArray("AAACAP7/AAABAAAAAAADAP7/AAABAAAAAAAEAP7/AAABAAAAAAAHAP7/AAABAAAAAAAIAP7/AAABAAAAAAAJAP7/AAABAAAAAAAHAAEAAAABAAAAAAAIAAEAAAABAAAAAAAJAAEAAAABAAAAAAA=") 205 | tile_set = SubResource("TileSet_cafgl") 206 | 207 | [node name="2" type="TileMapLayer" parent="Circle"] 208 | z_index = 20 209 | material = SubResource("ShaderMaterial_p2xtl") 210 | tile_map_data = PackedByteArray("AAACAP3/AAAAAAAAAAADAP3/AAAAAAAAAAAEAP3/AAAAAAAAAAAHAP3/AAAAAAAAAAAIAP3/AAAAAAAAAAAJAP3/AAAAAAAAAAAHAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAA=") 211 | tile_set = SubResource("TileSet_cafgl") 212 | 213 | [node name="StaticDaicon_2" parent="." instance=ExtResource("7_jtpl2")] 214 | position = Vector2(56, -32) 215 | 216 | [node name="StaticDaicon_1" parent="." instance=ExtResource("7_jtpl2")] 217 | position = Vector2(-56, -32) 218 | 219 | [node name="Player" parent="." instance=ExtResource("8_lbvrf")] 220 | position = Vector2(-136, 15) 221 | -------------------------------------------------------------------------------- /addons/daicon/nodes/daicon_shadow.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | @icon("res://addons/daicon/icons/daicon_shadow.svg") 3 | class_name DaiconShadow extends Sprite2D 4 | 5 | var d3 : CharacterBody3D 6 | 7 | var start_y : float 8 | var current_y : float 9 | 10 | @onready var _initial_alpha : float = self.modulate.a 11 | const GRAVITY : int = 1000 # Y-axis accelaration. 12 | 13 | #region DaiconShadow Exports 14 | 15 | ## The node to which the shadow is attached. 16 | @export var daicon_parent : Node: 17 | set(node): 18 | daicon_parent = node 19 | if daicon_parent: 20 | if daicon_parent.get("tile_size"): self.tile_size = daicon_parent.get("tile_size") 21 | if daicon_parent.get("z_step"): self.z_step = daicon_parent.get("z_step") 22 | get(): 23 | return daicon_parent 24 | ## Tile Size determines how many pixels equal 1 meter in 3D.[br](basically it is the tile size per cell size in 3D)[br] [br] [i]Automatically synchronized with parent.[/i] 25 | @export var tile_size : int: 26 | set(size): 27 | if size > 0: tile_size = size 28 | get(): 29 | return tile_size 30 | ## Z-step in sortable system between height levels.[br][br][i]Automatically synchronized with parent.[/i] 31 | @export var z_step : int = 10: 32 | set(step): 33 | z_step = step 34 | get(): 35 | return z_step 36 | ## The minimal distance to modulate texture (in meters).[br][br]- For Coloration optimal value is 1 and more;[br]- For Discoloration optimal value is below 1. 37 | @export var min_distance : float = 1.0 38 | ## The max distance between parent and self (in meters). 39 | @export var max_distance : float = 8.0 40 | ## Shadow modulation mode. 41 | @export_enum("Discoloration", "Coloration") var shadow_mode: int = 0: 42 | set(mode): 43 | shadow_mode = mode 44 | get(): 45 | return shadow_mode 46 | ## The behavior mode of the physical body core.[br][br]Logic stream checks the state of the body relative to the surface (is_on_floor). Direct does not. 47 | @export_enum("Logic", "Direct") var stream_mode: int = 0: 48 | set(mode): 49 | stream_mode = mode 50 | get(): 51 | return stream_mode 52 | ## Shape or Polygon 3D. 53 | @export var shape : Node3D: 54 | set(node): 55 | if not d3: return 56 | if node: 57 | if node is CollisionShape3D: 58 | if shape: shape_properties = {} 59 | node.reparent(d3) 60 | d3.move_child(node, -1) 61 | node.position = Vector3(0, 0, 0) + shape_position 62 | node.rotation = Vector3(0, 0, 0) + shape_rotation 63 | node.scale = Vector3(0, 0, 0) + shape_scale 64 | shape_properties = {"Name" : node.name, 65 | "Shape" : node.shape, 66 | "Disabled" : node.disabled, 67 | 68 | "Position" : node.position, 69 | "Rotation" : node.rotation, 70 | "Scale" : node.scale, 71 | "Quaternion" : node.quaternion, 72 | "Basis" : node.basis, 73 | 74 | "RotationEditMode" : node.rotation_edit_mode, 75 | "RotationOrder" : node.rotation_order, 76 | "TopLevel" : node.top_level} 77 | elif node is CollisionPolygon3D: 78 | if shape: shape_properties = {} 79 | node.reparent(d3) 80 | d3.move_child(node, -1) 81 | node.position = Vector3(0, 0, 0) + shape_position 82 | node.rotation = Vector3(0, 0, 0) + shape_rotation 83 | node.scale = Vector3(0, 0, 0) + shape_scale 84 | shape_properties = {"Name" : node.name, 85 | "Depth" : node.depth, 86 | "Disabled" : node.disabled, 87 | "Polygon" : node.polygon, 88 | "Margin" : node.margin, 89 | 90 | "Position" : node.position, 91 | "Rotation" : node.rotation, 92 | "Scale" : node.scale, 93 | "Quaternion" : node.quaternion, 94 | "Basis" : node.basis, 95 | 96 | "RotationEditMode" : node.rotation_edit_mode, 97 | "RotationOrder" : node.rotation_order, 98 | "TopLevel" : node.top_level} 99 | else: 100 | shape_properties = {} 101 | get(): 102 | if not shape_properties: return 103 | return d3.get_node(str(shape_properties.Name)) 104 | 105 | @export_group("Shape") 106 | @export var current_shape : Shape3D: 107 | set(shape_3D): 108 | if shape: 109 | shape.shape = shape_3D 110 | if shape_properties: 111 | shape_properties["Shape"] = shape_3D 112 | current_shape = shape_3D 113 | get(): 114 | if not shape: return 115 | return shape.shape 116 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var shape_position: Vector3 = Vector3(0, 0, 0): 117 | set(v_3): 118 | if shape: 119 | shape.position = v_3 120 | if shape_properties: 121 | shape_properties["Position"] = v_3 122 | shape_position = v_3 123 | get(): 124 | return shape_position 125 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var shape_rotation: Vector3 = Vector3(0, 0, 0): 126 | set(v_3): 127 | if shape: 128 | shape.rotation = v_3 129 | if shape_properties: 130 | shape_properties["Rotation"] = v_3 131 | shape_rotation = v_3 132 | get(): 133 | return shape_rotation 134 | @export_custom(PROPERTY_HINT_LINK, "") var shape_scale: Vector3 = Vector3(1, 1, 1): 135 | set(v_3): 136 | if shape: 137 | shape.scale = v_3 138 | if shape_properties: 139 | shape_properties["Scale"] = v_3 140 | shape_scale = v_3 141 | get(): 142 | return shape_scale 143 | @export var shape_properties : Dictionary: 144 | set(dict): 145 | if not dict and shape: 146 | shape.reparent(self) 147 | get_child(-1).owner = get_tree().edited_scene_root 148 | shape_properties = dict 149 | get(): 150 | return shape_properties 151 | 152 | #endregion 153 | 154 | #region Core Exports 155 | 156 | @export_category("KinematicBody3D") 157 | @export_enum("Grounded", "Floating") var motion_mode_3d: int = 0: 158 | set(mode): 159 | if d3: d3.motion_mode = mode 160 | motion_mode_3d = mode 161 | property_list_changed.emit() 162 | get(): 163 | return motion_mode_3d 164 | @export var up_direction_3d: Vector3 = Vector3(0, 1, 0): 165 | set(v_3): 166 | if d3: d3.up_direction = v_3 167 | up_direction_3d = v_3 168 | get(): 169 | return up_direction_3d 170 | @export var slide_and_ceiling_3d: bool = true: 171 | set(value): 172 | if d3: d3.slide_on_ceiling = value 173 | slide_and_ceiling_3d = value 174 | get(): 175 | return slide_and_ceiling_3d 176 | @export_range(0, 180, 0.1, "radians_as_degrees") var wall_min_slide_ang: float = 0.261799: 177 | set(angle): 178 | if d3: d3.wall_min_slide_angle = angle 179 | wall_min_slide_ang = angle 180 | get(): 181 | return wall_min_slide_ang 182 | 183 | @export_group("Floor 3D") 184 | @export var stop_on_slope_3d: bool = true: 185 | set(value): 186 | if d3: d3.floor_stop_on_slope = value 187 | stop_on_slope_3d = value 188 | get(): 189 | return stop_on_slope_3d 190 | @export var constant_speed_3d: bool = false: 191 | set(value): 192 | if d3: d3.floor_constant_speed = value 193 | constant_speed_3d = value 194 | get(): 195 | return constant_speed_3d 196 | @export var block_on_wall_3d: bool = true: 197 | set(value): 198 | if d3: d3.floor_block_on_wall = value 199 | block_on_wall_3d = value 200 | get(): 201 | return block_on_wall_3d 202 | @export_range(0, 180, 0.1, "radians_as_degrees") var max_angle_3d: float = 0.785398: 203 | set(angle): 204 | if d3: d3.floor_max_angle = angle 205 | max_angle_3d = angle 206 | get(): 207 | return max_angle_3d 208 | @export_range(0, 1, 0.01, "or_greater", "suffix:m") var snap_length_3d: float = 0.1: 209 | set(angle): 210 | if d3: d3.floor_snap_length = angle 211 | snap_length_3d = angle 212 | get(): 213 | return snap_length_3d 214 | const grounded_properties : Array[StringName] = [&"up_direction_3d", &"slide_and_ceiling_3d", &"wall_min_slide_ang", &"Floor 3D", &"stop_on_slope_3d", &"constant_speed_3d", &"block_on_wall_3d", &"max_angle_3d", &"snap_length_3d"] 215 | const floating_properties : Array[StringName] = [&"wall_min_slide_ang"] 216 | 217 | @export_group("Moving Platform 3D") 218 | @export_enum("Add Velocity", "Add Upward Velocity", "Do Nothing") var on_leave: int = 0: 219 | set(mode): 220 | if d3: d3.platform_on_leave = mode 221 | on_leave = mode 222 | get(): 223 | return on_leave 224 | @export_flags_3d_physics var floor_layers: int = 0xFFFFFFFF: 225 | set(layer): 226 | if d3: d3.platform_floor_layers = layer 227 | floor_layers = layer 228 | get(): 229 | return floor_layers 230 | @export_flags_3d_physics var wall_layers: int = 0: 231 | set(layer): 232 | if d3: d3.platform_wall_layers = layer 233 | wall_layers = layer 234 | get(): 235 | return wall_layers 236 | 237 | @export_group("Collision") 238 | @export_range(0.001, 256, 0.001, "suffix:m") var safe_margin_3d: float = 0.001: 239 | set(margin): 240 | if d3: d3.safe_margin = margin 241 | safe_margin_3d = margin 242 | get(): 243 | return safe_margin_3d 244 | 245 | @export_category("CollisionObject3D") 246 | @export_enum("Remove", "Make Static", "Keep Active") var disable_mode_3d = 0: 247 | set(mode): 248 | if d3: d3.disable_mode = mode 249 | disable_mode_3d = mode 250 | get(): 251 | return disable_mode_3d 252 | 253 | @export_group("Collision") 254 | @export_flags_3d_physics var layer = 1: 255 | set(collision_layer): 256 | if d3: d3.collision_layer = collision_layer 257 | layer = collision_layer 258 | get(): 259 | return layer 260 | @export_flags_3d_navigation var mask = 1: 261 | set(collision_mask): 262 | if d3: d3.collision_mask = collision_mask 263 | mask = collision_mask 264 | get(): 265 | return mask 266 | @export var priority: float = 1: 267 | set(value): 268 | if d3: d3.collision_priority = value 269 | priority = value 270 | get(): 271 | return priority 272 | 273 | @export_group("Input") 274 | @export var ray_pickable: bool = true: 275 | set(value): 276 | if d3: d3.input_ray_pickable = value 277 | ray_pickable = value 278 | get(): 279 | return ray_pickable 280 | @export var capture_on_drag: bool: 281 | set(value): 282 | if d3: d3.input_capture_on_drag = value 283 | capture_on_drag = value 284 | get(): 285 | return capture_on_drag 286 | 287 | @export_group("Axis Lock") 288 | @export var linear_x: bool = false: 289 | set(value): 290 | if d3: d3.axis_lock_linear_x = value 291 | linear_x = value 292 | get(): 293 | return linear_x 294 | @export var linear_y: bool = false: 295 | set(value): 296 | if d3: d3.axis_lock_linear_y = value 297 | linear_y = value 298 | get(): 299 | return linear_y 300 | @export var linear_z: bool = false: 301 | set(value): 302 | if d3: d3.axis_lock_linear_z = value 303 | linear_z = value 304 | get(): 305 | return linear_z 306 | @export var angular_x: bool = false: 307 | set(value): 308 | if d3: d3.axis_lock_angular_x = value 309 | angular_x = value 310 | get(): 311 | return angular_x 312 | @export var angular_y: bool = false: 313 | set(value): 314 | if d3: d3.axis_lock_angular_y = value 315 | angular_y = value 316 | get(): 317 | return angular_y 318 | @export var angular_z: bool = false: 319 | set(value): 320 | if d3: d3.axis_lock_angular_z = value 321 | angular_z = value 322 | get(): 323 | return angular_z 324 | 325 | #endregion 326 | 327 | func _ready() -> void: 328 | start_y = position.y 329 | if tile_size == 0: 330 | self.set_y_sort_enabled(true) 331 | self.set_z_as_relative(false) 332 | tile_size = 16 333 | _expand() 334 | func _process(delta: float) -> void: 335 | if Engine.is_editor_hint(): 336 | if not d3: _expand() 337 | 338 | if self.position.x != d3.position.x * tile_size: 339 | d3.position.x = self.position.x / tile_size 340 | if self.position.y != (d3.position.z - d3.position.y) * tile_size: 341 | d3.position.z = (self.position.y / tile_size) + d3.position.y 342 | elif not Engine.is_editor_hint(): 343 | if daicon_parent and not d3.get_collision_exceptions().has(daicon_parent.d3): 344 | var distance := d3.position.distance_to(daicon_parent.d3.global_position - daicon_parent.offset_3d) 345 | _update_modulation(distance) 346 | d3.add_collision_exception_with(daicon_parent.d3) 347 | func _physics_process(delta: float) -> void: 348 | if not Engine.is_editor_hint(): 349 | if daicon_parent and daicon_parent.d3: 350 | var distance := d3.position.distance_to(daicon_parent.d3.global_position - daicon_parent.offset_3d) 351 | 352 | if stream_mode: 353 | #direct 354 | _update_direct_position(distance) 355 | elif not stream_mode: 356 | #logic 357 | _update_position(distance, delta) 358 | 359 | func _update_modulation(distance): 360 | if shadow_mode: 361 | #coloration 362 | if distance > min_distance: 363 | self.modulate.a = _initial_alpha 364 | else: 365 | self.modulate.a = lerp(0.0, _initial_alpha, distance / min_distance) 366 | elif not shadow_mode: 367 | #discoloration 368 | if distance > min_distance: 369 | self.modulate.a = lerp(0.0, _initial_alpha, min_distance / distance) 370 | else: 371 | self.modulate.a = _initial_alpha 372 | func _update_position(distance, delta): 373 | if daicon_parent.d3.is_on_floor(): 374 | self.visible = true 375 | _update_modulation(distance) 376 | 377 | self.position.y = start_y 378 | d3.position = daicon_parent.d3.position - daicon_parent.offset_3d 379 | self.z_index = (round(d3.position.y + 0.3) * z_step) + 1 380 | else: 381 | if distance < max_distance: 382 | d3.velocity.y -= GRAVITY * delta 383 | else: 384 | self.visible = false 385 | d3.position = daicon_parent.d3.position - daicon_parent.offset_3d 386 | 387 | if d3.is_on_floor(): 388 | self.visible = true 389 | _update_modulation(distance) 390 | self.position.y = start_y + (distance * tile_size) 391 | self.z_index = (round(d3.position.y + 0.3) * z_step) + 1 392 | d3.position = daicon_parent.d3.position - daicon_parent.offset_3d 393 | d3.move_and_slide() 394 | func _update_direct_position(distance): 395 | if distance < max_distance: 396 | d3.velocity.y = -GRAVITY 397 | else: 398 | self.visible = false 399 | d3.position = daicon_parent.d3.position - daicon_parent.offset_3d 400 | 401 | if d3.is_on_floor(): 402 | self.visible = true 403 | _update_modulation(distance) 404 | self.position.y = start_y + (distance * tile_size) 405 | self.z_index = (round(d3.position.y + 0.3) * z_step) + 1 406 | d3.position = daicon_parent.d3.position - daicon_parent.offset_3d 407 | d3.move_and_slide() 408 | 409 | func _validate_property(property: Dictionary) -> void: 410 | if not d3: return 411 | 412 | #motion mode 413 | if property.name in grounded_properties: 414 | if motion_mode_3d == 0: 415 | property.usage |= PROPERTY_USAGE_EDITOR 416 | else: 417 | property.usage &= ~PROPERTY_USAGE_EDITOR 418 | if property.name in floating_properties: 419 | if motion_mode_3d == 1: 420 | property.usage |= PROPERTY_USAGE_EDITOR 421 | 422 | #region Expand 423 | 424 | func _expand() -> void: 425 | _expand_d3() 426 | if shape_properties: 427 | _expand_shape() 428 | 429 | func _expand_d3() -> void: 430 | d3 = CharacterBody3D.new() 431 | d3.set_name("KinematicBody3D") 432 | add_child(d3) 433 | move_child(d3, 0) 434 | d3 = get_child(0) 435 | 436 | d3.motion_mode = motion_mode_3d 437 | d3.up_direction = up_direction_3d 438 | d3.slide_on_ceiling = slide_and_ceiling_3d 439 | d3.wall_min_slide_angle = wall_min_slide_ang 440 | 441 | d3.floor_stop_on_slope = stop_on_slope_3d 442 | d3.floor_constant_speed = constant_speed_3d 443 | d3.floor_block_on_wall = block_on_wall_3d 444 | d3.floor_max_angle = max_angle_3d 445 | d3.floor_snap_length = snap_length_3d 446 | 447 | d3.platform_on_leave = on_leave 448 | d3.platform_floor_layers = floor_layers 449 | d3.platform_wall_layers = wall_layers 450 | 451 | d3.safe_margin = safe_margin_3d 452 | 453 | d3.axis_lock_linear_x = linear_x 454 | d3.axis_lock_linear_y = linear_y 455 | d3.axis_lock_linear_z = linear_z 456 | d3.axis_lock_angular_x = angular_x 457 | d3.axis_lock_angular_y = angular_y 458 | d3.axis_lock_angular_z = angular_z 459 | 460 | d3.disable_mode = disable_mode_3d 461 | d3.collision_layer = layer 462 | d3.collision_mask = mask 463 | d3.collision_priority = priority 464 | 465 | d3.input_ray_pickable = ray_pickable 466 | d3.input_capture_on_drag = capture_on_drag 467 | func _expand_shape() -> void: 468 | if len(shape_properties) == 11: 469 | var _shape = CollisionShape3D.new() 470 | _shape.set_name(shape_properties.Name) 471 | d3.add_child(_shape) 472 | 473 | _shape.shape = shape_properties["Shape"] 474 | _shape.disabled = shape_properties["Disabled"] 475 | 476 | _shape.position = shape_properties["Position"] 477 | _shape.rotation = shape_properties["Rotation"] 478 | _shape.scale = shape_properties["Scale"] 479 | _shape.quaternion = shape_properties["Quaternion"] 480 | _shape.basis = shape_properties["Basis"] 481 | 482 | _shape.rotation_edit_mode = shape_properties["RotationEditMode"] 483 | _shape.rotation_order = shape_properties["RotationOrder"] 484 | _shape.top_level = shape_properties["TopLevel"] 485 | else: 486 | var _shape = CollisionPolygon3D.new() 487 | _shape.set_name(shape_properties.Name) 488 | d3.add_child(_shape) 489 | 490 | _shape.depth = shape_properties["Depth"] 491 | _shape.disabled = shape_properties["Disabled"] 492 | _shape.polygon = shape_properties["Polygon"] 493 | _shape.margin = shape_properties["Margin"] 494 | 495 | _shape.position = shape_properties["Position"] 496 | _shape.rotation = shape_properties["Rotation"] 497 | _shape.scale = shape_properties["Scale"] 498 | _shape.quaternion = shape_properties["Quaternion"] 499 | _shape.basis = shape_properties["Basis"] 500 | 501 | _shape.rotation_edit_mode = shape_properties["RotationEditMode"] 502 | _shape.rotation_order = shape_properties["RotationOrder"] 503 | _shape.top_level = shape_properties["TopLevel"] 504 | 505 | #endregion 506 | -------------------------------------------------------------------------------- /example/player.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=76 format=3 uid="uid://d1sgg3bial5f7"] 2 | 3 | [ext_resource type="Script" uid="uid://d0ahwc7nyq3ob" path="res://example/code/player.gd" id="1_rxg4x"] 4 | [ext_resource type="Texture2D" uid="uid://c8yh603f8hoqt" path="res://example/assets/basic.png" id="2_rxg4x"] 5 | [ext_resource type="Script" uid="uid://geccrkqt6jtq" path="res://addons/daicon/nodes/daicon_shadow.gd" id="3_7dqni"] 6 | [ext_resource type="Texture2D" uid="uid://bwnwa7yih5ous" path="res://example/assets/shadow.png" id="3_43feq"] 7 | 8 | [sub_resource type="BoxMesh" id="BoxMesh_43feq"] 9 | 10 | [sub_resource type="BoxShape3D" id="BoxShape3D_ptnvh"] 11 | 12 | [sub_resource type="BoxShape3D" id="BoxShape3D_43feq"] 13 | size = Vector3(0.9, 0.9, 0.9) 14 | 15 | [sub_resource type="Animation" id="Animation_sqi8f"] 16 | resource_name = "Idle Down" 17 | length = 2.0 18 | loop_mode = 1 19 | step = 0.5 20 | tracks/0/type = "value" 21 | tracks/0/imported = false 22 | tracks/0/enabled = true 23 | tracks/0/path = NodePath("Sprite2D:frame") 24 | tracks/0/interp = 1 25 | tracks/0/loop_wrap = true 26 | tracks/0/keys = { 27 | "times": PackedFloat32Array(0, 1.5), 28 | "transitions": PackedFloat32Array(1, 1), 29 | "update": 1, 30 | "values": [2, 3] 31 | } 32 | tracks/1/type = "value" 33 | tracks/1/imported = false 34 | tracks/1/enabled = true 35 | tracks/1/path = NodePath("Sprite2D:flip_h") 36 | tracks/1/interp = 1 37 | tracks/1/loop_wrap = true 38 | tracks/1/keys = { 39 | "times": PackedFloat32Array(0), 40 | "transitions": PackedFloat32Array(1), 41 | "update": 1, 42 | "values": [false] 43 | } 44 | 45 | [sub_resource type="Animation" id="Animation_8dohw"] 46 | resource_name = "Idle Left" 47 | length = 2.0 48 | loop_mode = 1 49 | step = 0.5 50 | tracks/0/type = "value" 51 | tracks/0/imported = false 52 | tracks/0/enabled = true 53 | tracks/0/path = NodePath("Sprite2D:frame") 54 | tracks/0/interp = 1 55 | tracks/0/loop_wrap = true 56 | tracks/0/keys = { 57 | "times": PackedFloat32Array(0, 1), 58 | "transitions": PackedFloat32Array(1, 1), 59 | "update": 1, 60 | "values": [0, 1] 61 | } 62 | tracks/1/type = "value" 63 | tracks/1/imported = false 64 | tracks/1/enabled = true 65 | tracks/1/path = NodePath("Sprite2D:flip_h") 66 | tracks/1/interp = 1 67 | tracks/1/loop_wrap = true 68 | tracks/1/keys = { 69 | "times": PackedFloat32Array(0), 70 | "transitions": PackedFloat32Array(1), 71 | "update": 1, 72 | "values": [false] 73 | } 74 | 75 | [sub_resource type="Animation" id="Animation_vlb61"] 76 | resource_name = "Idle Right" 77 | length = 2.0 78 | loop_mode = 1 79 | step = 0.5 80 | tracks/0/type = "value" 81 | tracks/0/imported = false 82 | tracks/0/enabled = true 83 | tracks/0/path = NodePath("Sprite2D:frame") 84 | tracks/0/interp = 1 85 | tracks/0/loop_wrap = true 86 | tracks/0/keys = { 87 | "times": PackedFloat32Array(0, 1), 88 | "transitions": PackedFloat32Array(1, 1), 89 | "update": 1, 90 | "values": [0, 1] 91 | } 92 | tracks/1/type = "value" 93 | tracks/1/imported = false 94 | tracks/1/enabled = true 95 | tracks/1/path = NodePath("Sprite2D:flip_h") 96 | tracks/1/interp = 1 97 | tracks/1/loop_wrap = true 98 | tracks/1/keys = { 99 | "times": PackedFloat32Array(0, 2), 100 | "transitions": PackedFloat32Array(1, 1), 101 | "update": 1, 102 | "values": [true, true] 103 | } 104 | 105 | [sub_resource type="Animation" id="Animation_xywr7"] 106 | resource_name = "Idle Up" 107 | length = 2.0 108 | loop_mode = 1 109 | step = 0.5 110 | tracks/0/type = "value" 111 | tracks/0/imported = false 112 | tracks/0/enabled = true 113 | tracks/0/path = NodePath("Sprite2D:frame") 114 | tracks/0/interp = 1 115 | tracks/0/loop_wrap = true 116 | tracks/0/keys = { 117 | "times": PackedFloat32Array(0), 118 | "transitions": PackedFloat32Array(1), 119 | "update": 1, 120 | "values": [4] 121 | } 122 | tracks/1/type = "value" 123 | tracks/1/imported = false 124 | tracks/1/enabled = true 125 | tracks/1/path = NodePath("Sprite2D:flip_h") 126 | tracks/1/interp = 1 127 | tracks/1/loop_wrap = true 128 | tracks/1/keys = { 129 | "times": PackedFloat32Array(0), 130 | "transitions": PackedFloat32Array(1), 131 | "update": 1, 132 | "values": [false] 133 | } 134 | 135 | [sub_resource type="Animation" id="Animation_2nnqo"] 136 | resource_name = "Jump Down" 137 | loop_mode = 1 138 | step = 0.5 139 | tracks/0/type = "value" 140 | tracks/0/imported = false 141 | tracks/0/enabled = true 142 | tracks/0/path = NodePath("Sprite2D:frame") 143 | tracks/0/interp = 1 144 | tracks/0/loop_wrap = true 145 | tracks/0/keys = { 146 | "times": PackedFloat32Array(0), 147 | "transitions": PackedFloat32Array(1), 148 | "update": 1, 149 | "values": [37] 150 | } 151 | tracks/1/type = "value" 152 | tracks/1/imported = false 153 | tracks/1/enabled = true 154 | tracks/1/path = NodePath("Sprite2D:flip_h") 155 | tracks/1/interp = 1 156 | tracks/1/loop_wrap = true 157 | tracks/1/keys = { 158 | "times": PackedFloat32Array(0), 159 | "transitions": PackedFloat32Array(1), 160 | "update": 1, 161 | "values": [false] 162 | } 163 | 164 | [sub_resource type="Animation" id="Animation_6vysq"] 165 | resource_name = "Jump Down Down" 166 | step = 0.5 167 | tracks/0/type = "value" 168 | tracks/0/imported = false 169 | tracks/0/enabled = true 170 | tracks/0/path = NodePath("Sprite2D:frame") 171 | tracks/0/interp = 1 172 | tracks/0/loop_wrap = true 173 | tracks/0/keys = { 174 | "times": PackedFloat32Array(0), 175 | "transitions": PackedFloat32Array(1), 176 | "update": 1, 177 | "values": [36] 178 | } 179 | tracks/1/type = "value" 180 | tracks/1/imported = false 181 | tracks/1/enabled = true 182 | tracks/1/path = NodePath("Sprite2D:flip_h") 183 | tracks/1/interp = 1 184 | tracks/1/loop_wrap = true 185 | tracks/1/keys = { 186 | "times": PackedFloat32Array(0), 187 | "transitions": PackedFloat32Array(1), 188 | "update": 1, 189 | "values": [false] 190 | } 191 | 192 | [sub_resource type="Animation" id="Animation_n7wk7"] 193 | resource_name = "Jump Down Left" 194 | step = 0.5 195 | tracks/0/type = "value" 196 | tracks/0/imported = false 197 | tracks/0/enabled = true 198 | tracks/0/path = NodePath("Sprite2D:frame") 199 | tracks/0/interp = 1 200 | tracks/0/loop_wrap = true 201 | tracks/0/keys = { 202 | "times": PackedFloat32Array(0), 203 | "transitions": PackedFloat32Array(1), 204 | "update": 1, 205 | "values": [24] 206 | } 207 | tracks/1/type = "value" 208 | tracks/1/imported = false 209 | tracks/1/enabled = true 210 | tracks/1/path = NodePath("Sprite2D:flip_h") 211 | tracks/1/interp = 1 212 | tracks/1/loop_wrap = true 213 | tracks/1/keys = { 214 | "times": PackedFloat32Array(0), 215 | "transitions": PackedFloat32Array(1), 216 | "update": 1, 217 | "values": [false] 218 | } 219 | 220 | [sub_resource type="Animation" id="Animation_ulhwd"] 221 | resource_name = "Jump Down Right" 222 | step = 0.5 223 | tracks/0/type = "value" 224 | tracks/0/imported = false 225 | tracks/0/enabled = true 226 | tracks/0/path = NodePath("Sprite2D:frame") 227 | tracks/0/interp = 1 228 | tracks/0/loop_wrap = true 229 | tracks/0/keys = { 230 | "times": PackedFloat32Array(0), 231 | "transitions": PackedFloat32Array(1), 232 | "update": 1, 233 | "values": [24] 234 | } 235 | tracks/1/type = "value" 236 | tracks/1/imported = false 237 | tracks/1/enabled = true 238 | tracks/1/path = NodePath("Sprite2D:flip_h") 239 | tracks/1/interp = 1 240 | tracks/1/loop_wrap = true 241 | tracks/1/keys = { 242 | "times": PackedFloat32Array(0, 1), 243 | "transitions": PackedFloat32Array(1, 1), 244 | "update": 1, 245 | "values": [true, true] 246 | } 247 | 248 | [sub_resource type="Animation" id="Animation_pxba6"] 249 | resource_name = "Jump Down Up" 250 | step = 0.5 251 | tracks/0/type = "value" 252 | tracks/0/imported = false 253 | tracks/0/enabled = true 254 | tracks/0/path = NodePath("Sprite2D:frame") 255 | tracks/0/interp = 1 256 | tracks/0/loop_wrap = true 257 | tracks/0/keys = { 258 | "times": PackedFloat32Array(0), 259 | "transitions": PackedFloat32Array(1), 260 | "update": 1, 261 | "values": [30] 262 | } 263 | tracks/1/type = "value" 264 | tracks/1/imported = false 265 | tracks/1/enabled = true 266 | tracks/1/path = NodePath("Sprite2D:flip_h") 267 | tracks/1/interp = 1 268 | tracks/1/loop_wrap = true 269 | tracks/1/keys = { 270 | "times": PackedFloat32Array(0), 271 | "transitions": PackedFloat32Array(1), 272 | "update": 1, 273 | "values": [false] 274 | } 275 | 276 | [sub_resource type="Animation" id="Animation_14yey"] 277 | resource_name = "Jump Left" 278 | loop_mode = 1 279 | step = 0.5 280 | tracks/0/type = "value" 281 | tracks/0/imported = false 282 | tracks/0/enabled = true 283 | tracks/0/path = NodePath("Sprite2D:frame") 284 | tracks/0/interp = 1 285 | tracks/0/loop_wrap = true 286 | tracks/0/keys = { 287 | "times": PackedFloat32Array(0), 288 | "transitions": PackedFloat32Array(1), 289 | "update": 1, 290 | "values": [25] 291 | } 292 | tracks/1/type = "value" 293 | tracks/1/imported = false 294 | tracks/1/enabled = true 295 | tracks/1/path = NodePath("Sprite2D:flip_h") 296 | tracks/1/interp = 1 297 | tracks/1/loop_wrap = true 298 | tracks/1/keys = { 299 | "times": PackedFloat32Array(0), 300 | "transitions": PackedFloat32Array(1), 301 | "update": 1, 302 | "values": [false] 303 | } 304 | 305 | [sub_resource type="Animation" id="Animation_jamto"] 306 | resource_name = "Jump Right" 307 | step = 0.5 308 | tracks/0/type = "value" 309 | tracks/0/imported = false 310 | tracks/0/enabled = true 311 | tracks/0/path = NodePath("Sprite2D:frame") 312 | tracks/0/interp = 1 313 | tracks/0/loop_wrap = true 314 | tracks/0/keys = { 315 | "times": PackedFloat32Array(0), 316 | "transitions": PackedFloat32Array(1), 317 | "update": 1, 318 | "values": [25] 319 | } 320 | tracks/1/type = "value" 321 | tracks/1/imported = false 322 | tracks/1/enabled = true 323 | tracks/1/path = NodePath("Sprite2D:flip_h") 324 | tracks/1/interp = 1 325 | tracks/1/loop_wrap = true 326 | tracks/1/keys = { 327 | "times": PackedFloat32Array(0, 1), 328 | "transitions": PackedFloat32Array(1, 1), 329 | "update": 1, 330 | "values": [true, true] 331 | } 332 | 333 | [sub_resource type="Animation" id="Animation_k7ds0"] 334 | resource_name = "Jump Up" 335 | loop_mode = 1 336 | step = 0.5 337 | tracks/0/type = "value" 338 | tracks/0/imported = false 339 | tracks/0/enabled = true 340 | tracks/0/path = NodePath("Sprite2D:frame") 341 | tracks/0/interp = 1 342 | tracks/0/loop_wrap = true 343 | tracks/0/keys = { 344 | "times": PackedFloat32Array(0), 345 | "transitions": PackedFloat32Array(1), 346 | "update": 1, 347 | "values": [31] 348 | } 349 | tracks/1/type = "value" 350 | tracks/1/imported = false 351 | tracks/1/enabled = true 352 | tracks/1/path = NodePath("Sprite2D:flip_h") 353 | tracks/1/interp = 1 354 | tracks/1/loop_wrap = true 355 | tracks/1/keys = { 356 | "times": PackedFloat32Array(0), 357 | "transitions": PackedFloat32Array(1), 358 | "update": 1, 359 | "values": [false] 360 | } 361 | 362 | [sub_resource type="Animation" id="Animation_5sqsh"] 363 | length = 0.001 364 | tracks/0/type = "value" 365 | tracks/0/imported = false 366 | tracks/0/enabled = true 367 | tracks/0/path = NodePath("Sprite2D:frame") 368 | tracks/0/interp = 1 369 | tracks/0/loop_wrap = true 370 | tracks/0/keys = { 371 | "times": PackedFloat32Array(0), 372 | "transitions": PackedFloat32Array(1), 373 | "update": 1, 374 | "values": [0] 375 | } 376 | tracks/1/type = "value" 377 | tracks/1/imported = false 378 | tracks/1/enabled = true 379 | tracks/1/path = NodePath("Sprite2D:flip_h") 380 | tracks/1/interp = 1 381 | tracks/1/loop_wrap = true 382 | tracks/1/keys = { 383 | "times": PackedFloat32Array(0), 384 | "transitions": PackedFloat32Array(1), 385 | "update": 1, 386 | "values": [true] 387 | } 388 | 389 | [sub_resource type="Animation" id="Animation_255js"] 390 | resource_name = "Run Down" 391 | length = 0.6 392 | loop_mode = 1 393 | step = 0.1 394 | tracks/0/type = "value" 395 | tracks/0/imported = false 396 | tracks/0/enabled = true 397 | tracks/0/path = NodePath("Sprite2D:frame") 398 | tracks/0/interp = 1 399 | tracks/0/loop_wrap = true 400 | tracks/0/keys = { 401 | "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), 402 | "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), 403 | "update": 1, 404 | "values": [29, 30, 31, 32, 33, 34] 405 | } 406 | tracks/1/type = "value" 407 | tracks/1/imported = false 408 | tracks/1/enabled = true 409 | tracks/1/path = NodePath("Sprite2D:flip_h") 410 | tracks/1/interp = 1 411 | tracks/1/loop_wrap = true 412 | tracks/1/keys = { 413 | "times": PackedFloat32Array(0), 414 | "transitions": PackedFloat32Array(1), 415 | "update": 1, 416 | "values": [false] 417 | } 418 | 419 | [sub_resource type="Animation" id="Animation_wom78"] 420 | resource_name = "Run Left" 421 | length = 0.6 422 | loop_mode = 1 423 | step = 0.1 424 | tracks/0/type = "value" 425 | tracks/0/imported = false 426 | tracks/0/enabled = true 427 | tracks/0/path = NodePath("Sprite2D:frame") 428 | tracks/0/interp = 1 429 | tracks/0/loop_wrap = true 430 | tracks/0/keys = { 431 | "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), 432 | "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), 433 | "update": 1, 434 | "values": [23, 24, 25, 26, 27, 28] 435 | } 436 | tracks/1/type = "value" 437 | tracks/1/imported = false 438 | tracks/1/enabled = true 439 | tracks/1/path = NodePath("Sprite2D:flip_h") 440 | tracks/1/interp = 1 441 | tracks/1/loop_wrap = true 442 | tracks/1/keys = { 443 | "times": PackedFloat32Array(0), 444 | "transitions": PackedFloat32Array(1), 445 | "update": 1, 446 | "values": [false] 447 | } 448 | 449 | [sub_resource type="Animation" id="Animation_0r7r6"] 450 | resource_name = "Run Right" 451 | length = 0.6 452 | loop_mode = 1 453 | step = 0.1 454 | tracks/0/type = "value" 455 | tracks/0/imported = false 456 | tracks/0/enabled = true 457 | tracks/0/path = NodePath("Sprite2D:frame") 458 | tracks/0/interp = 1 459 | tracks/0/loop_wrap = true 460 | tracks/0/keys = { 461 | "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), 462 | "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), 463 | "update": 1, 464 | "values": [23, 24, 25, 26, 27, 28] 465 | } 466 | tracks/1/type = "value" 467 | tracks/1/imported = false 468 | tracks/1/enabled = true 469 | tracks/1/path = NodePath("Sprite2D:flip_h") 470 | tracks/1/interp = 1 471 | tracks/1/loop_wrap = true 472 | tracks/1/keys = { 473 | "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), 474 | "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), 475 | "update": 1, 476 | "values": [true, true, true, true, true, true] 477 | } 478 | 479 | [sub_resource type="Animation" id="Animation_n003c"] 480 | resource_name = "Run Up" 481 | length = 0.6 482 | loop_mode = 1 483 | step = 0.1 484 | tracks/0/type = "value" 485 | tracks/0/imported = false 486 | tracks/0/enabled = true 487 | tracks/0/path = NodePath("Sprite2D:frame") 488 | tracks/0/interp = 1 489 | tracks/0/loop_wrap = true 490 | tracks/0/keys = { 491 | "times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5), 492 | "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), 493 | "update": 1, 494 | "values": [35, 36, 37, 38, 39, 40] 495 | } 496 | tracks/1/type = "value" 497 | tracks/1/imported = false 498 | tracks/1/enabled = true 499 | tracks/1/path = NodePath("Sprite2D:flip_h") 500 | tracks/1/interp = 1 501 | tracks/1/loop_wrap = true 502 | tracks/1/keys = { 503 | "times": PackedFloat32Array(0), 504 | "transitions": PackedFloat32Array(1), 505 | "update": 1, 506 | "values": [false] 507 | } 508 | 509 | [sub_resource type="AnimationLibrary" id="AnimationLibrary_8oupr"] 510 | _data = { 511 | &"Idle Down": SubResource("Animation_sqi8f"), 512 | &"Idle Left": SubResource("Animation_8dohw"), 513 | &"Idle Right": SubResource("Animation_vlb61"), 514 | &"Idle Up": SubResource("Animation_xywr7"), 515 | &"Jump Down": SubResource("Animation_2nnqo"), 516 | &"Jump Down Down": SubResource("Animation_6vysq"), 517 | &"Jump Down Left": SubResource("Animation_n7wk7"), 518 | &"Jump Down Right": SubResource("Animation_ulhwd"), 519 | &"Jump Down Up": SubResource("Animation_pxba6"), 520 | &"Jump Left": SubResource("Animation_14yey"), 521 | &"Jump Right": SubResource("Animation_jamto"), 522 | &"Jump Up": SubResource("Animation_k7ds0"), 523 | &"RESET": SubResource("Animation_5sqsh"), 524 | &"Run Down": SubResource("Animation_255js"), 525 | &"Run Left": SubResource("Animation_wom78"), 526 | &"Run Right": SubResource("Animation_0r7r6"), 527 | &"Run Up": SubResource("Animation_n003c") 528 | } 529 | 530 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rdgqb"] 531 | animation = &"Idle Left" 532 | 533 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_p61rc"] 534 | animation = &"Idle Right" 535 | 536 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vstwl"] 537 | animation = &"Idle Up" 538 | 539 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_tp16y"] 540 | animation = &"Idle Down" 541 | 542 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2s2aj"] 543 | animation = &"Jump Down" 544 | 545 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_xdpjr"] 546 | animation = &"Idle Down" 547 | 548 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_tkw2h"] 549 | animation = &"Idle Up" 550 | 551 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_720bp"] 552 | animation = &"Idle Up" 553 | 554 | [sub_resource type="AnimationNodeBlendSpace2D" id="AnimationNodeBlendSpace2D_b3tmi"] 555 | blend_point_0/node = SubResource("AnimationNodeAnimation_rdgqb") 556 | blend_point_0/pos = Vector2(-1, 0) 557 | blend_point_1/node = SubResource("AnimationNodeAnimation_p61rc") 558 | blend_point_1/pos = Vector2(1, 0) 559 | blend_point_2/node = SubResource("AnimationNodeAnimation_vstwl") 560 | blend_point_2/pos = Vector2(0, -1) 561 | blend_point_3/node = SubResource("AnimationNodeAnimation_tp16y") 562 | blend_point_3/pos = Vector2(0, 1) 563 | blend_point_4/node = SubResource("AnimationNodeAnimation_2s2aj") 564 | blend_point_4/pos = Vector2(-0.5, 0.5) 565 | blend_point_5/node = SubResource("AnimationNodeAnimation_xdpjr") 566 | blend_point_5/pos = Vector2(0.5, 0.5) 567 | blend_point_6/node = SubResource("AnimationNodeAnimation_tkw2h") 568 | blend_point_6/pos = Vector2(0.5, -0.5) 569 | blend_point_7/node = SubResource("AnimationNodeAnimation_720bp") 570 | blend_point_7/pos = Vector2(-0.5, -0.5) 571 | snap = Vector2(0.5, 0.5) 572 | blend_mode = 1 573 | 574 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_68fga"] 575 | animation = &"Jump Down Left" 576 | 577 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ulw8l"] 578 | animation = &"Jump Down Right" 579 | 580 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_n6s0j"] 581 | animation = &"Jump Down Up" 582 | 583 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_1xkip"] 584 | animation = &"Jump Down Down" 585 | 586 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_5bh7x"] 587 | animation = &"Jump Down Up" 588 | 589 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_60rgu"] 590 | animation = &"Jump Down Up" 591 | 592 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_r6dg0"] 593 | animation = &"Jump Down Down" 594 | 595 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rtwb0"] 596 | animation = &"Jump Down Down" 597 | 598 | [sub_resource type="AnimationNodeBlendSpace2D" id="AnimationNodeBlendSpace2D_oajs1"] 599 | blend_point_0/node = SubResource("AnimationNodeAnimation_68fga") 600 | blend_point_0/pos = Vector2(-1, 0) 601 | blend_point_1/node = SubResource("AnimationNodeAnimation_ulw8l") 602 | blend_point_1/pos = Vector2(1, 0) 603 | blend_point_2/node = SubResource("AnimationNodeAnimation_n6s0j") 604 | blend_point_2/pos = Vector2(0, 1) 605 | blend_point_3/node = SubResource("AnimationNodeAnimation_1xkip") 606 | blend_point_3/pos = Vector2(0, -1) 607 | blend_point_4/node = SubResource("AnimationNodeAnimation_5bh7x") 608 | blend_point_4/pos = Vector2(-0.5, 0.5) 609 | blend_point_5/node = SubResource("AnimationNodeAnimation_60rgu") 610 | blend_point_5/pos = Vector2(0.5, 0.5) 611 | blend_point_6/node = SubResource("AnimationNodeAnimation_r6dg0") 612 | blend_point_6/pos = Vector2(0.5, -0.5) 613 | blend_point_7/node = SubResource("AnimationNodeAnimation_rtwb0") 614 | blend_point_7/pos = Vector2(-0.5, -0.5) 615 | snap = Vector2(0.5, 0.5) 616 | blend_mode = 1 617 | 618 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_st8xe"] 619 | animation = &"Jump Left" 620 | 621 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_twrrj"] 622 | animation = &"Jump Right" 623 | 624 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ou22l"] 625 | animation = &"Jump Down" 626 | 627 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_0dcop"] 628 | animation = &"Jump Up" 629 | 630 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rg16k"] 631 | animation = &"Jump Up" 632 | 633 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_5yp55"] 634 | animation = &"Jump Up" 635 | 636 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vhpra"] 637 | animation = &"Jump Down" 638 | 639 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_po4cv"] 640 | animation = &"Jump Down" 641 | 642 | [sub_resource type="AnimationNodeBlendSpace2D" id="AnimationNodeBlendSpace2D_xw210"] 643 | blend_point_0/node = SubResource("AnimationNodeAnimation_st8xe") 644 | blend_point_0/pos = Vector2(-1, 0) 645 | blend_point_1/node = SubResource("AnimationNodeAnimation_twrrj") 646 | blend_point_1/pos = Vector2(1, 0) 647 | blend_point_2/node = SubResource("AnimationNodeAnimation_ou22l") 648 | blend_point_2/pos = Vector2(0, -1) 649 | blend_point_3/node = SubResource("AnimationNodeAnimation_0dcop") 650 | blend_point_3/pos = Vector2(0, 1) 651 | blend_point_4/node = SubResource("AnimationNodeAnimation_rg16k") 652 | blend_point_4/pos = Vector2(-0.5, 0.5) 653 | blend_point_5/node = SubResource("AnimationNodeAnimation_5yp55") 654 | blend_point_5/pos = Vector2(0.5, 0.5) 655 | blend_point_6/node = SubResource("AnimationNodeAnimation_vhpra") 656 | blend_point_6/pos = Vector2(-0.5, -0.5) 657 | blend_point_7/node = SubResource("AnimationNodeAnimation_po4cv") 658 | blend_point_7/pos = Vector2(0.5, -0.5) 659 | snap = Vector2(0.5, 0.5) 660 | blend_mode = 1 661 | 662 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ysn6m"] 663 | animation = &"Run Left" 664 | 665 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_rwluv"] 666 | animation = &"Run Right" 667 | 668 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_e8r38"] 669 | animation = &"Run Down" 670 | 671 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dyihj"] 672 | animation = &"Run Up" 673 | 674 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_yljw3"] 675 | animation = &"Run Down" 676 | 677 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pw0c7"] 678 | animation = &"Run Down" 679 | 680 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2trvw"] 681 | animation = &"Run Up" 682 | 683 | [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vegby"] 684 | animation = &"Run Up" 685 | 686 | [sub_resource type="AnimationNodeBlendSpace2D" id="AnimationNodeBlendSpace2D_fxg1g"] 687 | blend_point_0/node = SubResource("AnimationNodeAnimation_ysn6m") 688 | blend_point_0/pos = Vector2(-1, 0) 689 | blend_point_1/node = SubResource("AnimationNodeAnimation_rwluv") 690 | blend_point_1/pos = Vector2(1, 0) 691 | blend_point_2/node = SubResource("AnimationNodeAnimation_e8r38") 692 | blend_point_2/pos = Vector2(0, 1) 693 | blend_point_3/node = SubResource("AnimationNodeAnimation_dyihj") 694 | blend_point_3/pos = Vector2(0, -1) 695 | blend_point_4/node = SubResource("AnimationNodeAnimation_yljw3") 696 | blend_point_4/pos = Vector2(-0.5, 0.5) 697 | blend_point_5/node = SubResource("AnimationNodeAnimation_pw0c7") 698 | blend_point_5/pos = Vector2(0.5, 0.5) 699 | blend_point_6/node = SubResource("AnimationNodeAnimation_2trvw") 700 | blend_point_6/pos = Vector2(0.5, -0.5) 701 | blend_point_7/node = SubResource("AnimationNodeAnimation_vegby") 702 | blend_point_7/pos = Vector2(-0.5, -0.5) 703 | snap = Vector2(0.5, 0.5) 704 | blend_mode = 1 705 | 706 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fxcic"] 707 | switch_mode = 1 708 | 709 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vaujd"] 710 | switch_mode = 1 711 | 712 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7t7hr"] 713 | switch_mode = 1 714 | 715 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_bfffl"] 716 | switch_mode = 1 717 | 718 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_cfud7"] 719 | switch_mode = 1 720 | 721 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_k30ru"] 722 | switch_mode = 1 723 | 724 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_86v13"] 725 | switch_mode = 1 726 | 727 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_dn4a2"] 728 | switch_mode = 1 729 | 730 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_1t77o"] 731 | switch_mode = 1 732 | 733 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3f3te"] 734 | switch_mode = 1 735 | 736 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_c8uvk"] 737 | switch_mode = 1 738 | 739 | [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8ga6c"] 740 | switch_mode = 1 741 | 742 | [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_5tcix"] 743 | states/Idle/node = SubResource("AnimationNodeBlendSpace2D_b3tmi") 744 | states/Idle/position = Vector2(337, 59) 745 | states/Jump/node = SubResource("AnimationNodeBlendSpace2D_xw210") 746 | states/Jump/position = Vector2(337, 185) 747 | "states/Jump Down/node" = SubResource("AnimationNodeBlendSpace2D_oajs1") 748 | "states/Jump Down/position" = Vector2(525, 185) 749 | states/Move/node = SubResource("AnimationNodeBlendSpace2D_fxg1g") 750 | states/Move/position = Vector2(525, 59) 751 | transitions = ["Idle", "Move", SubResource("AnimationNodeStateMachineTransition_fxcic"), "Move", "Idle", SubResource("AnimationNodeStateMachineTransition_vaujd"), "Idle", "Jump", SubResource("AnimationNodeStateMachineTransition_7t7hr"), "Jump", "Idle", SubResource("AnimationNodeStateMachineTransition_bfffl"), "Move", "Jump Down", SubResource("AnimationNodeStateMachineTransition_cfud7"), "Jump Down", "Move", SubResource("AnimationNodeStateMachineTransition_k30ru"), "Idle", "Jump Down", SubResource("AnimationNodeStateMachineTransition_86v13"), "Jump Down", "Idle", SubResource("AnimationNodeStateMachineTransition_dn4a2"), "Move", "Jump", SubResource("AnimationNodeStateMachineTransition_1t77o"), "Jump", "Move", SubResource("AnimationNodeStateMachineTransition_3f3te"), "Jump", "Jump Down", SubResource("AnimationNodeStateMachineTransition_c8uvk"), "Jump Down", "Jump", SubResource("AnimationNodeStateMachineTransition_8ga6c")] 752 | 753 | [sub_resource type="BoxShape3D" id="BoxShape3D_jn2dx"] 754 | size = Vector3(1, 0, 1) 755 | 756 | [node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("mesh", "shape", "whisker_shape")] 757 | z_index = 1 758 | y_sort_enabled = true 759 | script = ExtResource("1_rxg4x") 760 | tile_size = 16 761 | mesh = NodePath("KinematicBody3D/Mesh") 762 | shape = NodePath("KinematicBody3D/Shape") 763 | current_mesh = SubResource("BoxMesh_43feq") 764 | current_shape = SubResource("BoxShape3D_ptnvh") 765 | child_count = 4 766 | mesh_properties = { 767 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 768 | "CastShadow": 1, 769 | "CustomAABB": AABB(0, 0, 0, 0, 0, 0), 770 | "ExtraCullMargin": 0.0, 771 | "GILightmapScale": 0, 772 | "GIMode": 1, 773 | "IgnoreOcclusionCulling": false, 774 | "LODBais": 1.0, 775 | "Layers": 1, 776 | "MaterialOverlay": null, 777 | "MaterialOverride": null, 778 | "Mesh": SubResource("BoxMesh_43feq"), 779 | "Name": &"Mesh", 780 | "Position": Vector3(0, 0, 0), 781 | "Quaternion": Quaternion(0, 0, 0, 1), 782 | "Rotation": Vector3(0, 0, 0), 783 | "RotationEditMode": 0, 784 | "RotationOrder": 2, 785 | "Scale": Vector3(1, 1, 1), 786 | "Skeleton": NodePath(".."), 787 | "Skin": null, 788 | "SortingOffset": 0.0, 789 | "SortingUseAABBCenter": true, 790 | "TopLevel": false, 791 | "Transparency": 0.0, 792 | "VisibilityRangeBegin": 0.0, 793 | "VisibilityRangeBeginMargin": 0.0, 794 | "VisibilityRangeEnd": 0.0, 795 | "VisibilityRangeEndMargin": 0.0, 796 | "VisibilityRangeFadeMode": 0 797 | } 798 | shape_properties = { 799 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 800 | "Disabled": false, 801 | "Name": &"Shape", 802 | "Position": Vector3(0, 0, 0), 803 | "Quaternion": Quaternion(0, 0, 0, 1), 804 | "Rotation": Vector3(0, 0, 0), 805 | "RotationEditMode": 0, 806 | "RotationOrder": 2, 807 | "Scale": Vector3(1, 1, 1), 808 | "Shape": SubResource("BoxShape3D_ptnvh"), 809 | "TopLevel": false 810 | } 811 | whisker_shape = NodePath("KinematicBody3D/Whisker/Shape") 812 | whisker_shape_properties = { 813 | "Class": "CollisionShape3D", 814 | "Name": &"Shape", 815 | "Properties": { 816 | "_import_path": NodePath(""), 817 | "auto_translate_mode": 0, 818 | "debug_fill": true, 819 | "disabled": false, 820 | "editor_description": "", 821 | "physics_interpolation_mode": 0, 822 | "process_mode": 0, 823 | "process_physics_priority": 0, 824 | "process_priority": 0, 825 | "process_thread_group": 0, 826 | "rotation_edit_mode": 0, 827 | "rotation_order": 2, 828 | "script": null, 829 | "shape": SubResource("BoxShape3D_43feq"), 830 | "top_level": false, 831 | "transform": Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), 832 | "unique_name_in_owner": false, 833 | "visibility_parent": NodePath(""), 834 | "visible": true 835 | } 836 | } 837 | 838 | [node name="Sprite2D" type="Sprite2D" parent="."] 839 | texture = ExtResource("2_rxg4x") 840 | offset = Vector2(0, -7) 841 | flip_h = true 842 | hframes = 10 843 | vframes = 16 844 | 845 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] 846 | libraries = { 847 | &"": SubResource("AnimationLibrary_8oupr") 848 | } 849 | 850 | [node name="AnimationTree" type="AnimationTree" parent="."] 851 | deterministic = false 852 | callback_mode_discrete = 1 853 | tree_root = SubResource("AnimationNodeStateMachine_5tcix") 854 | anim_player = NodePath("../AnimationPlayer") 855 | parameters/Idle/blend_position = Vector2(-0.00327867, -0.0176991) 856 | parameters/Jump/blend_position = Vector2(0, 0) 857 | "parameters/Jump Down/blend_position" = Vector2(0, 0) 858 | parameters/Move/blend_position = Vector2(0, 0) 859 | 860 | [node name="Camera2D" type="Camera2D" parent="."] 861 | zoom = Vector2(4, 4) 862 | 863 | [node name="DaiconShadow" type="Sprite2D" parent="." node_paths=PackedStringArray("daicon_parent", "shape")] 864 | show_behind_parent = true 865 | z_as_relative = false 866 | position = Vector2(0, 9) 867 | texture = ExtResource("3_43feq") 868 | script = ExtResource("3_7dqni") 869 | daicon_parent = NodePath("..") 870 | tile_size = 16 871 | min_distance = 0.5 872 | shape = NodePath("KinematicBody3D/ShadowShape") 873 | current_shape = SubResource("BoxShape3D_jn2dx") 874 | shape_properties = { 875 | "Basis": Basis(1, 0, 0, 0, 1, 0, 0, 0, 1), 876 | "Disabled": false, 877 | "Name": &"ShadowShape", 878 | "Position": Vector3(0, 0, 0), 879 | "Quaternion": Quaternion(0, 0, 0, 1), 880 | "Rotation": Vector3(0, 0, 0), 881 | "RotationEditMode": 0, 882 | "RotationOrder": 2, 883 | "Scale": Vector3(1, 1, 1), 884 | "Shape": SubResource("BoxShape3D_jn2dx"), 885 | "TopLevel": false 886 | } 887 | -------------------------------------------------------------------------------- /addons/daicon/nodes/static_daicon_node.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | @icon("res://addons/daicon/icons/static_daicon.svg") 3 | class_name StaticDaicon extends StaticBody2D 4 | 5 | var d3 : StaticBody3D 6 | 7 | var whisker : Area3D 8 | var shader_cast : RayCast3D 9 | 10 | #region StaticDaicon Exports 11 | 12 | ## Tile Size determines how many pixels equal 1 meter in 3D.[br] (basically it is the tile size per cell size in 3D) 13 | @export var tile_size : int: 14 | set(size): 15 | if size > 0: 16 | tile_size = size 17 | get(): 18 | return tile_size 19 | ## Third-axis position. 20 | @export var y_3d : int: 21 | set(value): 22 | if d3: 23 | d3.position.y = value + offset_3d.y 24 | self.position.y = ((d3.position.z - offset_3d.z) - (d3.position.y - offset_3d.y)) * tile_size 25 | y_3d = value 26 | get(): 27 | return y_3d 28 | ## Z-step in sortable system between height levels. 29 | @export var z_step : int = 10: 30 | set(step): 31 | z_step = step 32 | get(): 33 | return z_step 34 | ## Object max 3D height in blocks (meters). Used in sortable system as coef. 35 | @export var z_sort_coef : int = 1: 36 | set(coef): 37 | z_sort_coef = coef 38 | get(): 39 | return z_sort_coef 40 | ## Mesh 3D 41 | @export var mesh : MeshInstance3D: 42 | set(node): 43 | if not d3: return 44 | if node: 45 | if mesh: 46 | mesh_properties = {} 47 | node.reparent(d3) 48 | d3.move_child(node, 0) 49 | node.position = Vector3(0, 0, 0) + mesh_and_shape_position 50 | node.rotation = Vector3(0, 0, 0) + mesh_and_shape_rotation 51 | node.scale = Vector3(0, 0, 0) + mesh_and_shape_scale 52 | mesh_properties = { 53 | "Name" : node.name, 54 | "Mesh" : node.mesh, 55 | 56 | "Skin" : node.skin, 57 | "Skeleton" : node.skeleton, 58 | 59 | "MaterialOverride" : node.material_override, 60 | "MaterialOverlay" : node.material_overlay, 61 | 62 | "Transparency" : node.transparency, 63 | "CastShadow" : node.cast_shadow, 64 | "ExtraCullMargin" : node.extra_cull_margin, 65 | "CustomAABB" : node.custom_aabb, 66 | "LODBais" : node.lod_bias, 67 | "IgnoreOcclusionCulling" : node.ignore_occlusion_culling, 68 | 69 | "GIMode" : node.gi_mode, 70 | "GILightmapScale" : node.gi_lightmap_scale, 71 | 72 | "VisibilityRangeBegin" : node.visibility_range_begin, 73 | "VisibilityRangeBeginMargin" : node.visibility_range_begin_margin, 74 | "VisibilityRangeEnd" : node.visibility_range_end, 75 | "VisibilityRangeEndMargin" : node.visibility_range_end_margin, 76 | "VisibilityRangeFadeMode" : node.visibility_range_fade_mode, 77 | 78 | "Layers" : node.layers, 79 | "SortingOffset" : node.sorting_offset, 80 | "SortingUseAABBCenter" : node.sorting_use_aabb_center, 81 | 82 | "Position" : node.position, 83 | "Rotation" : node.rotation, 84 | "Scale" : node.scale, 85 | "Quaternion" : node.quaternion, 86 | "Basis" : node.basis, 87 | 88 | "RotationEditMode" : node.rotation_edit_mode, 89 | "RotationOrder" : node.rotation_order, 90 | "TopLevel" : node.top_level} 91 | else: 92 | mesh_properties = {} 93 | get(): 94 | if not mesh_properties: return 95 | return d3.get_node(str(mesh_properties.Name)) 96 | ## Shape or Polygon 3D. 97 | @export var shape : Node3D: 98 | set(node): 99 | if not d3: return 100 | if node: 101 | if node is CollisionShape3D: 102 | if shape: 103 | shape_properties = {} 104 | node.reparent(d3) 105 | d3.move_child(node, -1) 106 | node.position = Vector3(0, 0, 0) + mesh_and_shape_position 107 | node.rotation = Vector3(0, 0, 0) + mesh_and_shape_rotation 108 | node.scale = Vector3(0, 0, 0) + mesh_and_shape_scale 109 | shape_properties = {"Name" : node.name, 110 | "Shape" : node.shape, 111 | "Disabled" : node.disabled, 112 | 113 | "Position" : node.position, 114 | "Rotation" : node.rotation, 115 | "Scale" : node.scale, 116 | "Quaternion" : node.quaternion, 117 | "Basis" : node.basis, 118 | 119 | "RotationEditMode" : node.rotation_edit_mode, 120 | "RotationOrder" : node.rotation_order, 121 | "TopLevel" : node.top_level} 122 | elif node is CollisionPolygon3D: 123 | if shape: 124 | shape_properties = {} 125 | node.reparent(d3) 126 | d3.move_child(node, -1) 127 | node.position = Vector3(0, 0, 0) + mesh_and_shape_position 128 | node.rotation = Vector3(0, 0, 0) + mesh_and_shape_rotation 129 | node.scale = Vector3(0, 0, 0) + mesh_and_shape_scale 130 | shape_properties = {"Name" : node.name, 131 | "Depth" : node.depth, 132 | "Disabled" : node.disabled, 133 | "Polygon" : node.polygon, 134 | "Margin" : node.margin, 135 | 136 | "Position" : node.position, 137 | "Rotation" : node.rotation, 138 | "Scale" : node.scale, 139 | "Quaternion" : node.quaternion, 140 | "Basis" : node.basis, 141 | 142 | "RotationEditMode" : node.rotation_edit_mode, 143 | "RotationOrder" : node.rotation_order, 144 | "TopLevel" : node.top_level} 145 | else: 146 | shape_properties = {} 147 | get(): 148 | if not shape_properties: return 149 | return d3.get_node(str(shape_properties.Name)) 150 | 151 | @export_group("Mesh & Shape") 152 | @export var current_mesh : Mesh: 153 | set(msh): 154 | if mesh: 155 | mesh.mesh = msh 156 | if mesh_properties: 157 | mesh_properties["Mesh"] = msh 158 | current_mesh = msh 159 | get(): 160 | if not mesh: return 161 | return mesh.mesh 162 | @export var current_shape : Shape3D: 163 | set(shape_3D): 164 | if shape: 165 | shape.shape = shape_3D 166 | if shape_properties: 167 | shape_properties["Shape"] = shape_3D 168 | current_shape = shape_3D 169 | get(): 170 | if not shape: return 171 | return shape.shape 172 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var mesh_and_shape_position: Vector3 = Vector3(0, 0, 0): 173 | set(v_3): 174 | if mesh: 175 | mesh.position = v_3 176 | if mesh_properties: 177 | mesh_properties["Position"] = v_3 178 | 179 | if shape: 180 | shape.position = v_3 181 | if shape_properties: 182 | shape_properties["Position"] = v_3 183 | mesh_and_shape_position = v_3 184 | get(): 185 | return mesh_and_shape_position 186 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var mesh_and_shape_rotation: Vector3 = Vector3(0, 0, 0): 187 | set(v_3): 188 | if mesh: 189 | mesh.rotation = v_3 190 | if mesh_properties: 191 | mesh_properties["Rotation"] = v_3 192 | 193 | if shape: 194 | shape.rotation = v_3 195 | if shape_properties: 196 | shape_properties["Rotation"] = v_3 197 | mesh_and_shape_rotation = v_3 198 | get(): 199 | return mesh_and_shape_rotation 200 | @export_custom(PROPERTY_HINT_LINK, "") var mesh_and_shape_scale: Vector3 = Vector3(1, 1, 1): 201 | set(v_3): 202 | if mesh: 203 | mesh.scale = v_3 204 | if mesh_properties: 205 | mesh_properties["Scale"] = v_3 206 | 207 | if shape: 208 | shape.scale = v_3 209 | if shape_properties: 210 | shape_properties["Scale"] = v_3 211 | mesh_and_shape_scale = v_3 212 | get(): 213 | return mesh_and_shape_scale 214 | 215 | @export_group("Slots") 216 | @export var node_1 : Node: 217 | set(node): 218 | if not d3: return 219 | if node: 220 | if node_1: 221 | node_1_properties = {} 222 | node.reparent(d3) 223 | d3.move_child(node, 0) 224 | node.position = Vector3(0, 0, 0) 225 | node_1_properties = get_node_properties(node) 226 | else: 227 | node_1_properties = {} 228 | get(): 229 | if not node_1_properties: return 230 | return d3.get_node(str(node_1_properties.Name)) 231 | @export var node_2 : Node: 232 | set(node): 233 | if not d3: return 234 | if node: 235 | if node_2: 236 | node_2_properties = {} 237 | node.reparent(d3) 238 | d3.move_child(node, 0) 239 | node.position = Vector3(0, 0, 0) 240 | node_2_properties = get_node_properties(node) 241 | else: 242 | node_2_properties = {} 243 | get(): 244 | if not node_2_properties: return 245 | return d3.get_node(str(node_2_properties.Name)) 246 | @export var node_3 : Node: 247 | set(node): 248 | if not d3: return 249 | if node: 250 | if node_3: 251 | node_3_properties = {} 252 | node.reparent(d3) 253 | d3.move_child(node, 0) 254 | node.position = Vector3(0, 0, 0) 255 | node_3_properties = get_node_properties(node) 256 | else: 257 | node_3_properties = {} 258 | get(): 259 | if not node_3_properties: return 260 | return d3.get_node(str(node_3_properties.Name)) 261 | @export var node_4 : Node: 262 | set(node): 263 | if not d3: return 264 | if node: 265 | if node_4: 266 | node_4_properties = {} 267 | node.reparent(d3) 268 | d3.move_child(node, 0) 269 | node.position = Vector3(0, 0, 0) 270 | node_4_properties = get_node_properties(node) 271 | else: 272 | node_4_properties = {} 273 | get(): 274 | if not node_4_properties: return 275 | return d3.get_node(str(node_4_properties.Name)) 276 | @export var node_5 : Node: 277 | set(node): 278 | if not d3: return 279 | if node: 280 | if node_5: 281 | node_5_properties = {} 282 | node.reparent(d3) 283 | d3.move_child(node, 0) 284 | node.position = Vector3(0, 0, 0) 285 | node_5_properties = get_node_properties(node) 286 | else: 287 | node_5_properties = {} 288 | get(): 289 | if not node_5_properties: return 290 | return d3.get_node(str(node_5_properties.Name)) 291 | 292 | @export_group("Core") 293 | @export var child_count : int: 294 | set(count): 295 | pass 296 | get(): 297 | if not d3: return 0 298 | return d3.get_child_count() 299 | @export var mesh_properties : Dictionary: 300 | set(dict): 301 | if not dict and mesh: 302 | mesh.reparent(self) 303 | get_child(-1).owner = get_tree().edited_scene_root 304 | mesh_properties = dict 305 | get(): 306 | return mesh_properties 307 | @export var shape_properties : Dictionary: 308 | set(dict): 309 | if not dict and shape: 310 | shape.reparent(self) 311 | get_child(-1).owner = get_tree().edited_scene_root 312 | shape_properties = dict 313 | get(): 314 | return shape_properties 315 | @export var node_1_properties : Dictionary: 316 | set(dict): 317 | if not dict and node_1: 318 | node_1.reparent(self) 319 | get_child(-1).owner = get_tree().edited_scene_root 320 | node_1_properties = dict 321 | get(): 322 | return node_1_properties 323 | @export var node_2_properties : Dictionary: 324 | set(dict): 325 | if not dict and node_2: 326 | node_2.reparent(self) 327 | get_child(-1).owner = get_tree().edited_scene_root 328 | node_2_properties = dict 329 | get(): 330 | return node_2_properties 331 | @export var node_3_properties : Dictionary: 332 | set(dict): 333 | if not dict and node_3: 334 | node_3.reparent(self) 335 | get_child(-1).owner = get_tree().edited_scene_root 336 | node_3_properties = dict 337 | get(): 338 | return node_3_properties 339 | @export var node_4_properties : Dictionary: 340 | set(dict): 341 | if not dict and node_4: 342 | node_4.reparent(self) 343 | get_child(-1).owner = get_tree().edited_scene_root 344 | node_4_properties = dict 345 | get(): 346 | return node_4_properties 347 | @export var node_5_properties : Dictionary: 348 | set(dict): 349 | if not dict and node_5: 350 | node_5.reparent(self) 351 | get_child(-1).owner = get_tree().edited_scene_root 352 | node_5_properties = dict 353 | get(): 354 | return node_5_properties 355 | @export var visible_3d: bool = true: 356 | set(value): 357 | if d3: d3.visible = value 358 | visible_3d = value 359 | get(): 360 | return visible_3d 361 | 362 | #endregion 363 | 364 | #region Core Exports 365 | 366 | @export_category("StaticBody3D") 367 | @export var physics_material_override_3d : PhysicsMaterial: 368 | set(material): 369 | pass 370 | get(): 371 | return physics_material_override_3d 372 | @export_custom(PROPERTY_HINT_NONE, "suffix:m/s") var constant_linear_velocity_3d: Vector3 = Vector3(0, 0, 0): 373 | set(v_3): 374 | if d3: d3.constant_linear_velocity = v_3 375 | constant_linear_velocity_3d = v_3 376 | get(): 377 | return constant_linear_velocity_3d 378 | @export_custom(PROPERTY_HINT_NONE, "suffix:°/s") var constant_angular_velocity_3d: Vector3 = Vector3(0, 0, 0): 379 | set(v_3): 380 | if d3: d3.constant_angular_velocity = v_3 381 | constant_angular_velocity_3d = v_3 382 | get(): 383 | return constant_angular_velocity_3d 384 | 385 | @export_group("Transorm") 386 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var offset_3d: Vector3 = Vector3(0, 0.5, 0): 387 | set(v_3): 388 | if d3: d3.position += v_3 - offset_3d 389 | offset_3d = v_3 390 | get(): 391 | return offset_3d 392 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var rotation_3d: Vector3 = Vector3(0, 0, 0): 393 | set(v_3): 394 | if d3: d3.rotation = v_3 395 | rotation_3d = v_3 396 | get(): 397 | return rotation_3d 398 | @export_custom(PROPERTY_HINT_LINK, "") var scale_3d: Vector3 = Vector3(1, 1, 1): 399 | set(v_3): 400 | if d3: d3.scale = v_3 401 | scale_3d = v_3 402 | get(): 403 | return scale_3d 404 | 405 | @export var quaternion_3d: Quaternion = Quaternion(0, 0, 0, 1.0): 406 | set(quat): 407 | if d3: d3.quaternion = quat 408 | quaternion_3d = quat 409 | get(): 410 | return quaternion_3d 411 | @export var basis_3d: Basis: 412 | set(bas): 413 | if d3: d3.basis = bas 414 | basis_3d = bas 415 | get(): 416 | return basis_3d 417 | @export_enum("Euler", "Quaternion", "Basis") var rotation_edit_mode_3d : int = 0: 418 | set(mode): 419 | if d3: 420 | d3.rotation_edit_mode = mode 421 | if mode == 0: 422 | d3.rotation = rotation_3d 423 | elif mode == 1: 424 | d3.quaternion = quaternion_3d 425 | elif mode == 2: 426 | d3.basis = basis_3d 427 | rotation_edit_mode_3d = mode 428 | property_list_changed.emit() 429 | get(): 430 | return rotation_edit_mode_3d 431 | @export var rotation_order_3d : EulerOrder = 2: 432 | set(order): 433 | if d3: d3.rotation_order = order 434 | rotation_order_3d = order 435 | get(): 436 | return rotation_order_3d 437 | @export var top_level_3d : bool = false: 438 | set(value): 439 | if d3: d3.top_level = value 440 | top_level_3d = value 441 | get(): 442 | return top_level_3d 443 | const euler_properties : Array[StringName] = [&"quaternion_3d", &"basis_3d"] 444 | const quaternion_properties : Array[StringName] = [&"rotation_3d", &"basis_3d", &"rotation_order_3d"] 445 | const basis_properties : Array[StringName] = [&"rotation_3d", &"scale_3d", &"quaternion_3d", &"rotation_order_3d"] 446 | 447 | 448 | @export_category("CollisionObject3D") 449 | @export_enum("Remove", "Make Static", "Keep Active") var disable_mode_3d = 0: 450 | set(mode): 451 | if d3: d3.disable_mode = mode 452 | disable_mode_3d = mode 453 | get(): 454 | return disable_mode_3d 455 | 456 | @export_group("Collision") 457 | @export_flags_3d_physics var layer = 1: 458 | set(collision_layer): 459 | if d3: d3.collision_layer = collision_layer 460 | layer = collision_layer 461 | get(): 462 | return layer 463 | @export_flags_3d_navigation var mask = 1: 464 | set(collision_mask): 465 | if d3: d3.collision_mask = collision_mask 466 | mask = collision_mask 467 | get(): 468 | return mask 469 | @export var priority: float = 1: 470 | set(value): 471 | if d3: d3.collision_priority = value 472 | priority = value 473 | get(): 474 | return priority 475 | 476 | @export_group("Input") 477 | @export var ray_pickable: bool = true: 478 | set(value): 479 | if d3: d3.input_ray_pickable = value 480 | ray_pickable = value 481 | get(): 482 | return ray_pickable 483 | @export var capture_on_drag: bool: 484 | set(value): 485 | if d3: d3.input_capture_on_drag = value 486 | capture_on_drag = value 487 | get(): 488 | return capture_on_drag 489 | 490 | @export_group("Axis Lock") 491 | @export var linear_x: bool = false: 492 | set(value): 493 | if d3: d3.axis_lock_linear_x = value 494 | linear_x = value 495 | get(): 496 | return linear_x 497 | @export var linear_y: bool = false: 498 | set(value): 499 | if d3: d3.axis_lock_linear_y = value 500 | linear_y = value 501 | get(): 502 | return linear_y 503 | @export var linear_z: bool = false: 504 | set(value): 505 | if d3: d3.axis_lock_linear_z = value 506 | linear_z = value 507 | get(): 508 | return linear_z 509 | @export var angular_x: bool = false: 510 | set(value): 511 | if d3: d3.axis_lock_angular_x = value 512 | angular_x = value 513 | get(): 514 | return angular_x 515 | @export var angular_y: bool = false: 516 | set(value): 517 | if d3: d3.axis_lock_angular_y = value 518 | angular_y = value 519 | get(): 520 | return angular_y 521 | @export var angular_z: bool = false: 522 | set(value): 523 | if d3: d3.axis_lock_angular_z = value 524 | angular_z = value 525 | get(): 526 | return angular_z 527 | 528 | #endregion 529 | 530 | #region RayCast Exports 531 | 532 | @export_category("RayCast") 533 | #Shader 534 | @export_group("Shader Cast") 535 | @export var shader_cast_enabled: bool = true: 536 | set(value): 537 | if shader_cast: shader_cast.enabled = value 538 | shader_cast_enabled = value 539 | get(): 540 | return shader_cast_enabled 541 | @export var shader_cast_exclude_parent: bool = true: 542 | set(value): 543 | if shader_cast: shader_cast.exclude_parent = value 544 | shader_cast_exclude_parent = value 545 | get(): 546 | return shader_cast_exclude_parent 547 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var shader_cast_target_position: Vector3 = Vector3(0, 20, 16): 548 | set(v_3): 549 | if shader_cast: shader_cast.target_position = v_3 550 | shader_cast_target_position = v_3 551 | get(): 552 | return shader_cast_target_position 553 | @export_flags_3d_navigation var shader_cast_collision_mask = 1: 554 | set(collision_mask): 555 | if shader_cast: shader_cast.collision_mask = collision_mask 556 | shader_cast_collision_mask = collision_mask 557 | get(): 558 | return shader_cast_collision_mask 559 | @export var shader_cast_hit_from_inside: bool = false: 560 | set(value): 561 | if shader_cast: shader_cast.hit_from_inside = value 562 | shader_cast_hit_from_inside = value 563 | get(): 564 | return shader_cast_hit_from_inside 565 | @export var shader_cast_hit_back_faces: bool = true: 566 | set(value): 567 | if shader_cast: shader_cast.hit_back_faces = value 568 | shader_cast_hit_back_faces = value 569 | get(): 570 | return shader_cast_hit_back_faces 571 | 572 | @export_subgroup("Collide With") 573 | @export var shader_cast_areas: bool = false: 574 | set(value): 575 | if shader_cast: shader_cast.collide_with_areas = value 576 | shader_cast_areas = value 577 | get(): 578 | return shader_cast_areas 579 | @export var shader_cast_bodies: bool = true: 580 | set(value): 581 | if shader_cast: shader_cast.collide_with_bodies = value 582 | shader_cast_bodies = value 583 | get(): 584 | return shader_cast_bodies 585 | @export_subgroup("Transform") 586 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var shader_cast_position: Vector3 = Vector3(0, 0, 0): 587 | set(v_3): 588 | if shader_cast: shader_cast.position = v_3 589 | shader_cast_position = v_3 590 | get(): 591 | return shader_cast_position 592 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var shader_cast_rotation: Vector3 = Vector3(0, 0, 0): 593 | set(v_3): 594 | if shader_cast: shader_cast.rotation = v_3 595 | shader_cast_rotation = v_3 596 | get(): 597 | return shader_cast_rotation 598 | @export_custom(PROPERTY_HINT_LINK, "") var shader_cast_scale: Vector3 = Vector3(1, 1, 1): 599 | set(v_3): 600 | if shader_cast: shader_cast.scale = v_3 601 | shader_cast_scale = v_3 602 | get(): 603 | return shader_cast_scale 604 | 605 | #Whisker 606 | @export_group("Whisker") 607 | @export var whisker_shape : Node3D: 608 | set(node): 609 | if not d3: return 610 | if node: 611 | if node is CollisionShape3D or node is CollisionPolygon3D: 612 | if whisker_shape: 613 | whisker_shape_properties = {} 614 | node.reparent(whisker) 615 | whisker.move_child(node, 0) 616 | node.position = Vector3(0, 0, 0) 617 | whisker_shape_properties = get_node_properties(node) 618 | else: 619 | whisker_shape_properties = {} 620 | get(): 621 | if not whisker_shape_properties: return 622 | return whisker.get_node(str(whisker_shape_properties.Name)) 623 | @export_storage var whisker_shape_properties : Dictionary: 624 | set(dict): 625 | if not dict and whisker: 626 | whisker_shape.reparent(self) 627 | get_child(-1).owner = get_tree().edited_scene_root 628 | whisker_shape_properties = dict 629 | get(): 630 | return whisker_shape_properties 631 | 632 | @export var whisker_monitoring: bool = true: 633 | set(value): 634 | if whisker: whisker.monitoring = value 635 | whisker_monitoring = value 636 | get(): 637 | return whisker_monitoring 638 | @export var whisker_monitorable: bool = true: 639 | set(value): 640 | if whisker: whisker.monitorable = value 641 | whisker_monitorable = value 642 | get(): 643 | return whisker_monitorable 644 | 645 | @export_enum("Remove", "Make Static", "Keep Active") var whisker_disable_mode = 0: 646 | set(mode): 647 | if whisker: whisker.disable_mode = mode 648 | whisker_disable_mode = mode 649 | get(): 650 | return whisker_disable_mode 651 | 652 | @export_subgroup("Collision") 653 | @export_flags_3d_physics var whisker_layer = 1: 654 | set(collision_layer): 655 | if whisker: whisker.collision_layer = collision_layer 656 | whisker_layer = collision_layer 657 | get(): 658 | return whisker_layer 659 | @export_flags_3d_navigation var whisker_mask = 1: 660 | set(collision_mask): 661 | if whisker: whisker.collision_mask = collision_mask 662 | whisker_mask = collision_mask 663 | get(): 664 | return whisker_mask 665 | @export var whisker_priority: float = 1: 666 | set(value): 667 | if whisker: whisker.collision_priority = value 668 | whisker_priority = value 669 | get(): 670 | return whisker_priority 671 | 672 | @export_subgroup("Input") 673 | @export var whisker_ray_pickable: bool = true: 674 | set(value): 675 | if whisker: whisker.input_ray_pickable = value 676 | whisker_ray_pickable = value 677 | get(): 678 | return whisker_ray_pickable 679 | @export var whisker_capture_on_drag: bool: 680 | set(value): 681 | if whisker: whisker.input_capture_on_drag = value 682 | whisker_capture_on_drag = value 683 | get(): 684 | return whisker_capture_on_drag 685 | 686 | @export_subgroup("Transform") 687 | @export_custom(PROPERTY_HINT_NONE, "suffix:m") var whisker_position: Vector3 = Vector3(0, 0, 1.1): 688 | set(v_3): 689 | if whisker: whisker.position = v_3 690 | whisker_position = v_3 691 | get(): 692 | return whisker_position 693 | @export_custom(PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians") var whisker_rotation: Vector3 = Vector3(0, 0, 0): 694 | set(v_3): 695 | if whisker: whisker.rotation = v_3 696 | whisker_rotation = v_3 697 | get(): 698 | return whisker_rotation 699 | @export_custom(PROPERTY_HINT_LINK, "") var whisker_scale: Vector3 = Vector3(1, 1, 1): 700 | set(v_3): 701 | if whisker: whisker.scale = v_3 702 | whisker_scale = v_3 703 | get(): 704 | return whisker_scale 705 | 706 | #endregion 707 | 708 | func _ready() -> void: 709 | if tile_size == 0: 710 | self.set_y_sort_enabled(true) 711 | self.z_index = 1 712 | tile_size = 16 713 | _expand() 714 | d3.set_meta("z_index", self.z_index) 715 | func _process(delta: float) -> void: 716 | if Engine.is_editor_hint(): 717 | if not d3: 718 | _expand() 719 | if self.position.x != (d3.position.x - offset_3d.x) * tile_size: 720 | d3.position.x = (self.position.x / tile_size) + offset_3d.x 721 | if self.position.y != ((d3.position.z - offset_3d.z) - (d3.position.y - offset_3d.y)) * tile_size: 722 | d3.position.z = ((self.position.y / tile_size) + (d3.position.y - offset_3d.y)) + offset_3d.z 723 | elif not Engine.is_editor_hint(): 724 | _update_z_index() 725 | 726 | func update_pos(): 727 | self.position.x = (d3.position.x - offset_3d.x) * tile_size 728 | self.position.y = ((d3.position.z - offset_3d.z) - (d3.position.y - offset_3d.y)) * tile_size 729 | func _update_z_index(): 730 | if whisker.get_overlapping_bodies(): 731 | if whisker.get_overlapping_bodies()[0].has_meta("z_index"): 732 | self.z_index = whisker.get_overlapping_bodies()[0].get_meta("z_index") - 1 733 | else: 734 | self.z_index = (int(d3.position.y + (offset_3d.y * 1.1))) * z_step - 1 735 | else: 736 | self.z_index = ((d3.position.y - offset_3d.y) + z_sort_coef) * z_step + 2 737 | 738 | d3.set_meta("z_index", self.z_index) 739 | 740 | func get_node_properties(node: Node) -> Dictionary: 741 | var properties : Dictionary = { 742 | "Name" : node.name, 743 | "Class" : node.get_class(), 744 | "Properties" : {} 745 | } 746 | for prop in node.get_property_list(): 747 | if prop.usage & PROPERTY_USAGE_STORAGE: 748 | properties.Properties[prop.name] = node.get(prop.name) 749 | return properties 750 | func _validate_property(property: Dictionary) -> void: 751 | if not d3: return 752 | 753 | #rotation mode 754 | if property.name in quaternion_properties: 755 | if rotation_edit_mode_3d == 1: 756 | property.usage &= ~PROPERTY_USAGE_EDITOR 757 | if property.name in euler_properties: 758 | if rotation_edit_mode_3d == 0: 759 | property.usage &= ~PROPERTY_USAGE_EDITOR 760 | if property.name in basis_properties: 761 | if rotation_edit_mode_3d == 2: 762 | property.usage &= ~PROPERTY_USAGE_EDITOR 763 | 764 | #region Expand 765 | 766 | func _expand() -> void: 767 | _expand_d3() 768 | _expand_ray_cast() 769 | if mesh_properties: 770 | _expand_mesh() 771 | if shape_properties: 772 | _expand_shape() 773 | _expand_slots() 774 | 775 | func _expand_d3() -> void: 776 | d3 = StaticBody3D.new() 777 | d3.set_name("StaticBody3D") 778 | add_child(d3) 779 | move_child(d3, 0) 780 | d3 = get_child(0) 781 | 782 | d3.physics_material_override = physics_material_override_3d 783 | d3.constant_linear_velocity = constant_linear_velocity_3d 784 | d3.constant_angular_velocity = constant_angular_velocity_3d 785 | d3.rotation = rotation_3d 786 | d3.scale = scale_3d 787 | 788 | d3.disable_mode = disable_mode_3d 789 | d3.collision_layer = layer 790 | d3.collision_mask = mask 791 | d3.collision_priority = priority 792 | d3.input_ray_pickable = ray_pickable 793 | d3.input_capture_on_drag = capture_on_drag 794 | 795 | d3.axis_lock_linear_x = linear_x 796 | d3.axis_lock_linear_y = linear_y 797 | d3.axis_lock_linear_z = linear_z 798 | d3.axis_lock_angular_x = angular_x 799 | d3.axis_lock_angular_y = angular_y 800 | d3.axis_lock_angular_z = angular_z 801 | 802 | d3.position.y = y_3d + offset_3d.y 803 | d3.position.x = (self.position.x / tile_size) + offset_3d.x 804 | d3.position.z = ((self.position.y / tile_size) + (d3.position.y - offset_3d.y)) + offset_3d.z 805 | 806 | d3.scale = scale_3d 807 | 808 | if rotation_edit_mode_3d == 0: 809 | d3.rotation = rotation_3d 810 | elif rotation_edit_mode_3d == 1: 811 | d3.quaternion = quaternion_3d 812 | elif rotation_edit_mode_3d == 2: 813 | d3.basis = basis_3d 814 | d3.rotation_edit_mode = rotation_edit_mode_3d 815 | d3.top_level = top_level_3d 816 | d3.visible = visible_3d 817 | func _expand_ray_cast() -> void: 818 | #Shader Cast 819 | shader_cast = RayCast3D.new() 820 | shader_cast.set_name("ShaderCast") 821 | d3.add_child(shader_cast) 822 | shader_cast = d3.get_node("ShaderCast") 823 | 824 | shader_cast.enabled = shader_cast_enabled 825 | shader_cast.exclude_parent = shader_cast_exclude_parent 826 | shader_cast.target_position = shader_cast_target_position 827 | shader_cast.collision_mask = shader_cast_collision_mask 828 | shader_cast.hit_from_inside = shader_cast_hit_from_inside 829 | shader_cast.hit_back_faces = shader_cast_hit_back_faces 830 | 831 | shader_cast.collide_with_areas = shader_cast_areas 832 | shader_cast.collide_with_bodies = shader_cast_bodies 833 | 834 | shader_cast.position = shader_cast_position 835 | shader_cast.rotation = shader_cast_rotation 836 | shader_cast.scale = shader_cast_scale 837 | 838 | #Whisker 839 | whisker = Area3D.new() 840 | whisker.set_name("Whisker") 841 | d3.add_child(whisker) 842 | whisker = d3.get_node("Whisker") 843 | 844 | whisker.monitoring = whisker_monitoring 845 | whisker.monitorable = whisker_monitorable 846 | 847 | whisker.disable_mode = whisker_disable_mode 848 | whisker.collision_layer = whisker_layer 849 | whisker.collision_mask = whisker_mask 850 | whisker.collision_priority = whisker_priority 851 | 852 | whisker.input_ray_pickable = whisker_ray_pickable 853 | whisker.input_capture_on_drag = whisker_capture_on_drag 854 | 855 | whisker.position = whisker_position 856 | whisker.rotation = whisker_rotation 857 | whisker.scale = whisker_scale 858 | 859 | if whisker_shape_properties and ClassDB.class_exists(whisker_shape_properties.Class): 860 | var node = ClassDB.instantiate(whisker_shape_properties.Class) 861 | node.set_name(whisker_shape_properties.Name) 862 | whisker.add_child(node) 863 | 864 | for prop in whisker_shape_properties.Properties: 865 | node.set(prop, whisker_shape_properties.Properties[prop]) 866 | func _expand_mesh() -> void: 867 | var _mesh = MeshInstance3D.new() 868 | _mesh.set_name(mesh_properties.Name) 869 | d3.add_child(_mesh) 870 | 871 | _mesh.mesh = mesh_properties["Mesh"] 872 | 873 | _mesh.skin = mesh_properties["Skin"] 874 | _mesh.skeleton = mesh_properties["Skeleton"] 875 | 876 | _mesh.material_override = mesh_properties["MaterialOverride"] 877 | _mesh.material_overlay = mesh_properties["MaterialOverlay"] 878 | 879 | _mesh.transparency = mesh_properties["Transparency"] 880 | _mesh.cast_shadow = mesh_properties["CastShadow"] 881 | _mesh.extra_cull_margin = mesh_properties["ExtraCullMargin"] 882 | _mesh.custom_aabb = mesh_properties["CustomAABB"] 883 | _mesh.lod_bias = mesh_properties["LODBais"] 884 | _mesh.ignore_occlusion_culling = mesh_properties["IgnoreOcclusionCulling"] 885 | 886 | _mesh.gi_mode = mesh_properties["GIMode"] 887 | _mesh.gi_lightmap_scale = mesh_properties["GILightmapScale"] 888 | 889 | _mesh.visibility_range_begin = mesh_properties["VisibilityRangeBegin"] 890 | _mesh.visibility_range_begin_margin = mesh_properties["VisibilityRangeBeginMargin"] 891 | _mesh.visibility_range_end = mesh_properties["VisibilityRangeEnd"] 892 | _mesh.visibility_range_end_margin = mesh_properties["VisibilityRangeEndMargin"] 893 | _mesh.visibility_range_fade_mode = mesh_properties["VisibilityRangeFadeMode"] 894 | 895 | _mesh.layers = mesh_properties["Layers"] 896 | _mesh.sorting_offset = mesh_properties["SortingOffset"] 897 | _mesh.sorting_use_aabb_center = mesh_properties["SortingUseAABBCenter"] 898 | 899 | _mesh.position = mesh_properties["Position"] 900 | _mesh.scale = mesh_properties["Scale"] 901 | _mesh.rotation_edit_mode = mesh_properties["RotationEditMode"] 902 | 903 | if mesh_properties["RotationEditMode"] == 0: 904 | _mesh.rotation = mesh_properties["Rotation"] 905 | elif mesh_properties["RotationEditMode"] == 1: 906 | _mesh.quaternion = mesh_properties["Quaternion"] 907 | elif mesh_properties["RotationEditMode"] ==2: 908 | _mesh.basis = mesh_properties["Basis"] 909 | 910 | _mesh.rotation_order = mesh_properties["RotationOrder"] 911 | _mesh.top_level = mesh_properties["TopLevel"] 912 | func _expand_shape() -> void: 913 | if len(shape_properties) == 11: 914 | var _shape = CollisionShape3D.new() 915 | _shape.set_name(shape_properties.Name) 916 | d3.add_child(_shape) 917 | 918 | _shape.shape = shape_properties["Shape"] 919 | _shape.disabled = shape_properties["Disabled"] 920 | 921 | _shape.position = shape_properties["Position"] 922 | _shape.scale = shape_properties["Scale"] 923 | _shape.rotation_edit_mode = shape_properties["RotationEditMode"] 924 | 925 | if shape_properties["RotationEditMode"] == 0: 926 | _shape.rotation = shape_properties["Rotation"] 927 | elif shape_properties["RotationEditMode"] == 1: 928 | _shape.quaternion = shape_properties["Quaternion"] 929 | elif shape_properties["RotationEditMode"] ==2: 930 | _shape.basis = shape_properties["Basis"] 931 | 932 | _shape.rotation_order = shape_properties["RotationOrder"] 933 | _shape.top_level = shape_properties["TopLevel"] 934 | else: 935 | var _shape = CollisionPolygon3D.new() 936 | _shape.set_name(shape_properties.Name) 937 | d3.add_child(_shape) 938 | 939 | _shape.depth = shape_properties["Depth"] 940 | _shape.disabled = shape_properties["Disabled"] 941 | _shape.polygon = shape_properties["Polygon"] 942 | _shape.margin = shape_properties["Margin"] 943 | 944 | _shape.position = shape_properties["Position"] 945 | _shape.scale = shape_properties["Scale"] 946 | _shape.rotation_edit_mode = shape_properties["RotationEditMode"] 947 | 948 | if shape_properties["RotationEditMode"] == 0: 949 | _shape.rotation = shape_properties["Rotation"] 950 | elif shape_properties["RotationEditMode"] == 1: 951 | _shape.quaternion = shape_properties["Quaternion"] 952 | elif shape_properties["RotationEditMode"] ==2: 953 | _shape.basis = shape_properties["Basis"] 954 | 955 | _shape.rotation_order = shape_properties["RotationOrder"] 956 | _shape.top_level = shape_properties["TopLevel"] 957 | func _expand_slots() -> void: 958 | if node_1_properties and ClassDB.class_exists(node_1_properties.Class): 959 | var node = ClassDB.instantiate(node_1_properties.Class) 960 | node.set_name(node_1_properties.Name) 961 | d3.add_child(node) 962 | 963 | for prop in node_1_properties.Properties: 964 | node.set(prop, node_1_properties.Properties[prop]) 965 | if node_2_properties and ClassDB.class_exists(node_2_properties.Class): 966 | var node = ClassDB.instantiate(node_2_properties.Class) 967 | node.set_name(node_2_properties.Name) 968 | d3.add_child(node) 969 | 970 | for prop in node_2_properties.Properties: 971 | node.set(prop, node_2_properties.Properties[prop]) 972 | if node_3_properties and ClassDB.class_exists(node_3_properties.Class): 973 | var node = ClassDB.instantiate(node_3_properties.Class) 974 | node.set_name(node_3_properties.Name) 975 | d3.add_child(node) 976 | 977 | for prop in node_3_properties.Properties: 978 | node.set(prop, node_3_properties.Properties[prop]) 979 | if node_4_properties and ClassDB.class_exists(node_4_properties.Class): 980 | var node = ClassDB.instantiate(node_4_properties.Class) 981 | node.set_name(node_4_properties.Name) 982 | d3.add_child(node) 983 | 984 | for prop in node_4_properties.Properties: 985 | node.set(prop, node_4_properties.Properties[prop]) 986 | if node_5_properties and ClassDB.class_exists(node_5_properties.Class): 987 | var node = ClassDB.instantiate(node_5_properties.Class) 988 | node.set_name(node_5_properties.Name) 989 | d3.add_child(node) 990 | 991 | for prop in node_5_properties.Properties: 992 | node.set(prop, node_5_properties.Properties[prop]) 993 | 994 | #endregion 995 | --------------------------------------------------------------------------------