Skip to content

Update the code to 2021 practices? #11

@greggman

Description

@greggman

Would you consider a series of PRs that update the code to slightly more modern practices? Some are minor, some less so.

Examples might include

  • Remove all uses of var for let and const

    var is basically considered bad practice at this point

  • no need for `type="text/javascript"

    this is not needed for script tags

  • stop using window.onload

    Just move your script tags to the bottom or use defer

  • consider using es6 modules for loading scripts

  • use requestAnimationFrame instead of requestAnimFrame

    There's no need for the polyfill in 2021

  • put the shaders in multiline template strings

    They've been in every browser since 2010 or earlier

  • get rid of "Oops, your browser doesn't support canvas"

    There are no browser that don't support canvas in 2021

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions