Skip to content

Instantly share code, notes, and snippets.

@mattlundstrom
Last active October 24, 2020 21:30
Show Gist options
  • Save mattlundstrom/a389a20a544c08d5780daa3e9e766870 to your computer and use it in GitHub Desktop.
Save mattlundstrom/a389a20a544c08d5780daa3e9e766870 to your computer and use it in GitHub Desktop.
JS Functions with default properties
var func = function( props ){
props = (typeof props !== "object") ? {} : props;
var mx = props.mx || 10;
var my = props.my || 10;
var mz = props.mz || 10;
var time = props.time || 1;
var delay = props.delay || 0;
var ease = props.ease || Linear.easeNone;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment