This file contains hidden or 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
| extends Node | |
| func _ready() -> void: | |
| # MyScene is is a `class_name` in a `.gd` script with an associated `.tscn` file | |
| var scene = Instantiate.scene(MyScene) | |
| add_child(scene) |
This file contains hidden or 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
| extends Node | |
| func _ready() -> void: | |
| # MyScene is is a `class_name` in a `.gd` script with an associated `.tscn` file | |
| var scene = Instantiate.scene(MyScene) | |
| add_child(scene) |
This file contains hidden or 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
| ## This script adds parallax functionality to any Node2D. | |
| ## But be careful, some Node2D descendants may work in a special way | |
| ## with the position and global_position properties, | |
| ## or have other conflicts with the logic of this script.[br] | |
| ## | |
| ## [b]How to use[/b]: Add this script to any [Node2D], | |
| ## such as [TileMapLayer] or [Sprite2D], or to [Node2D] itself. | |
| ## Or move the main sections of the code to your own script.[br] | |
| ## After that, this node will have new properties that allow you | |
| ## to configure parallax and see it working in the editor just like in the game.[br] |
This file contains hidden or 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
| /* | |
| * Ambient Occlusion and Direction. | |
| * | |
| * Calculates AO and the average direction where the ambient light came from. | |
| * | |
| * Original AO code from https://github.com/sambler/osl-shaders/blob/master/ramps/BaAmbientOcclusion/BaAmbientOcclusion.osl | |
| * | |
| */ | |
| void rng_seed(output int rng, int seed) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder