bmoren / p5.geolocation Goto Github PK
View Code? Open in Web Editor NEWa geolocation and geofencing library for p5.js
License: GNU Lesser General Public License v2.1
a geolocation and geofencing library for p5.js
License: GNU Lesser General Public License v2.1
Hello,
I want just to know if you plan to release a 0.6 version containing the latest commits.
Thank you!
Not sure, what exactly is failing, but I don't get this to work anymore with recent p5.js versions.
Was just about to test a script that I demonstrated in class last year, using p5.js v0.5.4
and it does not work anymore in v0.5.16
. Not sure, at which version exactly it broke.
When I use the provided example for getCurrentPosition()
var locationData;
function preload(){
locationData = getCurrentPosition();
}
function setup() {
print(locationData.latitude)
print(locationData.longitude)
print(locationData.accuracy)
print(locationData.altitude)
print(locationData.altitudeAccuracy)
print(locationData.heading)
print(locationData.speed)
}
it keeps loading forever (displaying the "Loading...", which indicates it is currently stuck in the preload function).
It does display the console output of p5.geolocation Loaded
, so it loads the library for sure, but it is unable to get the current position.
When I use the watchPosition() my accuracy is always 65 but if I use the navigator.geolocation.watchPosition I get accuracy below 10. Anyone else having this problem?
playback audio every interval of set distance.
trigger video playback at a distance interval.
When testing on ios 9 and if the users Settings -> Privacy -> Location services -> Safari are set to "Never" the webpage will not prompt for permission. There should maybe be a more explicit alert that notifies vs a console log. Will look into testing to see if we can do something more direct for ios / mobile.
we might need to use glitch also for any real-time or persistence issues.
we should create a simple tutorial and demo for doing something cool with p5.geolocation
I put the getCurrentPosition() function in the preload function in my sketch. When the user denies geolocation in the browser it never leaves the preload function. The geocheck function will never fire since it won't reach the setup functionality. I also tried the error callback function but it still doesn't leave the preload function. Am I doing something wrong?
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.