Excalibur.js logoDocsSamplesCommunityGalleryContributeBlogDonate
Open Table of Contents Close Table of Contents
Documentation
Introduction
WelcomeExcalibur's Philosophy
Getting Started
Installation GuideGetting StartedBuild & Bundlers
Fundamentals
ActorsEngine FundamentalsCamerasScenesClock
Screen & Viewport
DisplayModesScreen & Viewport
Graphics
ColorGraphicsLinesSpritesSpritesheetsText & FontsAnimationCanvasGraphics ComponentGraphics GroupGraphics ContextParallaxPostProcessorsCustom Renderer Plugins
Entity Component System
ECSEntitiesComponentsSystemsQueries
Resources
ImageSourceLoaderSound
Actions
ActionsBlinkCallMethodParallel ActionsDelayEaseToMoveTo/MoveByFadeRotateTo/RotateByRepeatDieFollowMeetScaleTo/ScaleBy
TileMaps
Isometric TileMapsTileMap
Math
MatrixRandomRayVector
Physics
PhysicsFixed UpdateBodiesCollidersCollision EventsCollision GroupsCollision Types
Input
InputKeyboardPointersGamepad
Migration Guides
Migration
Other
Debugging TipsEventsPatternsTimersTriggersUIParticlesPerformanceHosting Excalibur GamesUtilities
Plugins
Aseprite pluginTiled PluginDev Tool
Examples
API Reference
Edge (latest)v0.27.0v0.26.0v0.25.3v0.25.2v0.25.1

Fade

Fade

This action method will cause Actor or Entity GraphicsComponent opacity to change from its current value to the provided value by a specified time (in milliseconds). This method is part of the actor 'Action' fluent API allowing action chaining.

const actor = new ex.Actor({
  width: 100,
  height: 100,
  color: ex.Color.Red,
})

// fade to invisible over 2000 ms
actor.actions.fade(0, 2000)
Get Involved
GitHub RepoOpen an IssueAsk a QuestionDonate
Excalibur.js logo
Free & Open Source (BSD 2-Clause)