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
import bpy | |
def add_mesh(name, verts, faces, edges=None, col_name="Collection"): | |
if edges is None: | |
edges = [] | |
mesh = bpy.data.meshes.new(name) | |
obj = bpy.data.objects.new(mesh.name, mesh) | |
col = bpy.data.collections[col_name] | |
col.objects.link(obj) | |
bpy.context.view_layer.objects.active = obj |
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
cmake_minimum_required(VERSION 3.14) | |
set(CMAKE_C_STANDARD 11) | |
set(ENVSDK $ENV{PLAYDATE_SDK_PATH}) | |
if (NOT ${ENVSDK} STREQUAL "") | |
# Convert path from Windows | |
file(TO_CMAKE_PATH ${ENVSDK} SDK) | |
else() | |
execute_process( |
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
- Bubble Fortune - | |
------------------- | |
O o . . . . | |
O o O O . O | |
. . O . O o O . | |
O . O . . . | |
o o o O o . . o o | |
O . o . | |
O o O . O O . O | |
o . O O o O . |
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
SUBSYSTEMS=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", GROUP="users", MODE="0660" |
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
function parse_vert(str, i) | |
local s = sub(str, (i-1)*5+1, (i-1)*5+5) | |
local v = sub(s, 1, 1) | |
local res = v.."0x0."..sub(s,2) | |
return tonum(res) | |
end | |
function load_verts(str) | |
local verts = {} | |
for v=0,#str/15-1 do |
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
[BLACK_R:0] | |
[BLACK_G:0] | |
[BLACK_B:0] | |
[BLUE_R:29] | |
[BLUE_G:43] | |
[BLUE_B:83] | |
[GREEN_R:0] | |
[GREEN_G:135] | |
[GREEN_B:81] | |
[CYAN_R:18] |
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
void gruvboxDark() | |
{ | |
auto &style = ImGui::GetStyle(); | |
style.ChildRounding = 0; | |
style.GrabRounding = 0; | |
style.FrameRounding = 0; | |
style.PopupRounding = 0; | |
style.ScrollbarRounding = 0; | |
style.TabRounding = 0; | |
style.WindowRounding = 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
@echo off | |
set /p quality="Quality: " | |
ffmpeg -hwaccel nvdec -c:v h264_cuvid -i %1 -c:v h264_nvenc -rc:v vbr_hq -cq:v %quality% -b:v 2500k -maxrate:v 5000k -profile:v high -pix_fmt yuv420p out.mp4 | |
REM Here's the version without GPU-accelerated encoding | |
REM ffmpeg -i %1 -crf %quality% -b:v 2500k -maxrate:v 5000k -pix_fmt yuv420p out.mp4 |
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
#version 150 | |
// Using Kodelife for the realtime preview/test environment but it should work fine on any shader that | |
// - offers the output's resolution | |
// - a time clock in seconds | |
// - an UV mapped on screenspace from [0,0] to [1,1] | |
uniform float time; | |
uniform vec2 resolution; |
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
-- accumulative random | |
-- allows for progressively | |
-- variating value instead | |
-- of pure random | |
function vrnd() | |
local start = 50 | |
return function() | |
start = start + rnd(1)* (flr(rnd(2)) == 1 and 1 or -1) | |
start = mid(40,start,100) | |
return start |
NewerOlder