Skip to content

Instantly share code, notes, and snippets.

View chaosddp's full-sized avatar

Chaos Yu chaosddp

  • Beijing
  • 06:52 (UTC +08:00)
View GitHub Profile
@winston-yallow
winston-yallow / test.gd
Last active January 25, 2024 06:32
Godot 4.x Compute Example
extends Node
# Based on this tweet by Clay John:
# https://twitter.com/john_clayjohn/status/1306447928932753408
func _ready() -> void:
# Create a local rendering device.
var rd := RenderingServer.create_local_rendering_device()
@Muscipular
Muscipular / MonoGameFontUtil.cs
Last active September 9, 2022 04:13
monogame dynamic draw font, using SharpFont, and cache with texture2d
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using SharpFont;
namespace MonoFont
{
@physacco
physacco / README.md
Last active December 27, 2023 09:05
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@shivshank
shivshank / vox_to_obj_exporter.py
Last active June 14, 2024 21:59
Exports from MagicaVoxel VOX to OBJ. Can preserve all edges for easy editing in a program like Blender.
"""
This script is designed to export a mass amount of MagicaVoxel .vox files
to .obj. Unlike Magica's internal exporter, this exporter preserves the
voxel vertices for easy manipulating in a 3d modeling program like Blender.
Various meshing algorithms are included (or to be included). MagicaVoxel
uses monotone triangulation (I think). The algorithms that will (or do)
appear in this script will use methods to potentially reduce rendering
artifacts that could be introduced by triangulation of this nature.
@staltz
staltz / introrx.md
Last active September 20, 2024 10:10
The introduction to Reactive Programming you've been missing
@tylerneylon
tylerneylon / learn.lua
Last active September 17, 2024 17:38
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------