Comments (6)
the step size is around 28ms. Can I get the step size to change but keep the FPS above 30?
from ccapture.js.
Without knowing more about your project, that's probably happening because your animation is frame-dependant. That is: if you increment your position 1 unit per frame, it will increment 60 units at 60FPS, 30 units at 30FPS and 960 units at 960FPS.
You have to make your animations time dependant, that is: based on time. Calculate the delta time (time elapsed between the current frame and the last frame) and use that as a factor of your calculations.
Would that explain your problem?
from ccapture.js.
Thanks, got it figured out. My animations are based on time, just large time hops (orbits).
from ccapture.js.
Hello, I'm using Createjs to create banner animations. I have a similar to the above mentioned problem:
When I lower the framerate, the animation becomes too choppy, when I increase it, it plays back way too fast
I think this is due to the Ticker used to create the animations in Createjs.
The video works correctly when I set the framerate in the Ccapture to 60, but not on any other value.
If I set the framerate to 1 and the type to 'png' or 'jpg', then in the archive I still get around 60 images per second (not sure if this is related the above though).
Do you think that the Ticker is creating frame-dependent animations instead of time-dependent ones as you explained it above and that is causing the mix-up?
from ccapture.js.
As long as there's code somewhere that is adding per-frame (let's say position = position + 1
) you're going to have this kind of problems. If that code was running correctly at 60FPS (position is incremented 60 times a second), it will run slower if the framerate is 30 (position will be incremented 30 times a second) or extremely fast if, for instance, you use the motion blur preset from ccapture (position will be incremented ~960 times a second).
The ways most libraries sync with time are intercepted by ccapture (setTimeout, setInterval, requestAnimationFrame, Date methods ,etc.). So from the libs perspective, time is running at exactly the expected rate.
Usually a speed problem would be in your animation loop, but there's precedent of weird stuff, like GreenSock's Tween library caching Date.now before ccapture can intercept it.
from ccapture.js.
from ccapture.js.
Related Issues (20)
- Is it possible to do capturing in a Web Worker thread? HOT 1
- Capture an audio-reactive application HOT 3
- using CCapture to render a javascript starfield animation as a webm file HOT 2
- .tar is empty HOT 1
- gif transparency?
- How to use it with Lottie ?
- I have an error message in Terminal when I roll up with CCapture HOT 1
- Usage with React: .start() causes window.requestAnimationFrame to stop working. HOT 2
- "Seeked" event doesn't trigger on html5 video when CCapturer is on HOT 4
- Angular NPM WebMWriter not defined HOT 2
- Error: Uncaught [TypeError: window.CCapture is not a constructor] HOT 1
- rangeerror maximum call stack size exceeded ccapture
- Uncaught (in promise) ReferenceError: download is not defined
- ReferenceError: window is not defined HOT 2
- How can I record the canvas background
- CCapture with setInterval not working
- how can i record again without reloading the page?
- CCapture package can't be installed thru npm
- What is workers path? HOT 1
- Use for record animation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ccapture.js.