This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tool | |
class_name MaterialSelector | |
extends Node3D | |
############################## | |
## EXPORT VARIABLES | |
############################## | |
@export var mesh: MeshInstance3D | |
@export var materials: Array[Material] = []: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tool | |
class_name ProceduralBridge | |
extends Node3D | |
############################## | |
## EXPORT VARIABLES | |
############################## | |
@export var physics_server: bool = false: | |
set(value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from "How to Limit Color Output with Shaders in Godot" | |
// By TheBuffED | |
// On https://www.youtube.com/watch?v=Scrdv4oSeNw | |
// Type of shader https://docs.godotengine.org/en/3.0/tutorials/shading/shading_language.html#shader-types | |
shader_type canvas_item; | |
// The shader strength which between 0 (not applied) and 1 (fully applied) because I want to fade the shader in and out | |
// Can be changed from node via `get_material().set_shader_param("shaderStrength", newValue)` | |
uniform float shaderStrength = 1.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source | |
# Vertex animation textures, beanbags and boneless animations | |
# by Martin Donald | |
# https://www.youtube.com/watch?v=NQ5Dllbxbz4 | |
import bpy | |
import bmesh | |
import mathutils | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func catmull_rom_spline( | |
_points: Array, resolution: int = 10, extrapolate_end_points = true | |
) -> PackedVector2Array: | |
var points = _points.duplicate() | |
if extrapolate_end_points: | |
points.insert(0, points[0] - (points[1] - points[0])) | |
points.append(points[-1] + (points[-1] - points[-2])) | |
var smooth_points := PackedVector2Array() | |
if points.size() < 4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
previous_pwd=$PWD | |
cd $(dirname $0) | |
PROJECT="$HOME/Desktop/project" | |
EXPORT_DIR="$HOME/Desktop/export" | |
rm -rf $EXPORT_DIR | |
mkdir -p $EXPORT_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* \brief Returns positional offset for a given point as a result of summing 4 gerstner waves | |
* \param positionWS point in world space | |
* \param wavelengths wavelength of each of the 4 waves | |
* \param amplitudes amplitudes of each of the 4 waves | |
* \param directions direction of each of the 4 waves (each row = one direction). MUST BE NORMALIZED! | |
* \param speed global speed multiplier. Individual wave speed depends on Wavelength | |
* \param steepness Gerstner wave 'Steepness' parameter. Modulates the horizontal offset of points | |
* \param normal returns the normal of given point. | |
* \return positional offset of the given point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# as of godot 4.1 | |
_static_init | |
_init | |
_notification 20 Node.NOTIFICATION_SCENE_INSTANTIATED # only on instantiated scene roots | |
_notification 18 Node.NOTIFICATION_PARENTED | |
_enter_tree | |
tree_entered signal | |
_notification 27 Node.NOTIFICATION_POST_ENTER_TREE | |
_ready | |
ready signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export var viewportResizeStanddown = 0.5 | |
var viewportResizeCounter = 0.0 | |
signal settingsChanged() | |
signal particlesSettingsChanged() | |
signal removeGpuParticles() | |
func forbidParticles(time): | |
particlesForbiddenCounter = time | |
particlesForbidden = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Linked List | |
# from https://gist.github.com/bojidar-bg/a570c614a4dd1cd84949 | |
# Example use | |
""" | |
var my_linked_list = LinkedList.new() | |
func _ready(): | |
var ll = my_linked_list |
NewerOlder