Skip to content

Instantly share code, notes, and snippets.

@rynote
Last active May 16, 2019 18:13
Show Gist options
  • Save rynote/5fde3b1f9960b22f5a729bcff6dcde51 to your computer and use it in GitHub Desktop.
Save rynote/5fde3b1f9960b22f5a729bcff6dcde51 to your computer and use it in GitHub Desktop.
After Effects Javascript expression to format a number with commas.
val = Math.floor(thisComp.layer("SET NUMBER as Point X").effect("val")("Point")[0]);//a Point Expression Control let's you use bigger numbers than a Slider.
Math.round(n).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment