- Documentation: https://web.dev/articles/eventsource-basics
- Use case: broadcasting data from server to browsers
- Benefits:
- Easy to understand and implement (only a few lines of code)
- No library is needed
- Can use same HTTP(S) authentication as elsewhere in the app (which can’t be done with websockets)
- GitHub Staff
- https://terkel.com
- @terkelg
- @terkel.com
- in/terkelg
- terkelg
import SwiftUI | |
struct EnumPicker<T: Hashable & CaseIterable, V: View>: View { | |
@Binding var selected: T | |
var title: String? = nil | |
let mapping: (T) -> V | |
var body: some View { |
global.THREE = require("three"); | |
const canvasSketch = require('canvas-sketch'); | |
const Random = require('canvas-sketch-util/random'); | |
const gradientHeight = 512; | |
const settings = { | |
dimensions: [ 2048, gradientHeight * 2 ] | |
}; |
const canvasSketch = require("canvas-sketch"); | |
const { GUI } = require("dat.gui"); | |
const data = { | |
background: "#de6060", | |
number: 0.35 | |
}; | |
const settings = { | |
dimensions: [2048, 2048], |
This workshop encourages students to make use of npm modules to build complex and interesting artworks.
If you find a module you want to use, like riso-colors, you can install it from your project folder like so:
npm install riso-colors
- 2011 - A trip through the Graphics Pipeline 2011
- 2015 - Life of a triangle - NVIDIA's logical pipeline
- 2015 - Render Hell 2.0
- 2016 - How bad are small triangles on GPU and why?
- 2017 - GPU Performance for Game Artists
- 2019 - Understanding the anatomy of GPUs using Pokémon
- 2020 - GPU ARCHITECTURE RESOURCES
I recently tried out the fantastic vim-tmux-navigator
tmux plugin.
Unfortunately, some the default key bindings conflict with some of the key bindings my fuzzy finder of choice uses.
I wanted to remap them to the default vim split navigation commands that are prefixed with C-w
, and found the solution of
hjdivad in his gist. However, I wanted a simpler solution, so after
some more digging I stumbled upon this reddit post
and ultimately came up with the following solution, which doesn't rely on key bindings that unbind themselves, but uses tmux's
'key-tables'.
vec2 rotateUV(vec2 uv, float rotation) | |
{ | |
float mid = 0.5; | |
return vec2( | |
cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid, | |
cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid | |
); | |
} | |
vec2 rotateUV(vec2 uv, float rotation, vec2 mid) |
