garciadelcastillo / p5js-electron-templates Goto Github PK
View Code? Open in Web Editor NEWA set of p5.js templates that run as Electron apps.
License: Creative Commons Zero v1.0 Universal
A set of p5.js templates that run as Electron apps.
License: Creative Commons Zero v1.0 Universal
as title.. require is not defined..
We could aim to provide base templates for different types of common p5.js
projects. Here are my suggested title and description.
p5js-electron-templates
A set of p5.js templates that run as Electron apps.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.