demket
June 29, 2019, 11:52pm
1
Hi, is it possible to use external javascript libraries like gauge.js? I’ve added the p5.dom.min.js file in a similar way to the Gauge.min.js file, but it doesn’t work.
Thanks
1 Like
Some sketches using other libraries:
.block
height: 600
index.html
<script async src=http://CDN.JSDelivr.net/npm/p5></script>
<script defer src=http://CDN.JSDelivr.net/gh/dataarts/dat.gui/build/dat.gui.min.js></script>
<script defer src=sketch.js></script>
sketch.js
/**
* DatGuiTest (v2.1.1)
* Kuprin5 (2017-Feb-23)
* mod GoToLoop
*
* forum.Processing.org/two/discussion/21777/
* dat-gui-don-t-update-variables-value#Item_1
*
* Bl.ocks.org/GoSubRoutine/861b48f0b0118219c6a7cdd28309ee62
*/
This file has been truncated. show original
.block
height: 600
scrolling: no
border: yes
license: cc-by-4.0
index.html
<meta charset=utf8>
<meta name=viewport content=width=device-width,initial-scale=1>
<script defer src=https://cdn.JsDelivr.net/npm/p5></script>
<script defer src=https://MolleIndustria.GitHub.io/p5.play/lib/p5.play.js></script>
<script defer src=sketch.js></script>
sketch.js
/**
* p5.Play Instance Mode Example (v1.0)
* GoToLoop (2019-Apr-04)
*
* https://GitHub.com/molleindustria/p5.play/issues/12
* https://Bl.ocks.org/GoSubRoutine/cf739128f389766f5d9cb631c9c358a6
*/
"use strict";
This file has been truncated. show original
.block
height: 600
Particle.js
"use strict";
class Particle extends toxi.physics2d.VerletParticle2D {
static get FILL() {
delete this.FILL;
return this.prototype.FILL = this.FILL = color(0o350);
}
static get STROKE() {
delete this.STROKE;
This file has been truncated. show original
Spring.js
"use strict";
class Spring extends toxi.physics2d.VerletSpring2D {
static get STROKE() {
delete this.STROKE;
return this.prototype.STROKE = this.STROKE = color(0xff);
}
display() {
line(this.a.x, this.a.y, this.b.x, this.b.y);
This file has been truncated. show original
There are more than three files. show original
1 Like
demket
June 30, 2019, 1:51am
3
Thanks I succeed, how could i set the gauge position and size in canvas.
Never heard about that library, sorry.
1 Like