Git Product home page Git Product logo

Comments (2)

ffd8 avatar ffd8 commented on August 20, 2024

@sosunnyproject – great question. If you're using P5LIVE a lot and working on a project just for you (not COCODING), then I highly suggest installing it as an offline server - either the quick python way or fancy with node/npm for enabling auto-backups. Export all sketches (or within settings, press backup now) and import into the offline version. When you have it offline, the folder comes with an empty /data folder, which I'd recommend to use, since if this repo is cloned, that folder will never be erased/overwritten with updates – don't store anything inside the /includes/ directory, since it may get overwritten with updates + cause github changes issues.

Then to load local files, you can be as messy/organized as you like, linking like so:

font = loadFont("data/fonts/someFont.otf");

If you need to access it 'online' (mainly for COCODING or sharing the script with someone else online) – then your best bet is finding a CORS friendly service to host it for you, ie. glitch.com. Create a basic 'static website' (always awake), then goto 'assets', drag + drop, click on file, copy that URL – then you can load that online hosted font file, will have a crazy long URL:

font = loadFont("url_to_file");

I'm sure there are some other great free places to store files/assets online (just tested with github, but couldn't access a font file in CORS free way... hmm works fine for obj and other text files).

from p5live.

ffd8 avatar ffd8 commented on August 20, 2024

Hope the answer above solved the issue (run locally using own folder ie /data or finding CORS friendly site to host it).

from p5live.

Related Issues (20)

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.