This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = new P5() | |
p.draw= ()=>{ | |
p.noStroke(); | |
p.rect(p.width/2,p.height/2,100) | |
} | |
p.hide(); | |
s0.init({src:p.canvas}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = new P5({mode: 'WEBGL'}) | |
p.draw= ()=>{ | |
p.background(0,0,0,0); | |
p.orbitControl(5); | |
p.fill(255); | |
p.torus(150,15,5); | |
} | |
p.hide(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//p5 sketch from https://editor.p5js.org/remarkability/sketches/1D90zhu4a | |
p = new P5() | |
let permissionGranted = false; | |
let cx, cy; | |
cx = p.width/2; | |
cy = p.height/2; | |
// DeviceOrientationEvent, DeviceMotionEvent | |
if (typeof(DeviceOrientationEvent) !== 'undefined' && typeof(DeviceOrientationEvent.requestPermission) === 'function') { | |
// ios 13 device | |
DeviceOrientationEvent.requestPermission() |
NewerOlder