├── addons
└── omnikit
│ ├── plugin.gd.uid
│ ├── src
│ ├── logger
│ │ ├── logger.gd.uid
│ │ └── logger.gd
│ ├── helpers
│ │ ├── files
│ │ │ ├── csv_reader.gd.uid
│ │ │ ├── file_helper.gd.uid
│ │ │ ├── json_reader.gd.uid
│ │ │ ├── json_reader.gd
│ │ │ ├── csv_reader.gd
│ │ │ └── file_helper.gd
│ │ ├── math
│ │ │ ├── bit_stream.gd.uid
│ │ │ ├── math_helper.gd.uid
│ │ │ ├── tor_curve.gd.uid
│ │ │ ├── bezier_curve.gd.uid
│ │ │ ├── tor_curve.gd
│ │ │ ├── bit_stream.gd
│ │ │ └── bezier_curve.gd
│ │ ├── structures
│ │ │ ├── jobs.gd.uid
│ │ │ ├── uuid.gd.uid
│ │ │ ├── hashset.gd.uid
│ │ │ ├── array_helper.gd.uid
│ │ │ ├── enum_helper.gd.uid
│ │ │ ├── shuffle_bag.gd.uid
│ │ │ ├── vector_helper.gd.uid
│ │ │ ├── dictionary_helper.gd.uid
│ │ │ ├── semantic_version.gd.uid
│ │ │ ├── markov_chain_text_generator.gd.uid
│ │ │ ├── enum_helper.gd
│ │ │ ├── shuffle_bag.gd
│ │ │ ├── jobs.gd
│ │ │ ├── dictionary_helper.gd
│ │ │ ├── semantic_version.gd
│ │ │ ├── hashset.gd
│ │ │ ├── uuid.gd
│ │ │ ├── markov_chain_text_generator.gd
│ │ │ └── array_helper.gd
│ │ ├── text
│ │ │ ├── censorer.gd.uid
│ │ │ ├── label_helper.gd.uid
│ │ │ ├── string_helper.gd.uid
│ │ │ ├── label_helper.gd
│ │ │ └── censorer.gd
│ │ ├── time
│ │ │ ├── time_helper.gd.uid
│ │ │ └── time_helper.gd
│ │ ├── color
│ │ │ ├── color_gradient.gd.uid
│ │ │ ├── color_helper.gd.uid
│ │ │ ├── color_palette.gd.uid
│ │ │ ├── color_gradient.gd
│ │ │ ├── color_palette.gd
│ │ │ ├── palettes
│ │ │ │ ├── yellow_grass.tres
│ │ │ │ ├── green_grass.tres
│ │ │ │ ├── coffee.tres
│ │ │ │ ├── slso8.tres
│ │ │ │ ├── pollen8.tres
│ │ │ │ ├── nyx8.tres
│ │ │ │ ├── ammo8.tres
│ │ │ │ ├── funkyfutures.tres
│ │ │ │ ├── oil6.tres
│ │ │ │ ├── borkfest.tres
│ │ │ │ ├── rust_gold8.tres
│ │ │ │ ├── dreamscapes.tres
│ │ │ │ ├── winter_wonderland.tres
│ │ │ │ ├── submerged_chimera.tres
│ │ │ │ └── goosebumps_gold.tres
│ │ │ ├── gradients
│ │ │ │ ├── coffee.tres
│ │ │ │ ├── slso8.tres
│ │ │ │ ├── pollen8.tres
│ │ │ │ ├── ammo8.tres
│ │ │ │ ├── funkyfutures.tres
│ │ │ │ ├── nyx8.tres
│ │ │ │ ├── oil6.tres
│ │ │ │ ├── borkfest.tres
│ │ │ │ ├── dreamscapes.tres
│ │ │ │ ├── rust_gold8.tres
│ │ │ │ ├── winter_wonderland.tres
│ │ │ │ ├── goosebumps_gold.tres
│ │ │ │ └── submerged_chimera.tres
│ │ │ └── color_helper.gd
│ │ ├── input
│ │ │ ├── input_helper.gd.uid
│ │ │ └── motion_input.gd.uid
│ │ ├── nodes
│ │ │ ├── node_remover.gd.uid
│ │ │ ├── node_traversal.gd.uid
│ │ │ ├── node_positioner.gd.uid
│ │ │ ├── node_remover.gd
│ │ │ └── node_traversal.gd
│ │ ├── geometry
│ │ │ └── geometry_helper.gd.uid
│ │ ├── localization
│ │ │ └── localization.gd.uid
│ │ ├── motion
│ │ │ ├── velocity_helper.gd.uid
│ │ │ └── velocity_helper.gd
│ │ ├── viewport
│ │ │ ├── camera_2d_helper.gd.uid
│ │ │ ├── camera_3d_helper.gd.uid
│ │ │ ├── raycast_result.gd.uid
│ │ │ ├── texture_helper.gd.uid
│ │ │ ├── raycast_result.gd
│ │ │ ├── camera_2d_helper.gd
│ │ │ ├── camera_3d_helper.gd
│ │ │ └── texture_helper.gd
│ │ ├── collisions
│ │ │ ├── collision_helper.gd.uid
│ │ │ └── collision_helper.gd
│ │ ├── content
│ │ │ └── names
│ │ │ │ ├── name_generator.gd.uid
│ │ │ │ ├── name_repository.gd.uid
│ │ │ │ ├── name_repository.gd
│ │ │ │ ├── name_generator.gd
│ │ │ │ └── repositories
│ │ │ │ ├── real_life
│ │ │ │ ├── male_human_en.tres
│ │ │ │ ├── female_human_en.tres
│ │ │ │ └── male_human_es.tres
│ │ │ │ └── fantasy
│ │ │ │ ├── female_orc.tres
│ │ │ │ ├── male_orc.tres
│ │ │ │ ├── male_dwarf.tres
│ │ │ │ ├── male_elf.tres
│ │ │ │ ├── female_dwarf.tres
│ │ │ │ └── female_elf.tres
│ │ └── hardware
│ │ │ ├── hardware_detector.gd.uid
│ │ │ ├── hardware_requirements.gd.uid
│ │ │ └── hardware_detector.gd
│ └── autoloads
│ │ ├── signals
│ │ ├── event_bus.gd.uid
│ │ └── event_bus.gd
│ │ ├── network
│ │ └── network_handler.gd.uid
│ │ ├── viewport
│ │ └── window_manager.gd.uid
│ │ └── gamepad
│ │ ├── gamepad_controller_manager.gd.uid
│ │ └── gamepad_controller_manager.gd
│ ├── settings
│ └── plugin_settings.gd.uid
│ └── plugin.cfg
├── .gitattributes
├── images
├── orbit.png
├── swing.png
├── follow.png
├── rotator.png
├── gradients
│ ├── ammo8.png
│ ├── nyx8.png
│ ├── oil6.png
│ ├── slso8.png
│ ├── borkfest.png
│ ├── coffee.png
│ ├── pollen8.png
│ ├── rust_gold.png
│ ├── dreamscapes.png
│ ├── funkyfutures.png
│ ├── goosebumps_gold.png
│ ├── submerged_chimera.png
│ ├── winter_wonderland.png
│ ├── nyx8.png.import
│ ├── oil6.png.import
│ ├── ammo8.png.import
│ ├── coffee.png.import
│ ├── slso8.png.import
│ ├── pollen8.png.import
│ ├── borkfest.png.import
│ ├── rust_gold.png.import
│ ├── dreamscapes.png.import
│ ├── funkyfutures.png.import
│ ├── goosebumps_gold.png.import
│ ├── submerged_chimera.png.import
│ └── winter_wonderland.png.import
├── follow.png.import
├── orbit.png.import
├── swing.png.import
└── rotator.png.import
├── .github
├── PULL_REQUEST_TEMPLATE.md
└── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── SECURITY.md
├── event_bus.tscn
├── LICENSE
├── icon.svg.import
├── project.godot
├── CONTRIBUTING.md
├── icon.svg
└── CODE_OF_CONDUCT.md
/addons/omnikit/plugin.gd.uid:
--------------------------------------------------------------------------------
1 | uid://b0020lexr1c4o
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/logger/logger.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bmqysuo2va7yb
2 |
--------------------------------------------------------------------------------
/addons/omnikit/settings/plugin_settings.gd.uid:
--------------------------------------------------------------------------------
1 | uid://epj4b2elqgjn
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/files/csv_reader.gd.uid:
--------------------------------------------------------------------------------
1 | uid://0qt406jb3nj6
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/bit_stream.gd.uid:
--------------------------------------------------------------------------------
1 | uid://dnltnfibo0xxu
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/math_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://4cp6ws8qbi6j
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/tor_curve.gd.uid:
--------------------------------------------------------------------------------
1 | uid://dlvwi74fwxd2
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/jobs.gd.uid:
--------------------------------------------------------------------------------
1 | uid://cc80fbllvyjkq
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/uuid.gd.uid:
--------------------------------------------------------------------------------
1 | uid://dp538ut3n2rmu
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/text/censorer.gd.uid:
--------------------------------------------------------------------------------
1 | uid://be405iyj5qqdp
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/time/time_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://u565dfayqspl
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/autoloads/signals/event_bus.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bkr7j5nn8sfsh
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/color_gradient.gd.uid:
--------------------------------------------------------------------------------
1 | uid://cc78widvv0nox
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/color_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://c8hoqxlaf4ryh
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/color_palette.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bdgfoc5auy1wg
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/files/file_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://0sm8jtm5ywry
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/files/json_reader.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bw1rvwkd54evp
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/input/input_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bs33vmwc4f4ta
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/input/motion_input.gd.uid:
--------------------------------------------------------------------------------
1 | uid://c7xdyx8l14avu
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/bezier_curve.gd.uid:
--------------------------------------------------------------------------------
1 | uid://tr30hnega7db
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/nodes/node_remover.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bxvpqo6cekeec
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/nodes/node_traversal.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bdyrhe4vk43wr
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/hashset.gd.uid:
--------------------------------------------------------------------------------
1 | uid://coda6of8jn5cx
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/text/label_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://b7lep6od0t2d2
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/text/string_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://dmg60l8nf4d7q
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/autoloads/network/network_handler.gd.uid:
--------------------------------------------------------------------------------
1 | uid://c4u82u2tcol30
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/autoloads/viewport/window_manager.gd.uid:
--------------------------------------------------------------------------------
1 | uid://da7eswtcbmxi0
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/geometry/geometry_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://p7ewr2pp0ssk
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/localization/localization.gd.uid:
--------------------------------------------------------------------------------
1 | uid://b4hs1ait2tyvt
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/motion/velocity_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://b2uwqc72g6p60
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/nodes/node_positioner.gd.uid:
--------------------------------------------------------------------------------
1 | uid://d0cp3wbjavawn
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/array_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://yf21oi6nv3ja
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/enum_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://b3i0s5v66750r
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/shuffle_bag.gd.uid:
--------------------------------------------------------------------------------
1 | uid://by6uv3w1e11mj
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/vector_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://c4au08f3nkpnt
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/camera_2d_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://d3t7xahhkw8hv
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/camera_3d_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://cckkqu6avwup3
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/raycast_result.gd.uid:
--------------------------------------------------------------------------------
1 | uid://ukkjlact7ru8
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/texture_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://db7io7unk8nf3
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/collisions/collision_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://ctjs5wb0kfae8
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/name_generator.gd.uid:
--------------------------------------------------------------------------------
1 | uid://tc1wm1bj4p87
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/name_repository.gd.uid:
--------------------------------------------------------------------------------
1 | uid://cejilr31xj65q
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/hardware/hardware_detector.gd.uid:
--------------------------------------------------------------------------------
1 | uid://cllinnfsdf5b6
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/hardware/hardware_requirements.gd.uid:
--------------------------------------------------------------------------------
1 | uid://daebapcdqbtfe
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/dictionary_helper.gd.uid:
--------------------------------------------------------------------------------
1 | uid://mxqfeuy2530f
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/semantic_version.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bic0p612mjll3
2 |
--------------------------------------------------------------------------------
/addons/omnikit/src/autoloads/gamepad/gamepad_controller_manager.gd.uid:
--------------------------------------------------------------------------------
1 | uid://7xfpq4t0wvte
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Normalize EOL for all files that Git considers text files.
2 | * text=auto eol=lf
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/markov_chain_text_generator.gd.uid:
--------------------------------------------------------------------------------
1 | uid://bd1srjqo40x73
2 |
--------------------------------------------------------------------------------
/images/orbit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/orbit.png
--------------------------------------------------------------------------------
/images/swing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/swing.png
--------------------------------------------------------------------------------
/images/follow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/follow.png
--------------------------------------------------------------------------------
/images/rotator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/rotator.png
--------------------------------------------------------------------------------
/images/gradients/ammo8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/ammo8.png
--------------------------------------------------------------------------------
/images/gradients/nyx8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/nyx8.png
--------------------------------------------------------------------------------
/images/gradients/oil6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/oil6.png
--------------------------------------------------------------------------------
/images/gradients/slso8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/slso8.png
--------------------------------------------------------------------------------
/images/gradients/borkfest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/borkfest.png
--------------------------------------------------------------------------------
/images/gradients/coffee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/coffee.png
--------------------------------------------------------------------------------
/images/gradients/pollen8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/pollen8.png
--------------------------------------------------------------------------------
/images/gradients/rust_gold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/rust_gold.png
--------------------------------------------------------------------------------
/images/gradients/dreamscapes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/dreamscapes.png
--------------------------------------------------------------------------------
/images/gradients/funkyfutures.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/funkyfutures.png
--------------------------------------------------------------------------------
/images/gradients/goosebumps_gold.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/goosebumps_gold.png
--------------------------------------------------------------------------------
/images/gradients/submerged_chimera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/submerged_chimera.png
--------------------------------------------------------------------------------
/images/gradients/winter_wonderland.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ninetailsrabbit/indie-blueprint-toolbox/HEAD/images/gradients/winter_wonderland.png
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/color_gradient.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitColorGradient extends Resource
2 |
3 | @export var id: StringName
4 | @export var name: StringName
5 | @export var gradient: GradientTexture1D
6 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/color_palette.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitColorPalette extends Resource
2 |
3 | @export var id: StringName
4 | @export var name: StringName
5 | @export var colors: PackedColorArray = []
6 |
--------------------------------------------------------------------------------
/addons/omnikit/plugin.cfg:
--------------------------------------------------------------------------------
1 | [plugin]
2 |
3 | name="Omnikit"
4 | description="General utilities that does not belongs to a particular place and are sed as static classes that can be accessed at any time even if they are not in the scene tree."
5 | author="sempitern0"
6 | version="1.2.5"
7 | script="plugin.gd"
8 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Description
2 |
3 | Add your description here, especially why you made these changes and what problem you tried to solve.
4 |
5 | ## Addressed issues
6 |
7 | - List issues here, reference them via #
8 |
9 | ## Screenshots (Optional)
10 |
11 | Show your changes with screenshots
12 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/text/label_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitLabelHelper
2 |
3 |
4 | static func adjust_text(label: Label, max_size: int = 200) -> void:
5 | label.custom_minimum_size.x = min(label.size.x, max_size)
6 |
7 | if label.size.x > max_size:
8 | label.autowrap_mode = TextServer.AUTOWRAP_WORD
9 | label.custom_minimum_size.y = label.size.y
10 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | | Version | Godot Version | Branch | Supported |
6 | | ------- | ------------- | ----------- | ------------------ |
7 | | 1.x | 4.x | `godot-4.x` | :white_check_mark: |
8 |
9 | ## Reporting a Vulnerability
10 |
11 | Please [raise an issue](https://github.com/sempitern0/omnikit/issues) in case you find a security issue.
12 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/name_repository.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitNameRepository extends Resource
2 |
3 | enum Category {
4 | Male,
5 | Female,
6 | NoGender,
7 | }
8 |
9 |
10 | @export var id: StringName
11 | @export var use_shuffle_bag: bool = true
12 | @export var region: StringName = &"en"
13 | @export var gender: Category = Category.NoGender
14 | @export var names: Array[String] = []
15 | @export var surnames: Array[String] = []
16 |
--------------------------------------------------------------------------------
/event_bus.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=3 uid="uid://dqd6fc5qtim7d"]
2 |
3 | [ext_resource type="Script" uid="uid://c22a1w56amswj" path="res://event_bus.gd" id="1_dw24f"]
4 | [ext_resource type="Script" uid="uid://c7d81wivf54vc" path="res://score.gd" id="2_ql4vm"]
5 |
6 | [node name="EventBus" type="Node2D"]
7 | script = ExtResource("1_dw24f")
8 |
9 | [node name="ScoreHandler" type="Node" parent="."]
10 | script = ExtResource("2_ql4vm")
11 | metadata/_custom_type_script = "uid://c7d81wivf54vc"
12 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/yellow_grass.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://bb7f3juodbp6q"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_tsmtu"]
4 |
5 | [resource]
6 | script = ExtResource("1_tsmtu")
7 | id = &"yellow_grass"
8 | name = &"Yellow grass"
9 | colors = [Color(0.7882353, 0.7058824, 0.34509805, 1), Color(0.83137256, 0.6627451, 0.3019608, 1), Color(0.7254902, 0.5921569, 0.24313726, 1), Color(0.6431373, 0.47843137, 0.17254902, 1)]
10 | metadata/_custom_type_script = "uid://bdgfoc5auy1wg"
11 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/green_grass.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://jr7tuu5p0bxe"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_jwbio"]
4 |
5 | [resource]
6 | script = ExtResource("1_jwbio")
7 | id = &"green_grass"
8 | name = &"Green grass"
9 | colors = [Color(0.29803923, 0.6039216, 0.16470589, 1), Color(0.24705882, 0.49411765, 0.14509805, 1), Color(0.42745098, 0.76862746, 0.23529412, 1), Color(0.18039216, 0.36862746, 0.101960786, 1)]
10 | metadata/_custom_type_script = "uid://bdgfoc5auy1wg"
11 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/enum_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitEnumHelper
2 |
3 |
4 | static func random_value(_enum: Variant) -> Variant:
5 | return _enum.keys()[randi() % _enum.size()]
6 |
7 |
8 | static func random_value_as_str(_enum: Variant) -> StringName:
9 | return value_to_str(_enum, randi() % _enum.size())
10 |
11 |
12 | static func value_to_str(_enum: Variant, value: int) -> StringName:
13 | return StringName(_enum.keys()[value])
14 |
15 |
16 | static func values_to_str(_enum: Variant) -> Array[StringName]:
17 | var values: Array[StringName] = []
18 |
19 | for index: int in _enum.keys().size():
20 | values.append(value_to_str(_enum, index))
21 |
22 | return values
23 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ""
5 | labels: "⭐ feature"
6 | assignees: ""
7 | ---
8 |
9 | **Is your feature request related to a problem? Please describe.**
10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11 |
12 | **Describe the solution you'd like**
13 | A clear and concise description of what you want to happen.
14 |
15 | **Describe alternatives you've considered**
16 | A clear and concise description of any alternative solutions or features you've considered.
17 |
18 | **Additional context**
19 | Add any other context or screenshots about the feature request here.
20 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/coffee.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://cpwttsrbyyvub"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_bq3f1"]
4 |
5 | [resource]
6 | script = ExtResource("1_bq3f1")
7 | id = &"coffee"
8 | name = &"Coffee"
9 | colors = [Color(0, 0, 0, 1), null, Color(0.0392157, 0.0392157, 0.0392157, 1), Color(0.0980392, 0.0980392, 0.0980392, 1), Color(0.32549, 0.243137, 0.176471, 1), Color(0.635294, 0.439216, 0.207843, 1), Color(0.721569, 0.545098, 0.290196, 1), Color(0.866667, 0.792157, 0.490196, 1), Color(0.984314, 0.976471, 0.937255, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/slso8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://b3haf5geiy1f5"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_ef4rh"]
4 |
5 | [resource]
6 | script = ExtResource("1_ef4rh")
7 | id = &"slso8"
8 | name = &"Slso8"
9 | colors = [Color(0, 0.0901961, 0.168627, 1), Color(0.0509804, 0.168627, 0.270588, 1), Color(0.12549, 0.235294, 0.337255, 1), Color(0.329412, 0.305882, 0.407843, 1), Color(0.552941, 0.411765, 0.478431, 1), Color(0.815686, 0.505882, 0.34902, 1), Color(1, 0.666667, 0.368627, 1), Color(1, 0.831373, 0.639216, 1), Color(1, 0.92549, 0.839216, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/pollen8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://6ujiko3ersq"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_brjsj"]
4 |
5 | [resource]
6 | script = ExtResource("1_brjsj")
7 | id = &"pollen8"
8 | name = &"Pollen8"
9 | colors = [Color(0.180392, 0.141176, 0.164706, 1), Color(0.45098, 0.27451, 0.298039, 1), Color(0.670588, 0.337255, 0.458824, 1), Color(0.933333, 0.415686, 0.486275, 1), Color(1, 0.654902, 0.647059, 1), Color(0.203922, 0.67451, 0.729412, 1), Color(0.447059, 0.862745, 0.733333, 1), Color(1, 0.878431, 0.494118, 1), Color(1, 0.905882, 0.839216, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/nyx8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://d20l6hm88h112"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_gkcsd"]
4 |
5 | [resource]
6 | script = ExtResource("1_gkcsd")
7 | id = &"nyx8"
8 | name = &"Nyx8"
9 | colors = [Color(0, 0.0392157, 0.0117647, 1), Color(0.0313726, 0.0784314, 0.117647, 1), Color(0.0588235, 0.164706, 0.247059, 1), Color(0.12549, 0.223529, 0.309804, 1), Color(0.305882, 0.286275, 0.372549, 1), Color(0.505882, 0.384314, 0.443137, 1), Color(0.6, 0.458824, 0.466667, 1), Color(0.764706, 0.639216, 0.541176, 1), Color(0.964706, 0.839216, 0.741176, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/ammo8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://bn8gvswphpdvs"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_ks1ir"]
4 |
5 | [resource]
6 | script = ExtResource("1_ks1ir")
7 | id = &"ammo8"
8 | name = &"Ammo-8"
9 | colors = [Color(0, 0.0392157, 0.0117647, 1), Color(0.0156863, 0.0470588, 0.0235294, 1), Color(0.0666667, 0.137255, 0.0941176, 1), Color(0.117647, 0.227451, 0.160784, 1), Color(0.188235, 0.364706, 0.258824, 1), Color(0.301961, 0.501961, 0.380392, 1), Color(0.537255, 0.635294, 0.341176, 1), Color(0.745098, 0.862745, 0.498039, 1), Color(0.933333, 1, 0.8, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/funkyfutures.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://dbugyqpbdcfkk"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_m20sv"]
4 |
5 | [resource]
6 | script = ExtResource("1_m20sv")
7 | id = &"funkyfutures"
8 | name = &"Funkyfutures"
9 | colors = [Color(0.0705882, 0.0313726, 0.14902, 1), Color(0.670588, 0.121569, 0.396078, 1), Color(1, 0.309804, 0.411765, 1), Color(1, 0.505882, 0.258824, 1), Color(1, 0.854902, 0.270588, 1), Color(0.2, 0.407843, 0.862745, 1), Color(0.286275, 0.905882, 0.92549, 1), Color(1, 0.968627, 0.972549, 1), Color(0.168627, 0.0588235, 0.329412, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/oil6.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://ci31vt88yrxaj"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_mg54p"]
4 |
5 | [resource]
6 | script = ExtResource("1_mg54p")
7 | id = &"oil6"
8 | name = &"Oil6"
9 | colors = [Color(0.0235294, 0.0235294, 0.0392157, 1), Color(0.0666667, 0.0666667, 0.121569, 1), Color(0.113725, 0.113725, 0.2, 1), Color(0.152941, 0.152941, 0.266667, 1), Color(0.286275, 0.301961, 0.494118, 1), Color(0.545098, 0.427451, 0.611765, 1), Color(0.776471, 0.623529, 0.647059, 1), Color(0.94902, 0.827451, 0.670588, 1), Color(0.984314, 0.960784, 0.937255, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/shuffle_bag.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitShuffleBag extends RefCounted
2 |
3 | var initial: Array[Variant] = []
4 | var bag: Array[Variant] = []
5 |
6 |
7 | func _init(array: Array[Variant]) -> void:
8 | populate(array)
9 |
10 |
11 | func populate(array: Array[Variant]) -> void:
12 | initial = array
13 | reshuffle()
14 |
15 |
16 | func reshuffle() -> void:
17 | bag = initial.duplicate()
18 | bag.shuffle()
19 |
20 |
21 | func pick_random() -> Variant:
22 | if bag.is_empty():
23 | reshuffle()
24 |
25 | return bag.pop_front()
26 |
27 |
28 | func pick_randoms(amount: int) -> Variant:
29 | var result: Array[Variant] = []
30 |
31 | for i in amount:
32 | result.append(pick_random())
33 |
34 | return result
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/borkfest.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://bof4aa2ppyeut"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_ks1ir"]
4 |
5 | [resource]
6 | script = ExtResource("1_ks1ir")
7 | id = &"borkfest"
8 | name = &"Borkfest"
9 | colors = [Color(0.0901961, 0.0901961, 0.0666667, 1), Color(0.792157, 0.352941, 0.180392, 1), Color(1, 0.470588, 0.192157, 1), Color(0.952941, 0.6, 0.286275, 1), Color(0.921569, 0.760784, 0.458824, 1), Color(0.87451, 0.843137, 0.521569, 1), Color(0.12549, 0.133333, 0.0823529, 1), Color(0.588235, 0.235294, 0.235294, 1), Color(0.227451, 0.156863, 0.00784314, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/rust_gold8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://ol5me4tvp4rl"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_bnjg5"]
4 |
5 | [resource]
6 | script = ExtResource("1_bnjg5")
7 | id = &"rust_gold8"
8 | name = &"Rust Gold-8"
9 | colors = [Color(0.0313726, 0.0784314, 0.117647, 1), Color(0.12549, 0.12549, 0.12549, 1), Color(0.223529, 0.223529, 0.223529, 1), Color(0.447059, 0.34902, 0.337255, 1), Color(0.733333, 0.498039, 0.341176, 1), Color(0.2, 0.109804, 0.0901961, 1), Color(0.337255, 0.196078, 0.14902, 1), Color(0.67451, 0.419608, 0.14902, 1), Color(0.964706, 0.803922, 0.14902, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/dreamscapes.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorPalette" load_steps=2 format=3 uid="uid://fakd5kmyjr68"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_lhnds"]
4 |
5 | [resource]
6 | script = ExtResource("1_lhnds")
7 | id = &"dreamscapes"
8 | name = &"Dreamscapes"
9 | colors = [Color(0.129412, 0.0980392, 0.129412, 1), Color(0.329412, 0.2, 0.266667, 1), Color(0.545098, 0.25098, 0.286275, 1), Color(0.682353, 0.415686, 0.278431, 1), Color(0.792157, 0.627451, 0.352941, 1), Color(0.317647, 0.321569, 0.384314, 1), Color(0.388235, 0.470588, 0.490196, 1), Color(0.556863, 0.627451, 0.568627, 1), Color(0.788235, 0.8, 0.631373, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/winter_wonderland.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://bdbgepqtir36m"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_gw75i"]
4 |
5 | [resource]
6 | script = ExtResource("1_gw75i")
7 | id = &"winter_wonderland"
8 | name = &"Winter Wonderland"
9 | colors = [Color(0.0666667, 0.0941176, 0.215686, 1), Color(0.12549, 0.156863, 0.305882, 1), Color(0.172549, 0.290196, 0.470588, 1), Color(0.219608, 0.458824, 0.631373, 1), Color(0.545098, 0.792157, 0.866667, 1), Color(0.45098, 0.552941, 0.615686, 1), Color(0.654902, 0.737255, 0.788235, 1), Color(0.839216, 0.882353, 0.913725, 1), Color(1, 1, 1, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/submerged_chimera.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://0lwrg4orhopg"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_8l30y"]
4 |
5 | [resource]
6 | script = ExtResource("1_8l30y")
7 | id = &"submerged_chimera"
8 | name = &"Submerged Chimera"
9 | colors = [Color(0.0196078, 0.00784314, 0.0980392, 1), Color(0.0705882, 0.0588235, 0.156863, 1), Color(0.180392, 0.117647, 0.360784, 1), Color(0.427451, 0.258824, 0.6, 1), Color(0.52549, 0.137255, 0.682353, 1), Color(0.870588, 0.223529, 0.913725, 1), Color(0.968627, 0.572549, 0.894118, 1), Color(1, 0.823529, 0.870588, 1), Color(0.968627, 0.980392, 0.917647, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/palettes/goosebumps_gold.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="ColorPalette" load_steps=2 format=3 uid="uid://b5815hmhe0gxm"]
2 |
3 | [ext_resource type="Script" uid="uid://bdgfoc5auy1wg" path="res://addons/omnikit/src/helpers/color/color_palette.gd" id="1_cnkm5"]
4 |
5 | [resource]
6 | script = ExtResource("1_cnkm5")
7 | id = &"goosegumps_gold"
8 | name = &"Goosegumps Gold"
9 | colors = [Color(0, 0.00784314, 0.0156863, 1), Color(0.129412, 0.0980392, 0.109804, 1), Color(0.215686, 0.137255, 0.396078, 1), Color(0.25098, 0.294118, 0.466667, 1), Color(0.352941, 0.521569, 0.643137, 1), Color(0.580392, 0.0784314, 0.203922, 1), Color(0.784314, 0.129412, 0.0313726, 1), Color(0.890196, 0.364706, 0.0313726, 1), Color(0.819608, 0.623529, 0.133333, 1)]
10 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/jobs.gd:
--------------------------------------------------------------------------------
1 | ## Wait for multiple callables to finish
2 | ## EXAMPLE:
3 | ## var jobs = OmniKitJobs.new()
4 | ## jobs.add(func(): ## do stuff):
5 | ## jobs.add(func(): ## do secondary stuff):
6 | ## await jobs.completed
7 | class_name OmniKitJobs extends RefCounted
8 |
9 | signal completed
10 |
11 | var started: int = 0
12 | var finished: int = 0
13 |
14 |
15 | func add(new_job: Callable):
16 | if new_job.is_valid():
17 | started += 1
18 | _run_job(new_job)
19 |
20 |
21 | func reset() -> void:
22 | started = 0
23 | finished = 0
24 |
25 |
26 | func _run_job(job: Callable) -> void:
27 | await job.call()
28 | finished += 1
29 |
30 | if started == finished:
31 | reset()
32 | await Engine.get_main_loop().process_frame
33 | completed.emit()
34 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/collisions/collision_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitCollisionHelper
2 |
3 |
4 | @warning_ignore("narrowing_conversion")
5 | static func layer_to_value(layer: int) -> int:
6 | if layer > 32:
7 | push_error("OmniKitCollisionHelper->layer_to_value: The specified collision layer (%d) is invalid. Please ensure the layer value is between 1 and 32" % layer)
8 |
9 | return pow(2, clampi(layer, 1, 32) - 1)
10 |
11 | @warning_ignore("narrowing_conversion")
12 | static func value_to_layer(value: int) -> int:
13 | if value == 1:
14 | return value
15 |
16 | ## This bitwise operation check if the value is a valid base 2
17 | if value > 0 and (value & (value - 1)) == 0:
18 | return (log(value) / log(2)) + 1
19 |
20 | push_error("OmniKitCollisionHelper->value_to_layer: The specified value %d) is invalid. Please ensure the value is a power of 2" % value)
21 |
22 | return 0
23 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/coffee.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://crdtfarlju6do"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_k14w7"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_ckk8g"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0, 0, 0, 1, 0.0392157, 0.0392157, 0.0392157, 1, 0.0980392, 0.0980392, 0.0980392, 1, 0.32549, 0.243137, 0.176471, 1, 0.635294, 0.439216, 0.207843, 1, 0.721569, 0.545098, 0.290196, 1, 0.866667, 0.792157, 0.490196, 1, 0.984314, 0.976471, 0.937255, 1, 0, 0, 0, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_gbm30"]
10 | gradient = SubResource("Gradient_ckk8g")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_k14w7")
15 | id = &"coffee"
16 | name = &"Coffee"
17 | gradient = SubResource("GradientTexture1D_gbm30")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/slso8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://d1ns282iw6peh"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_dtu3o"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_0l8os"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0, 0.0901961, 0.168627, 1, 0.12549, 0.235294, 0.337255, 1, 0.329412, 0.305882, 0.407843, 1, 0.552941, 0.411765, 0.478431, 1, 0.815686, 0.505882, 0.34902, 1, 1, 0.666667, 0.368627, 1, 1, 0.831373, 0.639216, 1, 1, 0.92549, 0.839216, 1, 0.0509804, 0.168627, 0.270588, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_ka5bu"]
10 | gradient = SubResource("Gradient_0l8os")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_dtu3o")
15 | id = &"slso8"
16 | name = &"Slso8"
17 | gradient = SubResource("GradientTexture1D_ka5bu")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/pollen8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://cm3iy6pqbmmb7"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_vokey"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_fecuy"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.180392, 0.141176, 0.164706, 1, 0.670588, 0.337255, 0.458824, 1, 0.933333, 0.415686, 0.486275, 1, 1, 0.654902, 0.647059, 1, 0.203922, 0.67451, 0.729412, 1, 0.447059, 0.862745, 0.733333, 1, 1, 0.878431, 0.494118, 1, 1, 0.905882, 0.839216, 1, 0.45098, 0.27451, 0.298039, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_dfxr1"]
10 | gradient = SubResource("Gradient_fecuy")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_vokey")
15 | id = &"pollen8"
16 | name = &"Pollen8"
17 | gradient = SubResource("GradientTexture1D_dfxr1")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/ammo8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://c3j6dsmmkr73k"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_2clwu"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_mnht0"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0666667, 0.137255, 0.0941176, 1, 0.117647, 0.227451, 0.160784, 1, 0.188235, 0.364706, 0.258824, 1, 0.301961, 0.501961, 0.380392, 1, 0.537255, 0.635294, 0.341176, 1, 0.745098, 0.862745, 0.498039, 1, 0.933333, 1, 0.8, 1, 0, 0.0392157, 0.0117647, 1, 0.0156863, 0.0470588, 0.0235294, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_cxn4s"]
10 | gradient = SubResource("Gradient_mnht0")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_2clwu")
15 | id = &"ammo8"
16 | name = &"Ammo-8"
17 | gradient = SubResource("GradientTexture1D_cxn4s")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/funkyfutures.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://bw62jq02r0aj2"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_8ieva"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_nal8l"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0705882, 0.0313726, 0.14902, 1, 0.670588, 0.121569, 0.396078, 1, 1, 0.309804, 0.411765, 1, 1, 0.505882, 0.258824, 1, 1, 0.854902, 0.270588, 1, 0.2, 0.407843, 0.862745, 1, 0.286275, 0.905882, 0.92549, 1, 1, 0.968627, 0.972549, 1, 0.168627, 0.0588235, 0.329412, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_r6mvn"]
10 | gradient = SubResource("Gradient_nal8l")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_8ieva")
15 | id = &"funkyfutures"
16 | name = &"Funkyfutures"
17 | gradient = SubResource("GradientTexture1D_r6mvn")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/nyx8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://cpgyxlmfa1ict"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_0aeiv"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_yecbm"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0, 0.0392157, 0.0117647, 1, 0.0588235, 0.164706, 0.247059, 1, 0.12549, 0.223529, 0.309804, 1, 0.305882, 0.286275, 0.372549, 1, 0.505882, 0.384314, 0.443137, 1, 0.6, 0.458824, 0.466667, 1, 0.764706, 0.639216, 0.541176, 1, 0.964706, 0.839216, 0.741176, 1, 0.0313726, 0.0784314, 0.117647, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_qc7uq"]
10 | gradient = SubResource("Gradient_yecbm")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_0aeiv")
15 | id = &"nyx8"
16 | name = &"Nyx8"
17 | gradient = SubResource("GradientTexture1D_qc7uq")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/oil6.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://clqijpdiw7s36"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_ki43n"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_byv5s"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0235294, 0.0235294, 0.0392157, 1, 0.113725, 0.113725, 0.2, 1, 0.152941, 0.152941, 0.266667, 1, 0.286275, 0.301961, 0.494118, 1, 0.545098, 0.427451, 0.611765, 1, 0.776471, 0.623529, 0.647059, 1, 0.94902, 0.827451, 0.670588, 1, 0.984314, 0.960784, 0.937255, 1, 0.0666667, 0.0666667, 0.121569, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_3nwqa"]
10 | gradient = SubResource("Gradient_byv5s")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_ki43n")
15 | id = &"oil6"
16 | name = &"Oil6"
17 | gradient = SubResource("GradientTexture1D_3nwqa")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/borkfest.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://4rhk7lae0ada"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_km77l"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_rehaq"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0901961, 0.0901961, 0.0666667, 1, 0.792157, 0.352941, 0.180392, 1, 1, 0.470588, 0.192157, 1, 0.952941, 0.6, 0.286275, 1, 0.921569, 0.760784, 0.458824, 1, 0.87451, 0.843137, 0.521569, 1, 0.12549, 0.133333, 0.0823529, 1, 0.588235, 0.235294, 0.235294, 1, 0.227451, 0.156863, 0.00784314, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_pcfe8"]
10 | gradient = SubResource("Gradient_rehaq")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_km77l")
15 | id = &"borkfest"
16 | name = &"Borkfest"
17 | gradient = SubResource("GradientTexture1D_pcfe8")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/dreamscapes.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://cqarsfqemj3qi"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_k14w8"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_ckk8g"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.129412, 0.0980392, 0.129412, 1, 0.329412, 0.2, 0.266667, 1, 0.545098, 0.25098, 0.286275, 1, 0.682353, 0.415686, 0.278431, 1, 0.792157, 0.627451, 0.352941, 1, 0.317647, 0.321569, 0.384314, 1, 0.388235, 0.470588, 0.490196, 1, 0.556863, 0.627451, 0.568627, 1, 0.788235, 0.8, 0.631373, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_gbm31"]
10 | gradient = SubResource("Gradient_ckk8g")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_k14w8")
15 | id = &"dreamscapes"
16 | name = &"Dreamscapes"
17 | gradient = SubResource("GradientTexture1D_gbm31")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/rust_gold8.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://bg5br1eq4sbge"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_lksrj"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_np2bm"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0313726, 0.0784314, 0.117647, 1, 0.223529, 0.223529, 0.223529, 1, 0.447059, 0.34902, 0.337255, 1, 0.733333, 0.498039, 0.341176, 1, 0.2, 0.109804, 0.0901961, 1, 0.337255, 0.196078, 0.14902, 1, 0.67451, 0.419608, 0.14902, 1, 0.964706, 0.803922, 0.14902, 1, 0.12549, 0.12549, 0.12549, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_k6r6g"]
10 | gradient = SubResource("Gradient_np2bm")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_lksrj")
15 | id = &"rust_gold8"
16 | name = &"Rust Gold-8"
17 | gradient = SubResource("GradientTexture1D_k6r6g")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/tor_curve.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitTorCurve
2 |
3 |
4 | static func pinch(v):
5 | return pow(v, 2) * (-1 if v < 0.5 else 1)
6 |
7 |
8 | static func run(x: float, a: float = 0.0, b: float = 0.5, c: float = 0.0) -> float:
9 | c = pinch(c)
10 | x = max(0, min(1, x))
11 |
12 | var epsilon = 0.00001
13 | var s = exp(a)
14 | var s2 = 1.0 / (s + epsilon)
15 | var t = max(0, min(1, b))
16 | var u = c
17 | var result = 0
18 | var c1 = 0
19 | var c2 = 0
20 | var c3 = 0
21 |
22 | if(x < t):
23 | c1 = (t * x) / ( x + s * (t - x) + epsilon)
24 | c2 = t - pow(1 / (t + epsilon), s2 - 1) * pow(abs(x - t), s2)
25 |
26 | c3 = pow(1 / (t + epsilon), s - 1) * pow(x, s)
27 | else:
28 | c1 = (1 - t)*(x - 1) / (1 - x - s * (t - x) + epsilon) + 1
29 | c2 = pow(1 / ( (1 - t) + epsilon), s2 - 1) * pow(abs(x - t), s2) + t
30 | c3 = 1 - pow(1 / ( (1 - t) + epsilon), s - 1) * pow(1 - x, s)
31 |
32 | if(u <= 0):
33 | result = (-u) * c2 + (1 + u) * c1
34 | else:
35 | result = (u) * c3 + (1 - u) * c1
36 |
37 | return result
38 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/winter_wonderland.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://c6yftr3v5wri5"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_ex3ev"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_0t5fp"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0666667, 0.0941176, 0.215686, 1, 0.172549, 0.290196, 0.470588, 1, 0.219608, 0.458824, 0.631373, 1, 0.545098, 0.792157, 0.866667, 1, 0.45098, 0.552941, 0.615686, 1, 0.654902, 0.737255, 0.788235, 1, 0.839216, 0.882353, 0.913725, 1, 1, 1, 1, 1, 0.12549, 0.156863, 0.305882, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_7rapr"]
10 | gradient = SubResource("Gradient_0t5fp")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_ex3ev")
15 | id = &"winter_wonderland"
16 | name = &"Winter Wonderland"
17 | gradient = SubResource("GradientTexture1D_7rapr")
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: "\U0001F41B bug"
6 | assignees: ""
7 | ---
8 |
9 | Godot version: x.x.x
10 |
11 | **Describe the bug**
12 | A clear and concise description of what the bug is.
13 |
14 | **To Reproduce**
15 | Steps to reproduce the behavior:
16 |
17 | 1. Go to '...'
18 | 2. Click on '....'
19 | 3. Scroll down to '....'
20 | 4. See error
21 |
22 | **Expected behavior**
23 | A clear and concise description of what you expected to happen.
24 |
25 | **Screenshots**
26 | If applicable, add screenshots to help explain your problem.
27 |
28 | **Desktop (please complete the following information):**
29 |
30 | - OS: [e.g. iOS]
31 | - Browser [e.g. chrome, safari]
32 | - Version [e.g. 22]
33 |
34 | **Smartphone (please complete the following information):**
35 |
36 | - Device: [e.g. iPhone6]
37 | - OS: [e.g. iOS8.1]
38 | - Browser [e.g. stock browser, safari]
39 | - Version [e.g. 22]
40 |
41 | **Additional context**
42 | Add any other context about the problem here.
43 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/goosebumps_gold.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://dk3sjxy2l6f7u"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_oi1c7"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_pnkvq"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0, 0.00784314, 0.0156863, 1, 0.215686, 0.137255, 0.396078, 1, 0.25098, 0.294118, 0.466667, 1, 0.352941, 0.521569, 0.643137, 1, 0.580392, 0.0784314, 0.203922, 1, 0.784314, 0.129412, 0.0313726, 1, 0.890196, 0.364706, 0.0313726, 1, 0.819608, 0.623529, 0.133333, 1, 0.129412, 0.0980392, 0.109804, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_cpvhw"]
10 | gradient = SubResource("Gradient_pnkvq")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_oi1c7")
15 | id = &"goosebumps_gold"
16 | name = &"Goosebumps Gold"
17 | gradient = SubResource("GradientTexture1D_cpvhw")
18 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/gradients/submerged_chimera.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitColorGradient" load_steps=4 format=3 uid="uid://mlbiw12lmbm8"]
2 |
3 | [ext_resource type="Script" uid="uid://cc78widvv0nox" path="res://addons/omnikit/src/helpers/color/color_gradient.gd" id="1_d10y8"]
4 |
5 | [sub_resource type="Gradient" id="Gradient_umcuk"]
6 | offsets = PackedFloat32Array(0, 0, 0.143, 0.286, 0.429, 0.571, 0.714, 0.857, 1)
7 | colors = PackedColorArray(0.0196078, 0.00784314, 0.0980392, 1, 0.180392, 0.117647, 0.360784, 1, 0.427451, 0.258824, 0.6, 1, 0.52549, 0.137255, 0.682353, 1, 0.870588, 0.223529, 0.913725, 1, 0.968627, 0.572549, 0.894118, 1, 1, 0.823529, 0.870588, 1, 0.968627, 0.980392, 0.917647, 1, 0.0705882, 0.0588235, 0.156863, 1)
8 |
9 | [sub_resource type="GradientTexture1D" id="GradientTexture1D_i3jyk"]
10 | gradient = SubResource("Gradient_umcuk")
11 | width = 2048
12 |
13 | [resource]
14 | script = ExtResource("1_d10y8")
15 | id = &"submerged_chimera"
16 | name = &"Submerged Chimera"
17 | gradient = SubResource("GradientTexture1D_i3jyk")
18 |
--------------------------------------------------------------------------------
/images/follow.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://bgvx3ufbaiob"
6 | path="res://.godot/imported/follow.png-912f434435d3c348a90a93a54158e7c2.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/follow.png"
14 | dest_files=["res://.godot/imported/follow.png-912f434435d3c348a90a93a54158e7c2.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/orbit.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://co6s527cvivb6"
6 | path="res://.godot/imported/orbit.png-1721a1f8a200bab78950ebb3188341c7.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/orbit.png"
14 | dest_files=["res://.godot/imported/orbit.png-1721a1f8a200bab78950ebb3188341c7.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/swing.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://civ88xgosakg1"
6 | path="res://.godot/imported/swing.png-d145f9b3ce5fc2881fad0963988147a8.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/swing.png"
14 | dest_files=["res://.godot/imported/swing.png-d145f9b3ce5fc2881fad0963988147a8.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/rotator.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://n3f24epvfv6d"
6 | path="res://.godot/imported/rotator.png-586f178b6a3fb1bd505da547f27044bd.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/rotator.png"
14 | dest_files=["res://.godot/imported/rotator.png-586f178b6a3fb1bd505da547f27044bd.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/nyx8.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://1ie8qcr22f1a"
6 | path="res://.godot/imported/nyx8.png-7aadfd578be204ef21506a571e43d2fa.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/nyx8.png"
14 | dest_files=["res://.godot/imported/nyx8.png-7aadfd578be204ef21506a571e43d2fa.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/oil6.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://h6wtnnhhblm6"
6 | path="res://.godot/imported/oil6.png-acaca07b1a44cab0cd21112667c594ba.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/oil6.png"
14 | dest_files=["res://.godot/imported/oil6.png-acaca07b1a44cab0cd21112667c594ba.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/ammo8.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://jn1q18phkyiw"
6 | path="res://.godot/imported/ammo8.png-776f939154e3601d63ee0c42f426aeca.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/ammo8.png"
14 | dest_files=["res://.godot/imported/ammo8.png-776f939154e3601d63ee0c42f426aeca.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/coffee.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://5lddxkbaqk8l"
6 | path="res://.godot/imported/coffee.png-edfd31f97f99d91d3769efd03c317d81.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/coffee.png"
14 | dest_files=["res://.godot/imported/coffee.png-edfd31f97f99d91d3769efd03c317d81.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/slso8.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://dvjnr8ueurk10"
6 | path="res://.godot/imported/slso8.png-dc00786fdcba3ad68cca76f452424de0.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/slso8.png"
14 | dest_files=["res://.godot/imported/slso8.png-dc00786fdcba3ad68cca76f452424de0.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/pollen8.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://betipsv6g0hlg"
6 | path="res://.godot/imported/pollen8.png-f94307f1723d8d7103915e72371f630c.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/pollen8.png"
14 | dest_files=["res://.godot/imported/pollen8.png-f94307f1723d8d7103915e72371f630c.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 sempitern0
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 |
--------------------------------------------------------------------------------
/images/gradients/borkfest.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://ce3yciw43aone"
6 | path="res://.godot/imported/borkfest.png-7c90862ca9bc6dda59550186451f9f91.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/borkfest.png"
14 | dest_files=["res://.godot/imported/borkfest.png-7c90862ca9bc6dda59550186451f9f91.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/raycast_result.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitRaycastResult extends RefCounted
2 |
3 | var collider: Node
4 | var collider_id: int
5 | var normal: Vector3
6 | var position: Vector3
7 | var face_index: int
8 | var shape: int
9 | var rid: RID
10 |
11 | var property_keys: Array[String] = [
12 | "collider",
13 | "collider_id",
14 | "normal",
15 | "position",
16 | "face_index",
17 | "shape",
18 | "rid"
19 | ]
20 |
21 | func _init(result: Dictionary) -> void:
22 | for key: String in property_keys:
23 | if result.has(key):
24 | self[key] = result[key]
25 |
26 |
27 | func collided() -> bool:
28 | return collider != null
29 |
30 |
31 | func projection(origin: Vector3, to: Vector3 = position, distance: float = 100.0) -> Vector3:
32 | if normal.is_zero_approx():
33 | return origin.direction_to(to) * distance
34 |
35 | return origin * normal * distance
36 |
37 |
38 | func as_dict() -> Dictionary:
39 | return {
40 | "collider": collider,
41 | "collider_id": collider_id,
42 | "normal": normal,
43 | "position": position,
44 | "face_index": face_index,
45 | "shape": shape,
46 | "rid": rid,
47 | }
48 |
--------------------------------------------------------------------------------
/images/gradients/rust_gold.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://cg3buy81i4r7q"
6 | path="res://.godot/imported/rust_gold.png-22566de84e91045d4f2071a321ff437f.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/rust_gold.png"
14 | dest_files=["res://.godot/imported/rust_gold.png-22566de84e91045d4f2071a321ff437f.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/dreamscapes.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://tvsvc4fxend2"
6 | path="res://.godot/imported/dreamscapes.png-7bdbd42faa4a113df77cbd942389acb6.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/dreamscapes.png"
14 | dest_files=["res://.godot/imported/dreamscapes.png-7bdbd42faa4a113df77cbd942389acb6.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/funkyfutures.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://dx5rbc0brbcm"
6 | path="res://.godot/imported/funkyfutures.png-d9d5854dc8f5188be4738bbc45a38391.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/funkyfutures.png"
14 | dest_files=["res://.godot/imported/funkyfutures.png-d9d5854dc8f5188be4738bbc45a38391.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/goosebumps_gold.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://bcffvmiennq7m"
6 | path="res://.godot/imported/goosebumps_gold.png-80683d82e585e86969319c2bf20f4618.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/goosebumps_gold.png"
14 | dest_files=["res://.godot/imported/goosebumps_gold.png-80683d82e585e86969319c2bf20f4618.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/submerged_chimera.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://b8bnyx5ku76aj"
6 | path="res://.godot/imported/submerged_chimera.png-63c8525369272d473e7a60f58d2f1c1d.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/submerged_chimera.png"
14 | dest_files=["res://.godot/imported/submerged_chimera.png-63c8525369272d473e7a60f58d2f1c1d.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/images/gradients/winter_wonderland.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://ke80b0mmancc"
6 | path="res://.godot/imported/winter_wonderland.png-91cc1e772320ed7e2e5ef4f6b27fe04e.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://images/gradients/winter_wonderland.png"
14 | dest_files=["res://.godot/imported/winter_wonderland.png-91cc1e772320ed7e2e5ef4f6b27fe04e.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 |
--------------------------------------------------------------------------------
/icon.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://jln0u7ian26u"
6 | path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://icon.svg"
14 | dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/uastc_level=0
22 | compress/rdo_quality_loss=0.0
23 | compress/hdr_compression=1
24 | compress/normal_map=0
25 | compress/channel_pack=0
26 | mipmaps/generate=false
27 | mipmaps/limit=-1
28 | roughness/mode=0
29 | roughness/src_normal=""
30 | process/channel_remap/red=0
31 | process/channel_remap/green=1
32 | process/channel_remap/blue=2
33 | process/channel_remap/alpha=3
34 | process/fix_alpha_border=true
35 | process/premult_alpha=false
36 | process/normal_map_invert_y=false
37 | process/hdr_as_srgb=false
38 | process/hdr_clamp_exposure=false
39 | process/size_limit=0
40 | detect_3d/compress_to=1
41 | svg/scale=1.0
42 | editor/scale_with_editor_scale=false
43 | editor/convert_colors_with_editor_theme=false
44 |
--------------------------------------------------------------------------------
/project.godot:
--------------------------------------------------------------------------------
1 | ; Engine configuration file.
2 | ; It's best edited using the editor UI and not directly,
3 | ; since the parameters that go here are not all obvious.
4 | ;
5 | ; Format:
6 | ; [section] ; section goes between []
7 | ; param=value ; assign values to parameters
8 |
9 | config_version=5
10 |
11 | [application]
12 |
13 | config/name="OmniKit"
14 | config/description="General utilities that does not belongs to a particular place and are sed as static classes that can be accessed at any time even if they are not in the scene tree."
15 | config/version="1.2.5"
16 | config/features=PackedStringArray("4.5", "GL Compatibility")
17 | config/icon="uid://ceeyh135twaqe"
18 |
19 | [autoload]
20 |
21 | OmniKitWindowManager="*res://addons/omnikit/src/autoloads/viewport/window_manager.gd"
22 | OmniKitNetworkHandler="*res://addons/omnikit/src/autoloads/network/network_handler.gd"
23 | OmniKitGamepadControllerManager="*res://addons/omnikit/src/autoloads/gamepad/gamepad_controller_manager.gd"
24 | OmniKitEventBus="*res://addons/omnikit/src/autoloads/signals/event_bus.gd"
25 |
26 | [editor_plugins]
27 |
28 | enabled=PackedStringArray("res://addons/omnikit/plugin.cfg")
29 |
30 | [rendering]
31 |
32 | renderer/rendering_method="gl_compatibility"
33 | renderer/rendering_method.mobile="gl_compatibility"
34 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/files/json_reader.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitJSONHelper
2 |
3 |
4 | static func parse(path: String, encrypted_key: String = "") -> Variant:
5 | if not path.get_extension() == "json":
6 | push_error("OmniKitJSONHelper->parse: The file path %s provided does not have a valid JSON extension" % path)
7 | return {}
8 |
9 | var file: FileAccess
10 |
11 | if encrypted_key.is_empty():
12 | file = FileAccess.open(path, FileAccess.READ)
13 | else:
14 | file = FileAccess.open_encrypted_with_pass(path, FileAccess.READ, encrypted_key)
15 |
16 | var open_error: Error = FileAccess.get_open_error()
17 |
18 | if open_error != OK:
19 | push_error("OmniKitJSONHelper: An error happened opening json file %s, Error %d-%s" % [path, open_error, error_string(open_error)])
20 | return {}
21 |
22 | var json: JSON = JSON.new()
23 | var json_string_data: String = file.get_as_text()
24 | var json_error: Error = json.parse(json_string_data)
25 |
26 | if json_error == OK:
27 | assert(json.data is Array or json.data is Dictionary, "OmniKitJSONHelper->parse: Invalid data type, only JSON dictionary or arrays are supported")
28 | else:
29 | push_error("OmniKitJSONHelper->parse: JSON Parse Error: ", json.get_error_message(), " in ", json_string_data, " at line ", json.get_error_line())
30 |
31 | return json.data
32 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/camera_2d_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitCamera2DHelper
2 |
3 |
4 | func get_panning_camera_position(camera: Camera2D) -> Vector2:
5 | var viewport: Viewport = camera.get_viewport()
6 |
7 | var current_mouse_screen_position: Vector2 = viewport.get_mouse_position()
8 | var original_mouse_global_position: Vector2 = (viewport.get_screen_transform() * viewport.get_canvas_transform()).affine_inverse() * viewport.get_mouse_position()
9 | var final_mouse_global_position: Vector2 = (viewport.get_screen_transform() * viewport.get_canvas_transform()).affine_inverse() * current_mouse_screen_position
10 | var mouse_global_diff: Vector2 = original_mouse_global_position - final_mouse_global_position
11 | var new_camera_position: Vector2 = camera.global_position + mouse_global_diff
12 |
13 | if new_camera_position != camera.global_position:
14 | return new_camera_position
15 |
16 | return Vector2.ZERO
17 |
18 |
19 | func get_camera2d_frame(viewport: Viewport, selected_camera: Camera2D = null) -> Rect2:
20 | var camera_frame: Rect2 = viewport.get_visible_rect()
21 | var camera: Camera2D = viewport.get_camera_2d() if selected_camera == null else selected_camera
22 |
23 | if camera:
24 | camera_frame.position = camera.get_screen_center_position() - camera_frame.size / 2.0
25 |
26 | return camera_frame
27 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/dictionary_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitDictionaryHelper
2 |
3 |
4 | static func contain_all_keys(target: Dictionary, keys: Array[String]) -> bool:
5 | return keys.all(func(key: String): return key in target.keys())
6 |
7 |
8 | static func contain_any_key(target: Dictionary, keys: Array[String]) -> bool:
9 | return keys.any(func(key: String): return key in target.keys())
10 |
11 |
12 | static func reverse_key_value(source_dict: Dictionary) -> Dictionary:
13 | var reversed: Dictionary = {}
14 |
15 | for key in source_dict.keys():
16 | reversed[source_dict[key]] = key
17 |
18 | return reversed
19 |
20 | ## Transform the object used as dictionary key with the selected property, for example the object id
21 | static func transform_dictionary_key(source_dict: Dictionary, property: String) -> Dictionary:
22 | var new_dict: Dictionary = {}
23 |
24 | if source_dict.is_empty():
25 | return source_dict
26 |
27 | for key: Object in source_dict:
28 | if key.has_method("get_property_list"):
29 | new_dict[key[property]] = source_dict[key]
30 |
31 | return new_dict
32 |
33 |
34 | static func merge_recursive(dest: Dictionary, source: Dictionary) -> void:
35 | for key in source:
36 | if source[key] is Dictionary:
37 |
38 | if not dest.has(key):
39 | dest[key] = {}
40 |
41 | merge_recursive(dest[key], source[key])
42 | else:
43 | dest[key] = source[key]
44 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/name_generator.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitNameGenerator extends RefCounted
2 |
3 | var repository: OmniKitNameRepository
4 | var names_bag: OmniKitShuffleBag
5 | var surnames_bag: OmniKitShuffleBag
6 |
7 |
8 | func _init(_repository: OmniKitNameRepository) -> void:
9 | repository = _repository
10 |
11 | if repository.use_shuffle_bag:
12 | names_bag = OmniKitShuffleBag.new(repository.names)
13 | surnames_bag = OmniKitShuffleBag.new(repository.surnames)
14 |
15 |
16 | func generate(include_surname: bool = true) -> String:
17 | var result: String = ""
18 |
19 | if repository.names.size():
20 | result += generate_name()
21 |
22 | if include_surname and repository.surnames.size():
23 | result += " %s" % generate_surname()
24 |
25 | return result
26 |
27 |
28 | func generate_name() -> String:
29 | if repository.names.size():
30 | return names_bag.random() if repository.use_shuffle_bag else repository.names.pick_random()
31 |
32 | return ""
33 |
34 |
35 | func generate_surname() -> String:
36 | if repository.surnames.size():
37 | return surnames_bag.random() if repository.use_shuffle_bag else repository.surnames.pick_random()
38 |
39 | return ""
40 |
41 |
42 | func change_repository(new_repository: OmniKitNameRepository) -> OmniKitNameGenerator:
43 | repository = new_repository
44 | names_bag = OmniKitShuffleBag.new(repository.names)
45 | surnames_bag = OmniKitShuffleBag.new(repository.surnames)
46 |
47 | return self
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/semantic_version.gd:
--------------------------------------------------------------------------------
1 | ## https://semver.org/
2 | class_name OmniKitSemanticVersion extends RefCounted
3 |
4 | var major: int
5 | var minor: int
6 | var patch: int
7 |
8 | ## Here can goes the definition after the number like "-rc.1" or "-alpha.2"
9 | ## Examples: 1.0.0-rc.1 or 1.0.2-alpha.2
10 | var state: String = ""
11 |
12 | func _init(_major: int, _minor: int, _patch: int, _state: String = "") -> void:
13 | major = _major
14 | minor = _minor
15 | patch = _patch
16 | state = _state
17 |
18 |
19 | static func parse(value: String) -> OmniKitSemanticVersion:
20 | var regex: RegEx = RegEx.new()
21 | regex.compile("[a-zA-Z:,-]+")
22 |
23 | var cleaned: String = regex.sub(value, "", true)
24 | var parts: PackedStringArray = cleaned.split(".")
25 | var major: int = parts[0].to_int()
26 | var minor: int = parts[1].to_int()
27 | var patch: int = parts[2].to_int() if parts.size() > 2 else 0
28 |
29 | return OmniKitSemanticVersion.new(major, minor, patch)
30 |
31 |
32 | func equals(other: OmniKitSemanticVersion) -> bool:
33 | return major == other.major and minor == other.minor and patch == other.patch
34 |
35 |
36 | func is_greater(other: OmniKitSemanticVersion) -> bool:
37 | if major > other.major:
38 | return true
39 |
40 | if major == other.major and minor > other.minor:
41 | return true
42 |
43 | return major == other.major and minor == other.minor and patch > other.patch
44 |
45 |
46 | func _to_string() -> String:
47 | return "v%d.%d.%d%s" % [major, minor, patch, state]
48 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution
2 |
3 | Existing issues marked with a [help wanted tag](https://github.com/sempitern0/omnikit/labels/help%20wanted) are the best candidates for contributions. Issues with that tag are either not prioritised, or are in need of help with someone with more expertise within a certain area
4 |
5 | ## Reporting bugs
6 |
7 | 1. **[Follow the template for bug reports.](https://github.com/sempitern0/omnikit/issues/new?assignees=sempitern0&labels=%F0%9F%90%9B+bug&projects=&template=bug_report.md&title)**
8 | 2. **Golden rule** Open _one_ ussie for _one_ bug .
9 | 3. [Search for existing reports first.](https://github.com/sempitern0/omnikit/issues) If you found a similar issue in the tracker - better share your problem in the existing thread.
10 | 4. Besides the platform, specify as many specifics as you can _(if relevant)_. CPU/GPU, input methods _(controller, mouse)_ and so on.
11 | 5. A simple reproduction project helps more than any reproduction steps. Include it whenever you can. Examining the problem first-hand is the easiest way to solve it.
12 |
13 | ## Proposing features
14 |
15 | 1. **[Follow the template for feature requests.](https://github.com/sempitern0/omnikit/issues/new?assignees=sempitern0&labels=%E2%AD%90+feature&projects=&template=feature_request.md&title)**
16 | 2. [Search for existing proposals first.](https://github.com/sempitern0/omnikit/issues)
17 | 3. Request something with a real-world use-case. Abstract features may not be considered.
18 | 4. If you are capable of implementing said feature, include some code that demonstrates the finer details/nuances of said feature.
19 |
20 | ## Thanks you for contributing mindfully!
21 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/nodes/node_remover.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitNodeRemover
2 |
3 |
4 | static func is_node_valid(node: Node) -> bool:
5 | return node != null and is_instance_valid(node) and not node.is_queued_for_deletion()
6 |
7 |
8 | static func remove(node: Node) -> void:
9 | if is_node_valid(node):
10 | if node.is_inside_tree():
11 | node.queue_free()
12 | else:
13 | node.call_deferred("free")
14 |
15 | ## Exceptions are passed as [Area3D.new().get_class)
16 | static func remove_and_queue_free_children(node: Node, except: Array = []) -> void:
17 | if node.get_child_count() == 0:
18 | return
19 |
20 | var childrens = node.get_children().filter(func(child): return not child.get_class() in except)
21 | childrens.reverse()
22 |
23 | for child in childrens.filter(func(_node: Node): return is_node_valid(_node)):
24 | node.remove_child(child)
25 | remove(child)
26 |
27 | ## Exceptions are passed as [Area3D.new().get_class)
28 | static func queue_free_children(node: Node, except: Array = []) -> void:
29 | if node.get_child_count() == 0:
30 | return
31 |
32 | var childrens = node.get_children().filter(func(child): return not child.get_class() in except)
33 | childrens.reverse()
34 |
35 | for child in childrens.filter(func(_node: Node): return is_node_valid(_node)):
36 | remove(child)
37 |
38 | except.clear()
39 |
40 |
41 | ## Exceptions are passed as [Area3D.new().get_class)
42 | static func free_children(node: Node, except: Array = []) -> void:
43 | if node.get_child_count() == 0:
44 | return
45 |
46 | var childrens = node.get_children().filter(func(child): return not child.get_class() in except)
47 | childrens.reverse()
48 |
49 | for child in childrens.filter(func(_node: Node): return is_node_valid(_node)):
50 | child.free()
51 |
52 | except.clear()
53 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/hashset.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitHashSet extends RefCounted
2 |
3 | var hashset: Dictionary[Variant, bool] = {}
4 |
5 | func _init(init_values: Array[Variant] = []) -> void:
6 | merge(init_values)
7 |
8 |
9 | func merge(new_values: Array[Variant] = []) -> void:
10 | for value: Variant in new_values:
11 | add(value)
12 |
13 |
14 | func add(value: Variant) -> bool:
15 | if hashset.has(value):
16 | return false
17 |
18 | hashset[value] = true
19 | return true
20 |
21 |
22 | func duplicate() -> OmniKitHashSet:
23 | return OmniKitHashSet.new(hashset.keys().duplicate())
24 |
25 |
26 | func remove(value: Variant) -> bool:
27 | return hashset.erase(value)
28 |
29 |
30 | func has(value: Variant) -> bool:
31 | return hashset.has(value)
32 |
33 |
34 | func size() -> int:
35 | return hashset.size()
36 |
37 |
38 | func is_empty() -> bool:
39 | return hashset.is_empty()
40 |
41 |
42 | func equals(other: OmniKitHashSet) -> bool:
43 | if hashset.size() != other.size():
44 | return false
45 |
46 | var result: bool = true
47 |
48 | for value: Variant in hashset.keys():
49 | if not other.has(value):
50 | result = false
51 | break
52 |
53 | return result
54 |
55 |
56 | func to_array() -> Array[Variant]:
57 | return hashset.keys()
58 |
59 |
60 | func front() -> Variant:
61 | if hashset.is_empty():
62 | return null
63 |
64 | return hashset.keys().front()
65 |
66 |
67 | func back() -> Variant:
68 | if hashset.is_empty():
69 | return null
70 |
71 | return hashset.keys().back()
72 |
73 |
74 | func pop_back() -> Variant:
75 | var value: Variant = back()
76 | hashset.erase(value)
77 |
78 | return value
79 |
80 |
81 | func pop_front() -> Variant:
82 | var value: Variant = front()
83 | hashset.erase(value)
84 |
85 | return value
86 |
87 |
88 | func clear() -> void:
89 | hashset.clear()
90 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/motion/velocity_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitVelocityHelper
2 |
3 | enum SpeedUnit {
4 | KilometersPerHour,
5 | MilesPerHour,
6 | }
7 |
8 |
9 | static func current_speed_on(speed_unit: SpeedUnit, velocity: Variant) -> float:
10 | match speed_unit:
11 | SpeedUnit.KilometersPerHour:
12 | return current_speed_on_kilometers_per_hour(velocity)
13 | SpeedUnit.MilesPerHour:
14 | return current_speed_on_miles_per_hour(velocity)
15 | _:
16 | return 0.0
17 |
18 |
19 | static func current_speed_on_miles_per_hour(velocity: Variant) -> float:
20 | if velocity is Vector2 or velocity is Vector2i:
21 | return roundf(velocity.length() * OmniKitMathHelper.MetersPerSecondToMilePerHourFactor)
22 |
23 | elif velocity is Vector3:
24 | return roundf(Vector3(velocity.x, 0, velocity.z).length() * OmniKitMathHelper.MetersPerSecondToMilePerHourFactor)
25 |
26 | elif velocity is Vector3i:
27 | return roundf(Vector3i(velocity.x, 0, velocity.z).length() * OmniKitMathHelper.MetersPerSecondToMilePerHourFactor)
28 |
29 | elif velocity is float: ## We assume we received the velocity length
30 | return roundf(velocity * OmniKitMathHelper.MetersPerSecondToMilePerHourFactor)
31 | else:
32 | return 0.0
33 |
34 |
35 | static func current_speed_on_kilometers_per_hour(velocity: Variant) -> float:
36 | if velocity is Vector2 or velocity is Vector2i:
37 | return roundf(velocity.length() * OmniKitMathHelper.MetersPerSecondToKilometersPerHourFactor)
38 |
39 | elif velocity is Vector3:
40 | return roundf(Vector3(velocity.x, 0, velocity.z).length() * OmniKitMathHelper.MetersPerSecondToKilometersPerHourFactor)
41 |
42 | elif velocity is Vector3i:
43 | return roundf(Vector3i(velocity.x, 0, velocity.z).length() * OmniKitMathHelper.MetersPerSecondToKilometersPerHourFactor)
44 |
45 | elif velocity is float: ## We assume we received the velocity length
46 | return roundf(velocity * OmniKitMathHelper.MetersPerSecondToKilometersPerHourFactor)
47 | else:
48 | return 0.0
--------------------------------------------------------------------------------
/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
15 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/structures/uuid.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitUUID
2 |
3 | const BYTE_MASK: int = 0b11111111
4 |
5 | var _uuid: Array
6 |
7 | func _init(rng := RandomNumberGenerator.new()) -> void:
8 | _uuid = uuidbinrng(rng)
9 |
10 |
11 | static func uuidbin():
12 | randomize()
13 | # 16 random bytes with the bytes on index 6 and 8 modified
14 | return [
15 | randi() & BYTE_MASK, randi() & BYTE_MASK, randi() & BYTE_MASK, randi() & BYTE_MASK,
16 | randi() & BYTE_MASK, randi() & BYTE_MASK, ((randi() & BYTE_MASK) & 0x0f) | 0x40, randi() & BYTE_MASK,
17 | ((randi() & BYTE_MASK) & 0x3f) | 0x80, randi() & BYTE_MASK, randi() & BYTE_MASK, randi() & BYTE_MASK,
18 | randi() & BYTE_MASK, randi() & BYTE_MASK, randi() & BYTE_MASK, randi() & BYTE_MASK,
19 | ]
20 |
21 | static func uuidbinrng(rng: RandomNumberGenerator):
22 | rng.randomize()
23 | return [
24 | rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK,
25 | rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK, ((rng.randi() & BYTE_MASK) & 0x0f) | 0x40, rng.randi() & BYTE_MASK,
26 | ((rng.randi() & BYTE_MASK) & 0x3f) | 0x80, rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK,
27 | rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK, rng.randi() & BYTE_MASK,
28 | ]
29 |
30 | static func v4() -> String:
31 | # 16 random bytes with the bytes on index 6 and 8 modified
32 | var b = uuidbin()
33 |
34 | return '%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x' % [
35 | # low
36 | b[0], b[1], b[2], b[3],
37 |
38 | # mid
39 | b[4], b[5],
40 |
41 | # hi
42 | b[6], b[7],
43 |
44 | # clock
45 | b[8], b[9],
46 |
47 | # clock
48 | b[10], b[11], b[12], b[13], b[14], b[15]
49 | ]
50 |
51 | static func v4_rng(rng: RandomNumberGenerator) -> String:
52 | # 16 random bytes with the bytes on index 6 and 8 modified
53 | var b = uuidbinrng(rng)
54 |
55 | return '%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x' % [
56 | # low
57 | b[0], b[1], b[2], b[3],
58 |
59 | # mid
60 | b[4], b[5],
61 |
62 | # hi
63 | b[6], b[7],
64 |
65 | # clock
66 | b[8], b[9],
67 |
68 | # clock
69 | b[10], b[11], b[12], b[13], b[14], b[15]
70 | ]
71 |
72 |
73 | func as_array() -> Array:
74 | return _uuid.duplicate()
75 |
76 |
77 | func as_string() -> String:
78 | return '%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x' % [
79 | # low
80 | _uuid[0], _uuid[1], _uuid[2], _uuid[3],
81 |
82 | # mid
83 | _uuid[4], _uuid[5],
84 |
85 | # hi
86 | _uuid[6], _uuid[7],
87 |
88 | # clock
89 | _uuid[8], _uuid[9],
90 |
91 | # node
92 | _uuid[10], _uuid[11], _uuid[12], _uuid[13], _uuid[14], _uuid[15]
93 | ]
94 |
95 | func is_equal(other) -> bool:
96 | return _uuid == other._uuid
97 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/files/csv_reader.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitCSVReader
2 |
3 |
4 | ### CSV & TSV related ###
5 | static func read(path: String, as_dictionary: bool = true) -> Variant:
6 | var file_exists: bool = FileAccess.file_exists(path)
7 |
8 | if not _filepath_is_valid(path) or not file_exists:
9 | push_error("OmniKitCSVReader: Failed to load CSV because file doesn't exist or is corrupted. Path: %s", path)
10 | return ERR_PARSE_ERROR
11 |
12 | var delimiter: String = _detect_limiter_from_file(path)
13 | var lines: Array[Variant] = []
14 |
15 | var file: FileAccess = FileAccess.open(path, FileAccess.READ)
16 | var open_error: Error = FileAccess.get_open_error()
17 |
18 | if open_error != Error.OK:
19 | push_error("OmniKitCSVReader: ERROR_CODE[%s] Error opening file %s" % [error_string(open_error), path])
20 | return ERR_PARSE_ERROR
21 |
22 | while not file.eof_reached():
23 | var csv_line: PackedStringArray = file.get_csv_line(delimiter)
24 | var is_last_line: bool = csv_line.size() == 0 || (csv_line.size() == 1 && csv_line[0].is_empty())
25 |
26 | if is_last_line:
27 | continue
28 |
29 | var parsed_line: Array[Variant] = []
30 |
31 | for field: String in csv_line:
32 | if field.is_valid_int():
33 | parsed_line.append(int(field))
34 | elif field.is_valid_float():
35 | parsed_line.append(float(field))
36 | else:
37 | parsed_line.append(field)
38 |
39 | lines.append(parsed_line)
40 |
41 | file.close()
42 |
43 | # Remove trailing empty line
44 | if not lines.is_empty() and lines.back().size() == 1 and lines.back()[0] == "":
45 | lines.pop_back()
46 |
47 | if as_dictionary and lines.size() > 1:
48 | var result_as_array_of_dictionaries: Array[Dictionary] = []
49 | var column_headers = lines[0]
50 |
51 | for i in range(1, lines.size()):
52 | var current_dict: Dictionary = {}
53 | var current_fields = lines[i]
54 |
55 | if current_fields.size() > column_headers.size():
56 | push_error("OmniKitCSVReader: Reading the file %s it was detected a line that has more fields than column headers [] < []" % [path, column_headers.join(","), current_fields.join(",")])
57 | return ERR_PARSE_ERROR
58 |
59 | for header_index in column_headers.size():
60 | current_dict[column_headers[header_index]] = current_fields[header_index] if header_index < current_fields.size() else null
61 |
62 | result_as_array_of_dictionaries.append(current_dict)
63 |
64 | return result_as_array_of_dictionaries
65 |
66 | return lines
67 |
68 |
69 | static func _filepath_is_valid(path: String) -> bool:
70 | return not path.is_empty() and path.is_absolute_path() and ResourceLoader.exists(path)
71 |
72 |
73 | static func _detect_limiter_from_file(filename: String) -> String:
74 | match filename.get_extension().strip_edges().to_lower():
75 | "csv":
76 | return ","
77 | "tsv":
78 | return "\t"
79 |
80 | return ","
81 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/bit_stream.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitBitStream extends RefCounted
2 |
3 | var bits: Array
4 | var current_bit = 0
5 |
6 |
7 | func bits_left():
8 | return bits.size() - current_bit
9 |
10 |
11 | func push(value: int, range_max: int):
12 | var num_bits = ceil(log2(range_max))
13 |
14 | for digit in range(num_bits - 1, - 1, - 1):
15 | var bit = value & (1 << digit)
16 | push_bit(bit > 0)
17 |
18 |
19 | func push_bit(bit: bool):
20 | bits.push_back(bit)
21 |
22 |
23 | func pull(range_max:int)->int:
24 | var num_bits = ceil(log2(range_max))
25 | var value = 0
26 |
27 | for digit in range(num_bits - 1, - 1, - 1):
28 | var bit_state = int(bits[current_bit])
29 | current_bit += 1
30 |
31 | value += bit_state << digit
32 |
33 | return value
34 |
35 |
36 | func to_godot_string()-> String:
37 | var string = ""
38 | var byteArray = to_byte_array()
39 |
40 | for byte in byteArray:
41 | string += char(byte + 65)
42 |
43 | return string
44 |
45 | func from_godot_string(string: String):
46 | var byteArray = PackedByteArray()
47 |
48 | for c in string:
49 | byteArray.push_back(c.unicode_at(0) - 65)
50 |
51 | from_byte_array(byteArray)
52 |
53 |
54 | func pprint():
55 | var string = ""
56 |
57 | for bit in bits:
58 | if bit:
59 | string += "1"
60 | else :
61 | string += "0"
62 |
63 | return string
64 |
65 |
66 | func to_byte_array() -> PackedByteArray:
67 | var byte_array = PackedByteArray()
68 | var digit_count = 0
69 | var value = 0
70 |
71 | for bit in bits:
72 | digit_count += 1
73 | value = (value << 1) + int(bit)
74 |
75 | if digit_count == 8:
76 | digit_count = 0
77 | byte_array.append(value)
78 | value = 0
79 |
80 | if digit_count > 0:
81 | byte_array.append(value << (8 - digit_count))
82 |
83 | return byte_array
84 |
85 |
86 | func from_byte_array(byte_array: PackedByteArray) -> OmniKitBitStream:
87 | bits.clear()
88 |
89 | for byte in byte_array:
90 | for digit in range(7, - 1, - 1):
91 | push_bit(byte & (1 << digit))
92 |
93 | return self
94 |
95 |
96 | func to_utf8() -> String:
97 | var byte_array = to_byte_array()
98 |
99 | var file = FileAccess.open(OS.get_user_data_dir() + "/bitstream.dat", FileAccess.WRITE_READ)
100 | file.store_buffer(byte_array)
101 |
102 | var utf8_string = file.get_as_text(false)
103 | file.close()
104 |
105 | return utf8_string
106 |
107 |
108 | func from_utf8(utf8_string: String) -> OmniKitBitStream:
109 | return from_byte_array(utf8_string.to_utf8_buffer())
110 |
111 |
112 | func to_ascii_string()-> String:
113 | return to_byte_array().get_string_from_ascii()
114 |
115 |
116 | func from_ascii_string(string: String):
117 | return from_byte_array(string.to_ascii_buffer())
118 |
119 |
120 | func from_string(string: String):
121 | bits.clear()
122 |
123 | for s in string:
124 | if s == "1":
125 | push_bit(1)
126 | else :
127 | push_bit(0)
128 |
129 |
130 | func log2(number):
131 | return log(number) / log(2)
132 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/time/time_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitTimeHelper
2 |
3 | enum TimeUnit {
4 | Seconds,
5 | Milliseconds,
6 | Microseconds
7 | }
8 |
9 |
10 | static var conversions_to_seconds: Dictionary = {
11 | TimeUnit.Seconds: 1.0,
12 | TimeUnit.Milliseconds: 1_000.0,
13 | TimeUnit.Microseconds: 1_000_000.0,
14 | }
15 |
16 | """
17 | Formats a time value into a string representation of minutes, seconds, and optionally milliseconds.
18 |
19 | Args:
20 | time (float): The time value to format, in seconds.
21 | use_milliseconds (bool, optional): Whether to include milliseconds in the formatted string. Defaults to false.
22 |
23 | Returns:
24 | str: A string representation of the formatted time in the format "MM:SS" or "MM:SS:mm", depending on the value of use_milliseconds.
25 |
26 | Example:
27 | # Format 123.456 seconds without milliseconds
28 | var formatted_time = format_seconds(123.456)
29 | # Result: "02:03"
30 |
31 | # Format 123.456 seconds with milliseconds
32 | var formatted_time_with_ms = format_seconds(123.456, true)
33 | # Result: "02:03:45"
34 | """
35 | @warning_ignore("narrowing_conversion")
36 | static func format_seconds(time: float, use_milliseconds: bool = false) -> String:
37 | var minutes: int = floori(time / 60)
38 | var seconds: int = fmod(time, 60)
39 | var milliseconds: int = fmod(time, 1) * 100
40 |
41 | var result: String = "%02d:%02d" % [minutes, seconds]
42 |
43 | if(use_milliseconds):
44 | result += ":%02d" % milliseconds
45 |
46 | return result
47 |
48 | # Returns the amount of time passed since the engine started
49 | static func get_ticks(time_unit: TimeUnit = TimeUnit.Seconds) -> float:
50 | match time_unit:
51 | TimeUnit.Microseconds:
52 | return Time.get_ticks_usec()
53 | TimeUnit.Milliseconds:
54 | return Time.get_ticks_msec()
55 | TimeUnit.Seconds:
56 | return get_ticks_seconds()
57 | _:
58 | return get_ticks_seconds()
59 |
60 |
61 | ## Returns the conversion of [method Time.get_ticks_usec] to seconds.
62 | static func get_ticks_seconds() -> float:
63 | return Time.get_ticks_usec() / conversions_to_seconds[TimeUnit.Microseconds]
64 |
65 |
66 | static func convert_to_seconds(time: float, origin_unit: TimeUnit) -> float:
67 | return time / conversions_to_seconds[origin_unit]
68 |
69 |
70 | static func convert_to(time: float, origin_unit: TimeUnit, target_unit: TimeUnit) -> float:
71 | return convert_to_seconds(time, origin_unit) * conversions_to_seconds[target_unit]
72 |
73 |
74 | static func create_idle_timer(wait_time: float = 1.0, autostart: bool = false, one_shot: bool = false) -> Timer:
75 | var timer = Timer.new()
76 | timer.wait_time = wait_time
77 | timer.process_callback = Timer.TIMER_PROCESS_IDLE
78 | timer.autostart = autostart
79 | timer.one_shot = one_shot
80 |
81 | return timer
82 |
83 |
84 | static func create_physics_timer(wait_time: float = 1.0, autostart: bool = false, one_shot: bool = false) -> Timer:
85 | var timer = Timer.new()
86 | timer.wait_time = wait_time
87 | timer.process_callback = Timer.TIMER_PROCESS_PHYSICS
88 | timer.autostart = autostart
89 | timer.one_shot = one_shot
90 |
91 | return timer
92 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/hardware/hardware_detector.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitHardwareDetector
2 |
3 | static var engine_version: String = "Godot %s" % Engine.get_version_info().string
4 | static var device: String = OS.get_model_name()
5 | static var platform: String = OS.get_name()
6 | static var distribution_name: String = OS.get_distribution_name()
7 | static var video_adapter_name: String = RenderingServer.get_video_adapter_name()
8 | static var processor_name: String = OS.get_processor_name()
9 | static var processor_count: int = OS.get_processor_count()
10 | static var usable_threads: int = processor_count * 2 # I assume that each core has 2 threads
11 | static var computer_screen_size: Vector2i = DisplayServer.screen_get_size()
12 |
13 |
14 | static func renderer() -> String:
15 | return str(ProjectSettings.get_setting_with_override("rendering/renderer/rendering_method"))
16 |
17 |
18 | static func renderer_driver() -> String:
19 | match renderer():
20 | "forward_plus", "mobile":
21 | return ProjectSettings.get_setting_with_override("rendering/rendering_device/driver")
22 | "gl_compatibility":
23 | return ProjectSettings.get_setting_with_override("rendering/gl_compatibility/driver")
24 |
25 | return ""
26 |
27 |
28 | static func is_multithreading_enabled() -> bool:
29 | return ProjectSettings.get_setting("rendering/driver/threads/thread_model") == 2
30 |
31 |
32 | static func is_exported_release() -> bool:
33 | return OS.has_feature("template")
34 |
35 |
36 | static func renderer_is_forward() -> bool:
37 | return renderer().nocasecmp_to("forward_plus") == 0
38 |
39 |
40 | static func render_is_compatibility() -> bool:
41 | return renderer().nocasecmp_to("gl_compatibility") == 0
42 |
43 |
44 | static func renderer_is_mobile() -> bool:
45 | return renderer().nocasecmp_to("mobile") == 0
46 |
47 |
48 | static func has_fsr() -> bool:
49 | return OS.has_feature("fsr")
50 |
51 |
52 | static func is_steam_deck() -> bool:
53 | return OmniKitStringHelper.equals_ignore_case(distribution_name, "SteamOS") \
54 | or video_adapter_name.containsn("radv vangogh") \
55 | or OS.get_processor_name().containsn("amd custom apu 0405")
56 |
57 |
58 | static func is_web() -> bool:
59 | return OS.has_feature("Web")
60 |
61 |
62 | static func is_android() -> bool:
63 | return OS.get_name() == "Android"
64 |
65 |
66 | static func is_ios() -> bool:
67 | return OS.get_name() == "iOS"
68 |
69 |
70 | static func is_mobile() -> bool:
71 | if not OS.has_feature("web"):
72 | return false
73 |
74 | return is_android() or is_ios() \
75 | or (is_web() and OS.has_feature("web_android")) or (is_web() and OS.has_feature("web_ios")) \
76 | or JavaScriptBridge.eval("/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)", true)
77 |
78 |
79 | static func is_desktop() -> bool:
80 | return is_windows() or is_linux() or is_mac()
81 |
82 |
83 | static func is_windows() -> bool:
84 | return OS.get_name() in ["Windows", "UWP"]
85 |
86 |
87 | static func is_linux() -> bool:
88 | return OS.get_name() in ["Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD"]
89 |
90 |
91 | static func is_mac() -> bool:
92 | return OS.get_name() == "macOS"
93 |
94 |
95 | static func is_windows_web() -> bool:
96 | return is_web() and OS.has_feature("web_windows")
97 |
98 |
99 | static func is_linux_web() -> bool:
100 | return is_web() and OS.has_feature("web_linuxbsd")
101 |
102 |
103 | static func is_mac_web() -> bool:
104 | return is_web() and OS.has_feature("web_macos")
105 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/repositories/real_life/male_human_en.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="OmniKitNameRepository" load_steps=2 format=3 uid="uid://ttgdn4g6rndy"]
2 |
3 | [ext_resource type="Script" uid="uid://cejilr31xj65q" path="res://addons/omnikit/src/helpers/content/names/name_repository.gd" id="1_0n51f"]
4 |
5 | [resource]
6 | script = ExtResource("1_0n51f")
7 | id = &"male_human"
8 | gender = 0
9 | names = Array[String](["Liam", "Noah", "Oliver", "Elijah", "William", "James", "Benjamin", "Lucas", "Henry", "Alexander", "Mason", "Ethan", "Daniel", "Jacob", "Michael", "Matthew", "Joseph", "Samuel", "David", "John", "Ryan", "Owen", "Caleb", "Jackson", "Andrew", "Joshua", "Gabriel", "Isaac", "Lincoln", "Adrian", "Jeremiah", "Cameron", "Adam", "Wesley", "Nathan", "Dominic", "Xavier", "Raymond", "Easton", "Anthony", "Ezra", "Charles", "Josiah", "Christopher", "Sebastian", "Asher", "Miles", "Leo", "Marcus", "Timothy", "Joel", "Julian", "Angelo", "Vincent", "Maxwell", "Kevin", "Jeffrey", "Tyler", "Brandon", "Connor", "Carlos", "Bryan", "Jordan", "Dennis", "Ronnie", "Philip", "Aaron", "Nicholas", "Patrick", "Sean", "Wayne", "Billy", "Keith", "Paul", "Roy", "Victor", "Bruce", "Kyle", "Harold", "Bobby", "Bradley", "Roger", "Gerald", "Stephen", "Jesse", "Donald", "Shawn", "Arthur", "Clarence", "Tony", "Ralph", "Albert", "Frederick", "Earl", "Eugene", "Leroy", "Carl", "Reginald", "Vincent", "Curtis", "Barry", "Jay", "Bernard", "Franklin", "Clifford", "Harvey", "Neal", "Russell", "Kirk", "Glen", "Lester", "Marvin", "Stanley", "Ward", "Ben", "Kent", "Brett", "Dale", "Drew", "Grant", "Jed", "Kurt", "Lloyd", "Ross", "Todd", "Warren", "Chad", "Derek", "Eric", "Greg", "Kent", "Lance", "Mark", "Perry", "Scott", "Shane", "Travis", "Troy", "Blake", "Cody", "Dustin", "Garrett", "Justin", "Spencer", "Wyatt", "Zachary", "Chase", "Clayton", "Devon", "Jared", "Trevor", "Wesley", "Caleb", "Colton", "Dalton", "Keegan", "Preston", "Trenton", "Tristan", "Ashton", "Brendan", "Bryce", "Declan", "Hayden", "Jasper", "Kaden", "Landon", "Micah", "Ronan", "Silas"])
10 | surnames = Array[String](["Smith", "Johnson", "Williams", "Brown", "Jones", "Garcia", "Miller", "Davis", "Rodriguez", "Martinez", "Hernandez", "Lopez", "Gonzalez", "Wilson", "Anderson", "Thomas", "Taylor", "Moore", "Jackson", "Martin", "Lee", "Perez", "Thompson", "White", "Harris", "Sanchez", "Clark", "Ramirez", "Lewis", "Robinson", "Walker", "Young", "Allen", "King", "Wright", "Scott", "Torres", "Green", "Adams", "Baker", "Nelson", "Rivera", "Hill", "Campbell", "Mitchell", "Roberts", "Gomez", "Phillips", "Evans", "Turner", "Diaz", "Parker", "Cruz", "Edwards", "Morris", "Collins", "Flores", "Morales", "Coleman", "Rogers", "Gutierrez", "Ortiz", "Ross", "Myers", "Powell", "Sullivan", "Kennedy", "Bell", "Chavez", "Hayes", "Chapman", "Webb", "Ellis", "Ruiz", "Bishop", "Sanders", "Gray", "Little", "Vargas", "Price", "McCarthy", "Medina", "Navarro", "Carroll", "Reed", "Stone", "Ryan", "Fernandez", "Arnold", "Spencer", "Peters", "Hawkins", "Grant", "Lawson", "Bailey", "Dunn", "Vega", "Cook", "Romero", "Griffin", "Garza", "Hayes", "Wheeler", "Jenkins", "Parks", "Lambert", "Fletcher", "Watts", "Andrews", "Burns", "Bishop", "Simmons", "Todd", "Crawford", "Porter", "Reynolds", "Villa", "Oneal", "Berry", "Blackwell", "Hendrix", "Walls", "Salazar", "Nixon", "Davenport", "Waters", "Nichols", "Bridges", "Summers", "West", "Frye", "Hardy", "Marshall", "Singleton", "Townsend", "Wiley", "Kent", "Preston", "Lane", "Nicholson", "Underwood", "Douglas", "Harrison", "Rhodes", "Justice", "Sheppard", "Booker", "Washington", "Jefferson", "Madison", "Monroe", "Adams", "Lincoln", "Grant", "Wilson", "Roosevelt", "Kennedy"])
11 | metadata/_custom_type_script = "uid://cejilr31xj65q"
12 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/camera_3d_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitCamera3DHelper
2 |
3 |
4 | static func center_by_ray_origin(camera: Camera3D) -> Vector3:
5 | return camera.project_ray_origin(Vector2.ZERO)
6 |
7 |
8 | static func center_by_origin(camera: Camera3D) -> Vector3:
9 | return camera.global_transform.origin
10 |
11 |
12 | static func forward_direction(camera: Camera3D) -> Vector3:
13 | return Vector3.FORWARD.z * camera.global_transform.basis.z.normalized()
14 |
15 |
16 | static func is_facing_camera(camera: Camera3D, node: Node) -> bool:
17 | return camera.global_position.dot(node.basis.z) < 0
18 |
19 |
20 | static func world_to_screen_position(world_position: Vector3, camera: Camera3D) -> Vector2:
21 | return camera.unproject_position(world_position)
22 |
23 |
24 | static func world_position_to_ui(ui_element: Control, world_position: Vector3, camera: Camera3D) -> void:
25 | ui_element.visible = not camera.is_position_behind(world_position)
26 | ui_element.position = world_to_screen_position(world_position, camera)
27 |
28 |
29 | static func project_raycast(
30 | viewport: Viewport,
31 | from: Vector3,
32 | to: Vector3,
33 | collide_with_bodies: bool = true,
34 | collide_with_areas: bool = false,
35 | collision_mask: int = 1
36 | ) -> OmniKitRaycastResult:
37 |
38 | var ray_query: PhysicsRayQueryParameters3D = PhysicsRayQueryParameters3D.create(
39 | from,
40 | to,
41 | collision_mask
42 | )
43 |
44 | ray_query.collide_with_bodies = collide_with_bodies
45 | ray_query.collide_with_areas = collide_with_areas
46 |
47 | var result: Dictionary = (viewport.get_camera_3d().get_world_3d() if viewport is SubViewport else viewport.get_world_3d()).direct_space_state.intersect_ray(ray_query)
48 |
49 | return OmniKitRaycastResult.new(result)
50 |
51 |
52 | static func project_raycast_from_camera_center(
53 | camera: Camera3D,
54 | distance: float = 1000.0,
55 | collide_with_bodies: bool = true,
56 | collide_with_areas: bool = false,
57 | collision_mask: int = 1
58 | ) -> OmniKitRaycastResult:
59 |
60 | var viewport: Viewport = camera.get_viewport()
61 | var screen_center: Vector2i = viewport.get_visible_rect().size / 2
62 | var origin = camera.project_ray_origin(screen_center)
63 | var to: Vector3 = origin + camera.project_ray_normal(screen_center) * distance
64 |
65 | return project_raycast(viewport, origin, to, collide_with_bodies, collide_with_areas, collision_mask)
66 |
67 |
68 | static func project_raycast_to_mouse(
69 | camera: Camera3D,
70 | distance: float = 1000.0,
71 | collide_with_bodies: bool = true,
72 | collide_with_areas: bool = false,
73 | collision_mask: int = 1
74 | ) -> OmniKitRaycastResult:
75 |
76 | var viewport: Viewport = camera.get_viewport()
77 | var mouse_position: Vector2 = viewport.get_mouse_position()
78 |
79 | var world_space: PhysicsDirectSpaceState3D = (camera.get_world_3d() if viewport is SubViewport else viewport.get_world_3d()).direct_space_state
80 | var from: Vector3 = camera.project_ray_origin(mouse_position)
81 | var to: Vector3 = camera.project_position(mouse_position, distance)
82 |
83 | return project_raycast(viewport, from, to, collide_with_bodies, collide_with_areas, collision_mask)
84 |
85 |
86 | static func camera_snap_to_grid(camera: Camera3D, target: Node3D, grid_size: float, ground_y_level: float = 0.0) -> Vector3:
87 | assert(grid_size > 0, "OmniKitCamera3DHelper->camera_snap_to_grid: The grid size is zero or below, make sure the size is greater than 0")
88 |
89 | var raycast: OmniKitRaycastResult = OmniKitCamera3DHelper.project_raycast_to_mouse(camera)
90 | var grid: Vector3 = (raycast.position / grid_size).floor()
91 |
92 | var snap_position: Vector3 = Vector3(grid.x, 0.0, grid.z) * grid_size
93 | snap_position.y = ground_y_level
94 |
95 | return snap_position
96 |
--------------------------------------------------------------------------------
/addons/omnikit/src/autoloads/signals/event_bus.gd:
--------------------------------------------------------------------------------
1 | ## This EventBus does not replace the built-in signal system from Godot but provides a way
2 | ## to connect events on scripts that do not need to be in the SceneTree
3 | ## ----------------------------------------------------------------------
4 | ## It's recommended to create a separate script Events.gd to save your signal names as constants
5 | ## So OmniKitEventBus.subscribe(&"event_name", ...args) becomes OmniKitEventBus.subscribe(Events.score, ...args)
6 | ## This gives the advantage of only having to change the names of events in one place.
7 | extends Node
8 |
9 | class EventListener:
10 | var id: int
11 | var method: Callable
12 | var priority: int = 0
13 | var flag: ConnectFlags = ConnectFlags.CONNECT_PERSIST
14 |
15 |
16 | func _init(_method: Callable, _priority: int = 0, _flag: ConnectFlags = CONNECT_PERSIST) -> void:
17 | id = _method.get_object_id()
18 | method = _method
19 | priority = _priority
20 | flag = _flag
21 |
22 | func call_method(payload: Array[Variant]) -> void:
23 | method.callv(payload)
24 |
25 | class EventRecord:
26 | var event: StringName
27 | var listener: EventListener
28 | var timestamp: float
29 | var datetime: String
30 |
31 | func _init(_event: StringName, _listener: EventListener) -> void:
32 | event = _event
33 | listener = _listener
34 | timestamp = Time.get_unix_time_from_system()
35 | datetime = Time.get_datetime_string_from_unix_time(timestamp)
36 |
37 |
38 | ## Array[EventListener]
39 | var events: Dictionary[StringName, Array] = {}
40 | var event_history: Array[EventRecord] = []
41 | var max_event_history_length: int = 50:
42 | set(value):
43 | max_event_history_length = maxi(0, value)
44 |
45 |
46 | func subscribe(event: StringName, method: Callable, priority: int = 0, flag: ConnectFlags = CONNECT_PERSIST) -> void:
47 | if method.is_valid():
48 | var listener: EventListener = EventListener.new(method, priority, flag)
49 |
50 | if events.has(event):
51 | if not _event_has_method(event, method):
52 | events[event].append(listener)
53 | else:
54 | events[event] = [listener]
55 |
56 | events[event].sort_custom(_sort_listeners_by_priority)
57 |
58 |
59 | func subscribe_once(event: StringName, method: Callable, priority: int = 0) -> void:
60 | subscribe(event, method, priority, CONNECT_ONE_SHOT)
61 |
62 |
63 | func unsubscribe(event: StringName, method: Callable) -> void:
64 | if events.has(event):
65 | events[event] = events[event]\
66 | .filter(func(listener: EventListener): return listener.id != method.get_object_id())
67 |
68 |
69 | func publish(event: StringName, ...payload) -> void:
70 | if events.has(event):
71 | for subscriber: EventListener in events[event]:
72 | match subscriber.flag:
73 | CONNECT_ONE_SHOT:
74 | subscriber.call_method(payload)
75 | unsubscribe(event, subscriber.method)
76 | CONNECT_DEFERRED:
77 | subscriber.call_deferred("call_method", payload)
78 | _:
79 | subscriber.call_method(payload)
80 |
81 | record_event(event, subscriber)
82 |
83 |
84 | func record_event(event: StringName, subscriber: EventListener) -> void:
85 | if max_event_history_length > 0:
86 | if event_history.size() + 1 > max_event_history_length:
87 | event_history.pop_front()
88 |
89 | event_history.append(EventRecord.new(event, subscriber))
90 |
91 |
92 | func flush_event_history() -> void:
93 | event_history.clear()
94 |
95 |
96 | func _event_has_method(event: StringName, method: Callable) -> bool:
97 | return method.get_object_id() in events[event].map(func(listener: EventListener): return listener.id)
98 |
99 |
100 | func _sort_listeners_by_priority(a: EventListener, b: EventListener) -> bool:
101 | return a.id < b.id
102 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/color/color_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitColorHelper
2 |
3 | const ColorPalettesPath: String = "res://addons/omnikit/src/helpers/color/palettes"
4 | const GradientsPath: String = "res://addons/omnikit/src/helpers/color/gradients"
5 |
6 | enum ColorGenerationMethod {
7 | RandomRGB,
8 | GoldenRatioHSV
9 | }
10 |
11 |
12 | static func get_palette(id: StringName) -> OmniKitColorPalette:
13 | var regex = RegEx.new()
14 | regex.compile(".tres$")
15 |
16 | for color_palette_path: String in OmniKitFileHelper.get_files_recursive(ColorPalettesPath, regex):
17 | var color_palette: OmniKitColorPalette = ResourceLoader.load(color_palette_path, "", ResourceLoader.CACHE_MODE_REUSE)
18 |
19 | if color_palette.id == id:
20 | return color_palette
21 |
22 | return null
23 |
24 |
25 | static func get_gradient(id: StringName) -> OmniKitColorGradient:
26 | var regex = RegEx.new()
27 | regex.compile(".tres$")
28 |
29 | for gradient_path: String in OmniKitFileHelper.get_files_recursive(GradientsPath, regex):
30 | var gradient: OmniKitColorGradient = ResourceLoader.load(gradient_path, "", ResourceLoader.CACHE_MODE_REUSE)
31 |
32 | if gradient.id == id:
33 | return gradient
34 |
35 | return null
36 |
37 |
38 | static func generate_random_colors(method: ColorGenerationMethod, number_of_colors: int = 12, saturation: float = 0.5, value: float = 0.95) -> PackedColorArray:
39 | var colors: PackedColorArray = PackedColorArray()
40 |
41 | match method:
42 | ColorGenerationMethod.RandomRGB:
43 | return generate_random_rgb_colors(number_of_colors)
44 | ColorGenerationMethod.GoldenRatioHSV:
45 | return generate_random_hsv_colors(number_of_colors, saturation, value)
46 |
47 | return colors
48 |
49 | # Using ideas from https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
50 | static func generate_random_hsv_colors(number_of_colors: int = 12, saturation: float = 0.5, value: float = 0.95) -> PackedColorArray:
51 | var colors: PackedColorArray = PackedColorArray()
52 |
53 | for i: int in number_of_colors:
54 | var h = randf()
55 | h += OmniKitMathHelper.GoldenRatioConjugate
56 | h = fmod(h, 1.0)
57 |
58 | colors.append(Color.from_hsv(h, saturation, value))
59 |
60 | return colors
61 |
62 | # Using ideas from https://www.iquilezles.org/www/articles/palettes/palettes.htm
63 | static func generate_random_rgb_colors(number_of_colors: int = 12, darkened_value: float = 0.2) -> PackedColorArray:
64 | var a = Vector3(randf_range(0.0, 0.5), randf_range(0.0, 0.5), randf_range(0.0, 0.5))
65 | var b = Vector3(randf_range(0.1, 0.6), randf_range(0.1, 0.6), randf_range(0.1, 0.6))
66 | var c = Vector3(randf_range(0.15, 0.8), randf_range(0.15, 0.8), randf_range(0.15, 0.8))
67 | var d = Vector3(randf_range(0.4, 0.6), randf_range(0.4, 0.6), randf_range(0.4, 0.6))
68 |
69 | var colors: PackedColorArray = PackedColorArray()
70 | var n: float = float(number_of_colors - 1.0)
71 |
72 | for i: int in number_of_colors:
73 | var vec3 = Vector3(
74 | (a.x + b.x * cos(TAU * (c.x * float(i / n) + d.x))) + (i / n),
75 | (a.y + b.y * cos(TAU * (c.y * float(i / n) + d.y))) + (i / n),
76 | (a.z + b.z * cos(TAU * (c.z * float(i / n) + d.z))) + (i / n)
77 | )
78 |
79 | colors.append(Color(vec3.x, vec3.y, vec3.z).darkened(darkened_value))
80 |
81 | return colors
82 |
83 |
84 | ## Consider exploring alternative color difference metrics like Delta-E or CIELAB if precise color matching is crucial
85 | static func colors_are_similar(color_a: Color, color_b: Color, tolerance: float = 100.0) -> bool:
86 | var v1: Vector4 = Vector4(color_a.r, color_a.g, color_a.b, color_a.a)
87 | var v2: Vector4 = Vector4(color_b.r, color_b.g, color_b.b, color_b.a)
88 |
89 | return v2.distance_to(v1) <= (tolerance / 255.0)
90 |
91 |
92 | static func color_from_vector(vec) -> Color:
93 | if vec is Vector3:
94 | return Color(vec.x, vec.y, vec.z)
95 | elif vec is Vector4:
96 | return Color(vec.x, vec.y, vec.z, vec.w)
97 | else:
98 | return Color.WHITE
99 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/repositories/real_life/female_human_en.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="NameRepository" load_steps=2 format=3 uid="uid://b0b3ljthp0ntg"]
2 |
3 | [ext_resource type="Script" uid="uid://cejilr31xj65q" path="res://addons/omnikit/src/helpers/content/names/name_repository.gd" id="1_u8g7u"]
4 |
5 | [resource]
6 | script = ExtResource("1_u8g7u")
7 | id = &"female_human"
8 | use_shuffle_bag = true
9 | region = &"en"
10 | gender = 1
11 | names = Array[String](["Olivia", "Emma", "Amelia", "Sophia", "Isabella", "Ava", "Mia", "Charlotte", "Harper", "Evelyn", "Abigail", "Emily", "Elizabeth", "Mila", "Ella", "Scarlett", "Eleanor", "Madison", "Lily", "Aurora", "Hazel", "Nora", "Chloe", "Violet", "Willow", "Stella", "Luna", "Grace", "Victoria", "Riley", "Zoey", "Penelope", "Layla", "Naomi", "Lucy", "Bella", "Natalie", "Daisy", "Everly", "Paisley", "Ivy", "Sarah", "Autumn", "Ruby", "Sadie", "Alice", "Clara", "Audrey", "Samantha", "June", "Skylar", "Elsie", "Adeline", "Piper", "Leah", "Josephine", "Emery", "Anna", "Quinn", "Maya", "Cornelia", "Brynn", "Sawyer", "Olive", "Rosie", "Freya", "Adalyn", "Aubrey", "Isla", "Summer", "Cecilia", "Eloise", "Jade", "Asher", "Adeline", "Thea", "Eleanor", "Nova", "Hazel", "Iris", "Athena", "Hadley", "Juniper", "Winter", "Wren", "Ophelia", "Rosemary", "Vivian", "Josephine", "Genevieve", "Callie", "Blair", "Briar", "Magnolia", "Marlowe", "Beatrice", "Theodora", "Rowan", "Sylvie", "Esther", "Juliet", "Eliza", "Adelaide", "Harriet", "Imogen", "Phoebe", "Annabelle", "Isabelle", "Josephine", "Eleanor", "Frances", "Louisa", "Caroline", "Margaret", "Beatrice", "Eleanor", "Florence", "Hazel", "Ivy", "Juniper", "Lavender", "Olive", "Poppy", "Rose", "Violet", "Willow", "Daisy", "Lily", "Magnolia", "Rosemary", "Summer", "Winter", "Autumn", "Skye", "River", "Ocean", "Luna", "Stella", "Aurora", "Nova", "Lyra", "Celeste", "Astrid", "Freya", "Ingrid", "Signe", "Solveig", "Thora", "Elara", "Anya", "Sasha", "Vera", "Nadia", "Olga", "Irina", "Zoya", "Mara", "Nina", "Vera", "Ada", "Clara", "Elsa", "Greta", "Hilda", "Ida", "Ingrid", "Liselotte", "Marta", "Sigrid", "Astrid", "Solveig", "Vendela", "Ebba", "Liv", "Saga", "Tove", "Ylva", "Alma", "Astrid", "Idun", "Linnea", "Maja", "Nora", "Siri", "Tuva", "Wilma", "Ada", "Alice", "Beatrice", "Clara", "Eleanor", "Florence", "Grace", "Harriet", "Imogen", "Josephine", "Louisa", "Margaret", "Phoebe", "Rosemary", "Theodora", "Vivian", "Adeline", "Audrey", "Cecilia", "Eloise", "Genevieve", "Juliet", "Lydia", "Penelope", "Scarlett", "Victoria", "Annabelle", "Isabelle", "Natalie", "Samantha", "Valerie", "Beatrice", "Eleanor", "Frances", "Hazel", "Ivy", "Juniper", "Lavender", "Olive", "Poppy", "Rose", "Violet", "Willow"])
12 | surnames = Array[String](["Smith", "Johnson", "Williams", "Brown", "Jones", "Miller", "Davis", "Wilson", "Anderson", "Thomas", "Taylor", "Moore", "Jackson", "Martin", "Lee", "White", "Harris", "Clark", "Lewis", "Robinson", "Walker", "Young", "Allen", "King", "Wright", "Scott", "Green", "Adams", "Baker", "Nelson", "Hill", "Campbell", "Mitchell", "Roberts", "Phillips", "Evans", "Turner", "Parker", "Edwards", "Morris", "Collins", "Rogers", "Ross", "Myers", "Powell", "Sullivan", "Kennedy", "Bell", "Hayes", "Chapman", "Webb", "Ellis", "Bishop", "Sanders", "Gray", "Little", "Price", "McCarthy", "Carroll", "Reed", "Stone", "Arnold", "Spencer", "Peters", "Hawkins", "Grant", "Lawson", "Bailey", "Dunn", "Cook", "Griffin", "Wheeler", "Jenkins", "Parks", "Lambert", "Fletcher", "Watts", "Andrews", "Burns", "Bishop", "Simmons", "Todd", "Crawford", "Porter", "Reynolds", "Oneal", "Berry", "Blackwell", "Hendrix", "Walls", "Nixon", "Davenport", "Waters", "Nichols", "Bridges", "Summers", "West", "Frye", "Hardy", "Marshall", "Singleton", "Townsend", "Wiley", "Kent", "Preston", "Lane", "Nicholson", "Underwood", "Douglas", "Harrison", "Rhodes", "Justice", "Sheppard", "Booker", "Washington", "Jefferson", "Madison", "Monroe", "Lincoln", "Grant", "Roosevelt", "Kennedy", "Carter", "Ford", "Reagan", "Bush", "Clinton", "Obama"])
13 | metadata/_custom_type_script = "uid://cejilr31xj65q"
14 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/math/bezier_curve.gd:
--------------------------------------------------------------------------------
1 | class OmniKitBezierCurve:
2 |
3 | static var maximum_control_points: int = 18
4 | static var factorial: Array[float] = OmniKitMathHelper.factorials_from(maximum_control_points)
5 |
6 | static func change_maximum_control_points(points: int) -> void:
7 | maximum_control_points = max(3, points)
8 |
9 | ## This function shall return the interpolated point where t must be between 0 and 1 both inclusive
10 | static func point_3(t: float, control_points: Array[Vector3] = []) -> Vector3:
11 | t = clamp(t, 0.0, 1.0)
12 |
13 | var n: int = control_points.size() - 1
14 |
15 | if n > maximum_control_points:
16 | push_warning("OmniKitBezierCurve: There more than %d control points (%d) in this bezier curve calculation, these points will be ignored" % [maximum_control_points, n])
17 | control_points = control_points.slice(0 , maximum_control_points + 1)
18 |
19 | if t <= 0:
20 | return control_points.front()
21 |
22 | if t >= 0:
23 | return control_points.back()
24 |
25 | var point := Vector3()
26 |
27 | for i in range(control_points.size()):
28 | point += Vector3.ONE * (bernstein(n, i, t) * control_points[i])
29 |
30 | return point
31 |
32 | ## Calculate all the points for the entire curve
33 | ## from t = 0 to t = 1 with and increment by default of 0.01
34 | static func point_list_3(control_points: Array[float], interval: float = 0.01) -> Array[Vector3]:
35 | var n: int = control_points.size() - 1
36 |
37 | if n > maximum_control_points:
38 | push_warning("OmniKitBezierCurve: There more than %d control points (%d) in this bezier curve calculation, these points will be ignored" % [maximum_control_points, n])
39 | control_points = control_points.slice(0 , maximum_control_points + 1)
40 |
41 | var points: Array[Vector3] = []
42 | var t := 0.0
43 |
44 | while t <= 1.0 + interval - 0.0001:
45 | var point := Vector3()
46 |
47 | for i in range(control_points.size()):
48 | point += Vector3.ONE * (bernstein(n, i, t) * control_points[i])
49 |
50 |
51 | points.append(point)
52 | t += interval
53 |
54 | return points
55 |
56 |
57 | static func point_2(t: float, control_points: Array[Vector2] = []) -> Vector2:
58 | t = clamp(t, 0.0, 1.0)
59 |
60 | var n: int = control_points.size() - 1
61 |
62 | if n > maximum_control_points:
63 | push_warning("OmniKitBezierCurve: There more than %d control points (%d) in this bezier curve calculation, these points will be ignored" % [maximum_control_points, n])
64 | control_points = control_points.slice(0 , maximum_control_points + 1)
65 |
66 | if t <= 0:
67 | return control_points.front()
68 |
69 | if t >= 0:
70 | return control_points.back()
71 |
72 | var point := Vector2()
73 |
74 | for i in range(control_points.size()):
75 | point += Vector2.ONE * (bernstein(n, i, t) * control_points[i])
76 |
77 | return point
78 |
79 | ## Calculate all the points for the entire curve
80 | ## from t = 0 to t = 1 with and increment by default of 0.01
81 | static func point_list_2(control_points: Array[float], interval: float = 0.01) -> Array[Vector2]:
82 | var n: int = control_points.size() - 1
83 |
84 | if n > maximum_control_points:
85 | push_warning("OmniKitBezierCurve: There more than %d control points (%d) in this bezier curve calculation, these points will be ignored" % [maximum_control_points, n])
86 | control_points = control_points.slice(0 , maximum_control_points + 1)
87 |
88 | var points: Array[Vector2] = []
89 | var t := 0.0
90 |
91 | while t <= 1.0 + interval - 0.0001:
92 | var point := Vector2()
93 |
94 | for i in range(control_points.size()):
95 | point += Vector2.ONE * (bernstein(n, i, t) * control_points[i])
96 |
97 |
98 | points.append(point)
99 | t += interval
100 |
101 | return points
102 |
103 |
104 | ## Berstein basic points
105 | static func bernstein(n: int, i: int, t: float) -> float:
106 | var t_i: float = pow(t, i)
107 | var t_n_minus_i = pow((1 - t), (n - i))
108 | var basis: float = binomial(n, i) * t_i * t_n_minus_i
109 |
110 | return basis
111 |
112 |
113 | static func binomial(n: int, i: int) -> float:
114 | var a1: float = factorial[n]
115 | var a2: float = factorial[i]
116 | var a3: float = factorial[n - i]
117 |
118 | var ni: float = a1 / (a2 * a3)
119 |
120 | return ni
121 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/repositories/fantasy/female_orc.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="NameRepository" load_steps=2 format=3 uid="uid://dgabd6yqr3dst"]
2 |
3 | [ext_resource type="Script" uid="uid://cejilr31xj65q" path="res://addons/omnikit/src/helpers/content/names/name_repository.gd" id="1_smvh8"]
4 |
5 | [resource]
6 | script = ExtResource("1_smvh8")
7 | id = &"female_orc"
8 | use_shuffle_bag = true
9 | region = &"en"
10 | gender = 1
11 | names = Array[String](["Grizelda", "Thagra", "Snaga", "Gnasha", "Gorga", "Moga", "Ruka", "Borga", "Skraga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla", "Gorga", "Mogka", "Rukka", "Borka", "Skruga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla", "Gorga", "Mogka", "Rukka", "Borka", "Skruga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla", "Gorga", "Mogka", "Rukka", "Borka", "Skruga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla", "Gorga", "Mogka", "Rukka", "Borka", "Skruga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla", "Gorga", "Mogka", "Rukka", "Borka", "Skruga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla", "Gorga", "Mogka", "Rukka", "Borka", "Skruga", "Zuga", "Ooga", "Grima", "Fraza", "Kruga", "Zoga", "Murga", "Ragga", "Bluga", "Snarla", "Thokka", "Ugluka", "Gruma", "Skarra", "Moka", "Roga", "Buga", "Stuga", "Zaga", "Gronka", "Tharga", "Snorta", "Gnarla"])
12 | surnames = Array[String](["Skullcleaver", "Ironfist", "Bloodreaper", "Stonehide", "Warjaw", "Grimclaw", "Bonecrusher", "Axefist", "Ragehammer", "Doomfang", "Gutrender", "Fleshgouger", "Skullgouger", "Ironwill", "Bloodtooth", "Stonejaw", "Warclaw", "Grimhide", "Bonefist", "Axeclaw", "Ragejaw", "Doomhide", "Gutcleaver", "Fleshrender", "Skullbreaker", "Ironrage", "Bloodaxe", "Stoneclaw", "Warfist", "Grimjaw", "Bonehammer", "Axewarrior", "Ragehide", "Doomfist", "Gutripper", "Flesheater", "Skullfang", "Ironhammer", "Bloodclaw", "Stoneaxe", "Warhammer", "Grimfist", "Bonejaw", "Axeblood", "Ragefang", "Doomclaw", "Gutrender", "Fleshwound", "Skullhide", "Ironheart", "Bloodrage", "Stonefury", "Waraxe", "Grimhowl", "Boneaxe", "Axegrim", "Ragefist", "Doomshriek", "Gutgouger", "Flesheater", "Skullclaw", "Ironmaiden", "Bloodforged", "Stonebreaker", "Warbringer", "Grimtide", "Bonecarver", "Axewielder", "Ragebinder", "Doomseer", "Gutspiller", "Fleshcrafter", "Skullshatter", "Ironclad", "Bloodcaller", "Stoneguard", "Warshaper", "Grimwalker", "Boneknitter", "Axethrower", "Ragefueled", "Doomwhisper", "Gutstripper", "Fleshrender", "Skullbinder", "Ironbrand", "Bloodletter", "Stonehewn", "Warforged", "Grimstalker", "Bonegrinder", "Axesmiter", "Ragehowler", "Doomweaver", "Gutburster", "Fleshpeeler", "Skullcarver", "Ironscale", "Blooddrinker", "Stonefist", "Warcaller", "Grimwielder", "Bonecleaver", "Axebinder", "Rageforged", "Doomguard", "Gutripper", "Fleshbinder", "Skullrender", "Ironshaper", "Bloodhowler", "Stonecarver", "Warstalker", "Grimsmiter", "Bonehew", "Axecaller", "Rageguard", "Doomforged", "Gutshredder", "Fleshstripper", "Skullstalker", "Ironweaver", "Bloodwielder", "Stonebinder", "Warcleaver", "Grimbinder", "Boneforged", "Axeguard", "Ragecleaver", "Doomcaller", "Gutcarver", "Fleshguard", "Skullwielder", "Ironcaller", "Bloodguard", "Stonecleaver", "Warbinder", "Grimguard", "Bonebinder", "Axeweaver", "Ragecarver", "Doomwielder", "Gutguard", "Fleshcleaver", "Skullguard", "Ironbinder", "Bloodcarver", "Stoneguard", "Warweaver", "Grimcarver", "Boneguard", "Axecarver", "Rageguard", "Doomcarver", "Gutweaver", "Fleshweaver", "Skullweaver", "Ironcarver", "Bloodweaver", "Stoneweaver", "Warcarver", "Grimweaver", "Boneweaver", "Axeweaver", "Rageweaver", "Doomweaver", "Gutweaver", "Fleshcarver", "Skullcarver", "Ironweaver", "Bloodcarver", "Stonecarver", "Warweaver", "Grimcarver"])
13 | metadata/_custom_type_script = "uid://cejilr31xj65q"
14 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/content/names/repositories/fantasy/male_orc.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Resource" script_class="NameRepository" load_steps=2 format=3 uid="uid://djueywo0glvue"]
2 |
3 | [ext_resource type="Script" uid="uid://cejilr31xj65q" path="res://addons/omnikit/src/helpers/content/names/name_repository.gd" id="1_3108j"]
4 |
5 | [resource]
6 | script = ExtResource("1_3108j")
7 | id = &"male_orc"
8 | use_shuffle_bag = true
9 | region = &"en"
10 | gender = 0
11 | names = Array[String](["Grog", "Thrak", "Snag", "Gnash", "Gorz", "Mog", "Ruk", "Borg", "Skrag", "Zug", "Oog", "Grim", "Fraz", "Krug", "Zog", "Murg", "Ragg", "Blug", "Snarl", "Thokk", "Ugluk", "Grum", "Skarr", "Mok", "Rog", "Bug", "Stug", "Zagg", "Gronk", "Tharg", "Snort", "Gnarl", "Gorg", "Mogk", "Rukk", "Bork", "Skrug", "Zugg", "Oogg", "Grimg", "Frazz", "Krugg", "Zogg", "Murgg", "Ragg", "Blugg", "Snarll", "Thokkk", "Uglukk", "Grumm", "Skarrg", "Mokk", "Rogg", "Bugg", "Stugg", "Zagg", "Gronkk", "Thargg", "Snortt", "Gnarll", "Gorgg", "Mogkk", "Rukkk", "Borkk", "Skrugg", "Zuggg", "Ooggg", "Grimgg", "Frazzz", "Kruggg", "Zoggg", "Murggg", "Ragg", "Bluggg", "Snarlll", "Thokkkk", "Uglukkk", "Grummm", "Skarrgg", "Mokkk", "Rogg", "Buggg", "Stuggg", "Zagg", "Gronkkk", "Tharggg", "Snorttt", "Gnarlll", "Gorggg", "Mogkkk", "Rukkkk", "Borkkk", "Skruggg", "Zugggg", "Oogggg", "Grimggg", "Frazzzz", "Krugggg", "Zogggg", "Murgggg", "Raggk", "Blugggg", "Snarllll", "Thokkkkk", "Uglukkkk", "Grummmm", "Skarrggg", "Mokkkk", "Roggk", "Bugggg", "Stugggg", "Zaggk", "Gronkkkk", "Thargggg", "Snortttt", "Gnarllll", "Gorgggg", "Mogkkkk", "Rukkkkk", "Borkkkk", "Skrugggk", "Zugggggk", "Oogggggk", "Grimggggk", "Frazzzzk", "Kruggggk", "Zogggggk", "Murggggk", "Raggkk", "Blugggggk", "Snarlllllk", "Thokkkkkk", "Uglukkkkk", "Grummmmk", "Skarrggggk", "Mokkkkkk", "Roggkkk", "Bugggggk", "Stugggggk", "Zaggkkk", "Gronkkkkk", "Thargggggk", "Snorttttk", "Gnarllllk", "Gorggggk", "Mogkkkkk", "Rukkkkkk", "Borkkkkk", "Skrugggkk", "Zugggggkk", "Oogggggkk", "Grimggggkk", "Frazzzzk", "Kruggggkk", "Zogggggkk", "Murggggkk", "Raggkkk", "Blugggggkk", "Snarllllkk", "Thokkkkkkk", "Uglukkkkkk", "Grummmmkk", "Skarrggggkk", "Mokkkkkkk", "Roggkkkk", "Bugggggkk", "Stugggggkk", "Zaggkkkk", "Gronkkkkkk", "Thargggggkk", "Snortttttkk", "Gnarllllkk", "Gorggggkk", "Mogkkkkkk", "Rukkkkkkk", "Borkkkkkk", "Skrugggkkk", "Zugggggkkk", "Oogggggkkk", "Grimggggkkk"])
12 | surnames = Array[String](["Skullcleaver", "Ironfist", "Bloodreaper", "Stonehide", "Warjaw", "Grimclaw", "Bonecrusher", "Axefist", "Ragehammer", "Doomfang", "Gutrender", "Fleshgouger", "Skullgouger", "Ironwill", "Bloodtooth", "Stonejaw", "Warclaw", "Grimhide", "Bonefist", "Axeclaw", "Ragejaw", "Doomhide", "Gutcleaver", "Fleshrender", "Skullbreaker", "Ironrage", "Bloodaxe", "Stoneclaw", "Warfist", "Grimjaw", "Bonehammer", "Axewarrior", "Ragehide", "Doomfist", "Gutripper", "Flesheater", "Skullfang", "Ironhammer", "Bloodclaw", "Stoneaxe", "Warhammer", "Grimfist", "Bonejaw", "Axeblood", "Ragefang", "Doomclaw", "Gutrender", "Fleshwound", "Skullhide", "Ironheart", "Bloodrage", "Stonefury", "Waraxe", "Grimhowl", "Boneaxe", "Axegrim", "Ragefist", "Doomshriek", "Gutgouger", "Flesheater", "Skullclaw", "Ironmaiden", "Bloodforged", "Stonebreaker", "Warbringer", "Grimtide", "Bonecarver", "Axewielder", "Ragebinder", "Doomseer", "Gutspiller", "Fleshcrafter", "Skullshatter", "Ironclad", "Bloodcaller", "Stoneguard", "Warshaper", "Grimwalker", "Boneknitter", "Axethrower", "Ragefueled", "Doomwhisper", "Gutstripper", "Fleshrender", "Skullbinder", "Ironbrand", "Bloodletter", "Stonehewn", "Warforged", "Grimstalker", "Bonegrinder", "Axesmiter", "Ragehowler", "Doomweaver", "Gutburster", "Fleshpeeler", "Skullcarver", "Ironscale", "Blooddrinker", "Stonefist", "Warcaller", "Grimwielder", "Bonecleaver", "Axebinder", "Rageforged", "Doomguard", "Gutripper", "Fleshbinder", "Skullrender", "Ironshaper", "Bloodhowler", "Stonecarver", "Warstalker", "Grimsmiter", "Bonehew", "Axecaller", "Rageguard", "Doomforged", "Gutshredder", "Fleshstripper", "Skullstalker", "Ironweaver", "Bloodwielder", "Stonebinder", "Warcleaver", "Grimbinder", "Boneforged", "Axeguard", "Ragecleaver", "Doomcaller", "Gutcarver", "Fleshguard", "Skullwielder", "Ironcaller", "Bloodguard", "Stonecleaver", "Warbinder", "Grimguard", "Bonebinder", "Axeweaver", "Ragecarver", "Doomwielder", "Gutguard", "Fleshcleaver", "Skullguard", "Ironbinder", "Bloodcarver", "Stoneguard", "Warweaver", "Grimcarver", "Boneguard", "Axecarver", "Rageguard", "Doomcarver", "Gutweaver", "Fleshweaver", "Skullweaver", "Ironcarver", "Bloodweaver", "Stoneweaver", "Warcarver", "Grimweaver", "Boneweaver", "Axeweaver", "Rageweaver", "Doomweaver", "Gutweaver", "Fleshcarver", "Skullcarver", "Ironweaver", "Bloodcarver", "Stonecarver", "Warweaver", "Grimcarver"])
13 | metadata/_custom_type_script = "uid://cejilr31xj65q"
14 |
--------------------------------------------------------------------------------
/addons/omnikit/src/helpers/viewport/texture_helper.gd:
--------------------------------------------------------------------------------
1 | class_name OmniKitTextureHelper
2 |
3 | static var ImageFormatSignatures: Dictionary[String, Array] = {
4 | "png": [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A],
5 | "jpg": [0xFF, 0xD8, 0xFF],
6 | "jpeg": [0xFF, 0xD8, 0xFF],
7 | "webp": [0x52, 0x49, 0x46, 0x46, null, null, null, null, 0x57, 0x45, 0x42, 0x50], ## Ignore byte size with null
8 | "bmp": [0x42, 0x4D],
9 | "tga": [0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
10 | "svg": [0x3C, 0x73, 0x76, 0x67], ##