Comments (4)
Sorry for the noise, I think this one was my mistake, figured it out trying to make a more minimal case.
from quicksilver.
The loop as provided in the examples seems to run very slowly. I am "animating" by moving some objects up 50 pixels every event loop iteration
That doesn't seem to be exactly what the code does, as it contains an if to only add a new piece of text every 10th iteration, rather than every iteration.
i += 1;
if i % 10 == 0 {
let chunk = TextChunk::new(format!("hello {}", i));
text_window.append(chunk);
}
I think this is the cause for the rendering looking slow because even at 60 iterations per second you only get a new piece of text 6 times per second.
from quicksilver.
Sorry should have mentioned that. It looked like it was only updating once per second or slower. Earlier I did another test where I just moved text one pixel every iteration, which I'd expect to definitely fly across the screen, and it also noticably crawled. I can upload that simpler example tomorrow.
from quicksilver.
I tried running the code you gave. In its current form it seemed to work fine for me (haven't counted the frames but it felt like 6fps) and I also ran it without the if and that also seemed fine (again, didn't count fps).
from quicksilver.
Related Issues (20)
- Use try_init() for logging HOT 1
- stdweb works but web-sys does not HOT 3
- There should be an option to resize the canvas along with the browser window HOT 10
- Are subimages still a thing? HOT 3
- Rendering to surfaces also renders to regular window? HOT 2
- Rendering to surface is upside down HOT 2
- Text extents says y size is 0 HOT 3
- How to get release key event HOT 1
- Pointer state location is always (0,0) HOT 2
- Crash when attempting to load font in the web + wasm_bindgen context
- Line width and end-cap options for `draw_mesh`. HOT 2
- Settings icon_path doesn't seem to do anything on Web or MacOS? HOT 5
- More advanced click handling… HOT 4
- Derive Debug/Clone for Timer HOT 2
- Graphics screen_to_camera doesn't take translation into account HOT 5
- Add a way to inject events into the stream. HOT 3
- Document a workflow for building and deploying with wasm-bindgen
- Deprecate stdweb and migrate to web-sys HOT 4
- Large binaries
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 quicksilver.