Skip to content

Instantly share code, notes, and snippets.

Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
**simple circle movement:**
let alpha = 0;
let radius = 10;
let moveOnCircle = () =>
{
obj0.position = new Vector3(radius * Math.sin(alpha), 0, radius * Math.cos(alpha));
obj1.position = new Vector3(radius * Math.sin(alpha), 0, -radius * Math.cos(alpha));
obj2.position = new Vector3(radius * Math.cos(alpha), 0, radius * Math.sin(alpha));
@faultyagatha
faultyagatha / WebGL-frameworks-libraries.md
Created May 26, 2020 10:19 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • Filament: Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS and WASM/WebGL
  • ClayGL: A WebGL graphic library helping you to
@faultyagatha
faultyagatha / GLSL-Noise.md
Created April 15, 2020 10:11 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

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);
	return mix(rand(fl), rand(fl + 1.0), fc);
}