GithubHelp home page GithubHelp logo

garciadelcastillo / p5js-electron-templates Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 16.0 364 KB

A set of p5.js templates that run as Electron apps.

License: Creative Commons Zero v1.0 Universal

JavaScript 99.94% HTML 0.06%
electron p5js

p5js-electron-templates's People

Contributors

creativcoder avatar garciadelcastillo avatar nonoesp avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

p5js-electron-templates's Issues

Change name to p5js-electron-templates

We could aim to provide base templates for different types of common p5.js projects. Here are my suggested title and description.

Title

p5js-electron-templates

Description

A set of p5.js templates that run as Electron apps.

How to add p5.speech module in this app?

I have created a smaple electron application to try p5.speech. But that is not working and I am not seeing any error in console.

Index.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Hello p5.js!</title>
    <script language="javascript" type="text/javascript" src="libraries/p5.js"></script>
    <script language="javascript" src="libraries/p5.dom.js"></script>
    <script language="javascript" src="libraries/p5.sound.js"></script>
    <script language="javascript" src="libraries/p5.speech.js"></script>
    <script language="javascript" type="text/javascript" src="my_speech.js"></script>
    <!-- this line removes any default padding and style. you might only need one of these values set. -->
    <style> body {padding: 0; margin: 0; background: #000000; overflow-x:hidden; overflow-y: hidden} </style>
  </head>
  <body>

  </body>

  <script>
    // You can also require other files to run in this process
    require('../renderer.js')
  </script>
</html>

my_speech.js

function setup() {
  noCanvas();
  let lang = navigator.language || 'en-US';
  let speechRec = new p5.SpeechRec(lang, gotSpeech);

  let continuous = true;
  let interim = false;
  speechRec.start(continuous, interim);
  function gotSpeech() {
      console.log(speechRec);
    if (speechRec.resultValue) {
      createP(speechRec.resultString);
    }
  }
}

This setup is working fine in browser. How can I make it work in electron application?

Post Install Error

I'm trying to get this running on a raspberry pi 3B+. Running npm install gives me the below error:

image

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.