Comments (1)
@spustlik Thanks for the issue, definitely a bug. The fade routines are flawed
There are situations where it is possible for this to never be true because of the discrete simulation
You might be able to use coroutine in place of the fade action
var newFadeBy = (actor: ex.Actor, fadeChange: number, durationSeconds: number) => {
// coroutines start automatically
ex.coroutine(function* () {
let duration = durationSeconds * 1000; // milliseconds
let fadeChangeRate = fadeChange / duration;
let targetOpacity = actor.graphics.opacity + fadeChange;
while (duration > 0) {
const elapsed = yield;
duration -= elapsed;
actor.graphics.opacity += fadeChangeRate * elapsed;
}
actor.graphics.opacity = targetOpacity;
});
};
actor.onInitialize = () => {
newFadeBy(actor, -1.0, 2);
};
from excalibur.
Related Issues (20)
- Support Uniform Buffer Objects in Materials and Postprocessors
- Transition `blockInput: true` only works on input events
- Add option to ActionsComponent to cancel currently executing actions on collision
- docs: Actions with collisions
- issue with trySetUniformFloatColor() in shader.ts HOT 1
- precollision event inconsistencies between Actor hook and ColliderComponent event HOT 2
- Customize default systems for all scenes HOT 3
- Change "priority" on System to be a static member HOT 2
- Align onXYZ method signatures to match event payloads HOT 1
- Bad background color in _DEFAULT_ENGINE_OPTIONS HOT 3
- drawLine uses <RectangleRenderer> instead of <LineRenderer> HOT 5
- Graphic.tint nullability HOT 2
- Adjusting contact mtv and/or normal has issues when self is colliderB HOT 2
- JSDocs System.ts HOT 1
- scenes consistently swallowing keyboard events after switching back and forth HOT 4
- unused scene loader fails scene transitions and locks up engine HOT 1
- docs: Update all engine source code Markdown comment symbol links to `{@apilink}` HOT 2
- [proposal] Make the screen/viewport capable of using layers HOT 10
- ArcadeSolver buggy collision resolution and ContactSolveBias HOT 12
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 excalibur.