Skip to content

Instantly share code, notes, and snippets.

View MicroCBer's full-sized avatar
💭
Studying

MicroBlock MicroCBer

💭
Studying
View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 15, 2024 12:10
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@ad8e
ad8e / glfw_ship.cpp
Last active June 3, 2024 01:48
instructions to use skia and glfw together. (download, installation, first program). as of Sept 2023, Windows is broken but this is still sadly the best starting resource for skia on Windows too.
/* Note: this Google copyright notice only applies to the original file, which has large sections copy-pasted here. my changes are under CC0 (public domain).
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
The official instructions don't work well. These alternative instructions are intended to be the shortest path to get a minimal setup running.
@ty4z2008
ty4z2008 / simulate.js
Created April 16, 2020 02:42
use js simulate click and input in react or vue.
/**simluate click in react */
function simulateClick(element) {
if (element instanceof jQuery) {
element = element[0]
}
const mouseClickEvents = ['mousedown', 'click', 'mouseup']
console.log('[spirit] simulate click:', element)
mouseClickEvents.forEach(mouseEventType =>
element.dispatchEvent(
new MouseEvent(mouseEventType, {
@MicroCBer
MicroCBer / wall_convert.py
Last active March 28, 2022 23:42
Convert models into cubes which can be used by ScuffedWalls ModelToWalls func.
# How to use this
# 1. Rename the model you want to convert into '1'
# 2. Copy the script into the text editor in the blender (you can find it in the Scripting tab, create a file and rename it into gen.py if needed)
# 3. Click the start button.
# It may spend a long time to covert it due to the slow runtime speed of python. Blender might keep no response. Just wait patiently.
# You can see the progress in the console. Open the console by clicking Window->Switch system console.
# By MicroBlock
# 2021.2.1
# If you are changing the script and republishing it, please include the original author and address