Find Jobs
Hire Freelancers

P5.JS multiple frame rates at any speed from 1 to 30FPS

$20-30 USD

Lukket
Slået op næsten 3 år siden

$20-30 USD

Betales ved levering
Hi, I am working in [login to view URL] and I am trying to achieve multiple frame rates for multiple animations that can have any framerate between 1FPS to 30FPS. Here is the main question: How to keep the master FPS at frameRate(30) and then have any number of animations be at any FPS between 1-30. The mod function will allow me to get a few divisions of FPS but this is not good enough as it goes from 30FPS and then 15FPS and that's a huge difference in speed: if (frameCount % 2)   // Animate every other frame ~15FPS   if (frameCount % 3)   // Animate one frame out of three [login to view URL] So there is the timer function in milliseconds which seems like a perfect solution to achieve any FPS I want, but it simply does not keep up with 30FPS, where the same code with no timer and the standard 30 FPS runs perfectly. So it seems this method is not usable for animations? [login to view URL] And then there is deltaTime but I have not been able to figure it. From its description it seems to be exactly what I need but the example on the website is about moving an object on the screen at different rates vs I need the ability to change the state of an object at any FPS, like the background color, as shown in my example code. The code provided is a simplified version of the main code but it represents the problem well. I am not looking for a code re-write necessarily, I'm interested in how else this can be done, so if you can point me to the solution that works for me too!
Projekt-ID: 30919839

Om projektet

4 forslag
Projekt på afstand
Aktiv 3 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
4 freelancere byder i gennemsnit $73 USD på dette job
Brug Avatar.
Hello! I just noticed the project you posted here. I am very excited working your project with you. I am skilled web developer with skills including JavaScript. Please contact me to discuss more regarding this project. Thanks
$25 USD på 6 dage
5,0 (1 bedømmelse)
0,0
0,0

Om klienten

Flag for UNITED STATES
Milwaukee, United States
5,0
7
Betalingsmetode verificeret
Medlem siden mar. 17, 2016

Klientverificering

Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.