See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
const debounce = (fn, time) => { | |
let timeout; | |
return function() { | |
const functionCall = () => fn.apply(this, arguments); | |
clearTimeout(timeout); | |
timeout = setTimeout(functionCall, time); | |
} | |
} |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="https://unpkg.com/three"></script> | |
<script | |
src="https://unpkg.com/three/examples/js/loaders/GLTF2Loader.js" | |
></script> | |
<script src="script.js" defer="defer"></script> | |
</head> |
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"extends": "airbnb", | |
"rules": { | |
"no-console":0, | |
"nomen": 0 |
/************* Method #1 ***************/ | |
html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl, dt, dd, blockquote, address { | |
margin: 0; | |
padding: 0; | |
} | |
/************* Method #2 ***************/ | |
html, body, div, span, applet, object, iframe, |
Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
var cameraZ = camera.position.z; | |
var planeZ = 5; | |
var distance = cameraZ - planeZ; | |
var aspect = viewWidth / viewHeight; | |
var vFov = camera.fov * Math.PI / 180; | |
var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance; | |
var planeWidthAtDistance = planeHeightAtDistance * aspect; | |
// or |
module SpriteSheet exposing (..) | |
import Math.Vector2 exposing (Vec2, vec2) | |
import WebGL exposing (Texture, Shader) | |
{-| | |
Render a portion of a sprite sheet. | |
-} | |
fragmentSpriteSheet : Shader {} { u | spriteSheet : Texture, spriteSheetSize: Vec2, spriteSize: Vec2, index : Float } { vcoord : Vec2 } | |
fragmentSpriteSheet = |
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
Name | Stars | Last Commit | Description |
---|---|---|---|
three.js | ![GitHub |
var Shopify = Shopify || {}; | |
// --------------------------------------------------------------------------- | |
// Money format handler | |
// --------------------------------------------------------------------------- | |
Shopify.money_format = "${{amount}}"; | |
Shopify.formatMoney = function(cents, format) { | |
if (typeof cents == 'string') { cents = cents.replace('.',''); } | |
var value = ''; | |
var placeholderRegex = /\{\{\s*(\w+)\s*\}\}/; | |
var formatString = (format || this.money_format); |