Skip to content

Instantly share code, notes, and snippets.

View ale2x72's full-sized avatar
🎯
< you are here

Alessio Erioli ale2x72

🎯
< you are here
View GitHub Profile
@jotson
jotson / screenshot.gd
Last active March 15, 2024 14:40
Godot GDScript screenshot function
# This is a function for capturing screenshots with GDScript
func screenshot():
# Capture the screenshot
var size = OS.window_size
var image = get_viewport().get_texture().get_data()
# Setup path and screenshot filename
var date = OS.get_datetime()
var path = "user://screenshots"
var file_name = "screenshot-%d-%02d-%02dT%02d:%02d:%02d" % [date.year, date.month, date.day, date.hour, date.minute, date.second]
@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active May 1, 2024 04:32
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest