Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6208489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:49:03+00:00 2026-05-24T05:49:03+00:00

Say I want a ball bouncing at 5 frames per second and only want

  • 0

Say I want a ball bouncing at 5 frames per second and only want to have a square bouncing at 2 frames per second, how is this possible?

return setInterval(draw,10) is used in the current simulation to move 1000 particles around, but I also want to draw a radial gradient on a second canvas which gets data from the particle simulation. I cant figure out how to draw the gradient a frame per second and the particles at another framerate

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:49:04+00:00Added an answer on May 24, 2026 at 5:49 am

    What i do is create a Timer constructor, and everytime I make something animate, i make a var animateThing = new Timer().

    It may not be necessary to do this, but it can be a useful peice of code as you get deeper into canvas with more moving parts.

    Update
    So something sorta like this.

    function Timer(fps, callback) {
      return setTimout(callback, 1000 / fps);
    }
    
    var timer1 = new Timer(33, callback1);
    var timer2 = new Timer(55, callback2);
    

    Now that’s probably not gonna work, but it’s the idea.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say we want to render a cube. To draw a geometry we need only
Say I want to develop applications for BlackBerry, but I only have a phone
Say I want to have a method that takes any kind of number, is
Say I want to test this module: import osutils def check_ip6(xml): ib_output = osutils.call('iconfig
Say I want to model a system where a piece of data can have
say I want to multiply two matrices together, 50 by 50. I have 2
Say I have 1 red ball, 1 blue ball, 2 yellow balls, and 3
I have an object made of points, lets say its point cloud, i want
I have a set of points and i want to draw a curve which
Say I want to have a global object which can be visible and accessible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.