Skip to content

Instantly share code, notes, and snippets.

View johanhelsing's full-sized avatar

Johan Klokkhammer Helsing johanhelsing

View GitHub Profile
# Report removal
reports: 10
action: remove
modmail: The above item has been automatically removed due to receiving at least 2 reports. Please verify that this action was correct.
comment: This post has been removed due to receiving too many reports from users. The mods have been messaged and will reapprove if this removal was inappropriate.
---
@gaearon
gaearon / ClassNameMixin.js
Last active March 23, 2018 17:18
BEM in React
'use strict';
var React = require('react'),
classSet = require('react/lib/cx'),
_ = require('underscore');
var ClassNameMixin = {
propTypes: {
className: React.PropTypes.string,
context: React.PropTypes.string
@favoyang
favoyang / BuildAddressables.cs
Last active August 14, 2023 06:29
Build addressable bundles when clicking the build button
/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/
///
/// License: The MIT License https://opensource.org/licenses/MIT
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;
@tomkail
tomkail / ExtendedScriptableObjectDrawer.cs
Last active April 2, 2024 18:56
Displays the fields of a ScriptableObject in the inspector
// Developed by Tom Kail at Inkle
// Released under the MIT Licence as held at https://opensource.org/licenses/MIT
// Must be placed within a folder named "Editor"
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 19, 2024 13:41
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);