Skip to content

Instantly share code, notes, and snippets.

Avatar
🦇
Making Stuff

David Roberts DDR0

🦇
Making Stuff
  • LostPixel
  • Vancouver, British Columbia
View GitHub Profile
@DDR0
DDR0 / shaders.c
Created Dec 14, 2020
water_distort_new
View shaders.c
//in shaders.cfg:draw
set(textures, []),
if(liquid_textures[0], [
bind_texture(liquid_textures[0], 2),
set(uniform_commands.u_water_tex_0, 2),
add(textures, [liquid_textures[0]]),
]),
if(liquid_textures[1], [
bind_texture(liquid_textures[1], 3),
set(uniform_commands.u_water_tex_1, 3),
View frogatto release tasks 2020-11-12.txt
☐ Content Creation
☐ Shadow mechanics
☐ Make a few enemy variants that respond to light/shadow.
☐ Redo a variant of the mosquitos as moths?
☐ Make a bat which wakes up in the light.
☐ Make some puzzle mechanics around ligthing.
☐ Light-reactive switch
☐ Light-once switch
☑ Dark, unnavigatable shadow
☐ Particle Effects Upgrade
View inheritance.sc
import scala.annotation.tailrec
// generic version
sealed trait List[A] {
@tailrec
final def length(counter: Int=0): Int =
this match {
case Pair(_, tail:List[A]) => tail.length(counter+1)
case End() => counter
View compile errors
Building: src/kre/CameraObject.cpp
In file included from src/kre/imgui_impl_opengl3.cpp:67:
src/kre/imgui_impl_opengl3.h:38:1: error: ‘IMGUI_IMPL_API’ does not name a type; did you mean ‘IMGUI_API’?
38 | IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL);
| ^~~~~~~~~~~~~~
| IMGUI_API
src/kre/imgui_impl_opengl3.h:39:1: error: ‘IMGUI_IMPL_API’ does not name a type; did you mean ‘IMGUI_API’?
39 | IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
| ^~~~~~~~~~~~~~
| IMGUI_API
@DDR0
DDR0 / little_dust_effect.cfg
Created Apr 15, 2020
little_dust_effect.cfg
View little_dust_effect.cfg
{
"info": {
"affector": {
"max_deviation_x": 2.0,
"type": "randomizer"
},
"blend": "alpha_blend",
"blend_enable": true,
"blend_equation": "add",
"default_particle_height": 3.0,
@DDR0
DDR0 / blinks.txt
Created Apr 10, 2020
blink pattern presets
View blinks.txt
@DDR0
DDR0 / sketch_neon_1.c
Last active Apr 11, 2020
Blinky Patterns for the Arduino Uno - Now with button presses for modes!
View sketch_neon_1.c
#define END 0
#define START 1
#define BLINK 2
#define UBLINK 3
#define REPEAT 4
#define LOG_SEEK 0
#define LOG_EXEC 0
static const byte ledPin = 5;
@DDR0
DDR0 / signal_tap.py
Created Sep 7, 2019
Intercept and modify `pyqtSignal`s.
View signal_tap.py
"""Provides signalTap, a generic class to transform a pyqtSignal.
Usage example: Intercept a spinbox's valueChanged signal.
```python
def __init__(self):
valueChangedTap = signalTap(lambda val:
(val * self.unitValue[self.siUnit],) )
self.valueChanged.connect(valueChangedTap.emit)
self.valueChanged = valueChangedTap
```
View preset
cam-json --control set - << EOF
{"ioMapping": {"combAnd": {"debounce": 0, "invert": 0, "source": "alwaysHigh"},
"combOr1": {"debounce": 1, "invert": 0, "source": "io1"},
"combOr2": {"debounce": 1, "invert": 0, "source": "io3"},
"combOr3": {"debounce": 0, "invert": 0, "source": "none"},
"combXOr": {"debounce": 0, "invert": 0, "source": "none"},
"delay": {"debounce": 0,
"delayTime": 0,
"invert": 0,
"source": "toggle"},
@DDR0
DDR0 / Qt Dbus Error Emitting Issue.md
Last active Feb 16, 2019
I believe the PyQt5 documentation is in error. This is why:
View Qt Dbus Error Emitting Issue.md