Skip to content

Instantly share code, notes, and snippets.

View QueenOfSquiggles's full-sized avatar

QueenOfSquiggles

View GitHub Profile
@QueenOfSquiggles
QueenOfSquiggles / img_link_text.html
Created December 29, 2023 17:48
Easy image as a link button with optional header text and body text (HTML, CSS, Shopify)
@QueenOfSquiggles
QueenOfSquiggles / VFXParticlesGPU.gd
Created September 22, 2023 20:40
Godot GPU Particles Oneshot hack for VFX
extends GPUParticles3D
##
## This class should probably be part of the engine featureset. In the meantime, we can have a global class to provide this feature set. Eventually if I have the time I could look at the engine code and see how hard of a feat adding this feature would be.
##
class_name VFXParticlesGPU
func _ready() -> void:
emitting = true
one_shot = true
@QueenOfSquiggles
QueenOfSquiggles / .gitignore
Created June 21, 2023 16:49
Godot addon GitIgnore for submodule support
#
# This Git Ignore file is intended for use with developing Godot Addons.
# Ideally this will be in a separate release branch that can be added as a submodule through git
# The purpose of this is that addons actively being developed on GitHub can be readily
# updated, tested, and reverted to older commits as needed for the particular project.
# Obviously this is an opt-in thing. But it could make godot addons much easier to use for more involved projects.
#
# For all who choose to follow this paradigm, the recommended branch name is `submod-addon`.
#
# For those less familiar with Git, you can learn more about submodules here: https://git-scm.com/book/en/v2/Git-Tools-Submodules
@QueenOfSquiggles
QueenOfSquiggles / godot_download_repo.gd
Created February 20, 2023 18:36
A short GDScript (2.0) script to pull all currently available versions of the Godot editor, automatically
extends Control # arbitrary. This could extend literally anything
@onready var http := $HTTPRequest # this could be replaced with a code generated node, but I like having a scene tree in-editor
const DOWNLOAD_REPO := "https://downloads.tuxfamily.org/godotengine/"
var known_versions := []
func _ready() -> void:
http.request_completed.connect(_handle_request)
@QueenOfSquiggles
QueenOfSquiggles / upload_builds.py
Created February 14, 2023 19:30
A script for pushing game release builds to Itch IO automatically. Supports a variety of game engines
import subprocess
import configparser
import os
"""
A script for automatically pushing released builds to a game project, using information from a configuration file.
The configuration file is hard coded to be named 'builds_config.cfg' and be in the same directory as this script, as well as the folders and archives for release.
The folder/ZIP must be named the intended release channel. See Butler documentation for recommended naming.
@QueenOfSquiggles
QueenOfSquiggles / plugin.gd
Created December 10, 2022 21:59
Godot 4 Quick Asset Extraction
@tool
extends EditorPlugin
func _enter_tree():
add_tool_menu_item("Extract Asset Pack", _menu_extract_asset_pack)
func _exit_tree():
pass
func _menu_extract_asset_pack() -> void:
@QueenOfSquiggles
QueenOfSquiggles / mosaic.gdshader
Last active April 1, 2022 02:28
Godot Mosaic Shader
shader_type canvas_item;
uniform float num_colors = 16.0;
uniform float pixelate_amount = 10.0; // this is what affects the size of the mosaic
uniform vec2 screen_size = vec2(1024.0, 600.0); // use your screen size
const float bayer_matrix[] = {
0.0, 8.0, 2.0, 10.0,
12.0, 4.0, 14.0, 6.0,
3.0, 11.0, 1.0, 9.0,
@QueenOfSquiggles
QueenOfSquiggles / plugin.gd
Created February 15, 2022 19:09
EditorPlugin Scene Tree Edits Test
tool
extends EditorPlugin
# All extraneous plugin functions stripped
func _tool_gen_subdata_in_scene(args) -> void:
# this function is registered as a "tool menu item" which calls this with args=null
var scene := get_tree().edited_scene_root
var audio_nodes := _recurse_get_audio_nodes(scene)
@QueenOfSquiggles
QueenOfSquiggles / ProceduralMaterialTest
Created June 10, 2021 15:12
A test to see if my procedural mesh can handle materials that include depth and normal maps in Godot
extends Spatial
export (Material) var material : Material
var vertices := []
var uvs := []
func _ready():
generate()
func generate(): # generates the mesh and adds as a child
@QueenOfSquiggles
QueenOfSquiggles / ScrollRectAutoScroll.cs
Last active March 21, 2018 21:39 — forked from mandarinx/ScrollRectAutoScroll.cs
Unity3d ScrollRect Auto-Scroll, Dropdown Use: Places this component in the Template of Dropdown (with the ScrollRect component)
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
[RequireComponent(typeof(ScrollRect))]
public class ScrollRectAutoScroll : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public float scrollSpeed = 10f;
private bool mouseOver = false;