Coder Social home page Coder Social logo

felipecustodio / p5-starter Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 8.0 2.12 MB

:herb: Boilerplate for p5.js projects, including VSCode Intellisense and linting for HTML, CSS and JS.

Home Page: https://felipecustodio.github.io/p5-starter/

License: MIT License

HTML 41.73% JavaScript 43.47% CSS 14.80%
p5js p5 boilerplate starter-kit starter-template

p5-starter's Introduction

Installation and Usage

This repository is a template, which you can use to quickstart your own new projects. It comes with a pre-configured environment for VS Code, with suggested extensions and configurations.

GitHub - Creating a repository from a template

.
├── index.html
├── jsconfig.json
├── node_modules
├── package.json
├── sketch.js
└── style.css

Visual Studio Code Workflow

Included is a .vscode/extensions.json file, which recommends a workspace inside Visual Studio Code with the following extensions:

To view your sketch, start the Live Server on VS Code. It defaults to http://127.0.0.1:5500/. It supportes live reload, so you can edit the sketch and see the changes in near realtime, like the p5 online editor.

Intellisense

Intellisense is provided via p5.js TypeScript definition files.

Solution found on issue #1339.

Instead of downloading the TypeScript definitions, we can now use this NPM package: @types/p5.

ESLint rules

There are some disabled rules on .eslintrc.json, but they're entirely personal choices.

p5-starter's People

Contributors

dependabot[bot] avatar felipecustodio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

p5-starter's Issues

Issue with Firefox Canvas

In Firefox, with privacy-oriented settings and extensions, the following happens:

Uncaught (in promise) TypeError: canvas.parent is not a function
    setup https://felipecustodio.github.io/p5-starter/sketch.js:26
    _setup https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js:51363
    _start https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js:51286
    p5 https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js:51639
    _globalInit https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js:50603
sketch.js:26:10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.