MCPcopy Create free account
hub / github.com/melonjs/melonJS / fadeOut

Method fadeOut

packages/melonjs/src/camera/camera2d.ts:742–755  ·  view source on GitHub ↗

* fadeOut(flash) effect * screen is filled with the specified color and slowly goes back to normal * @param color - a CSS color value * @param [duration=1000] - expressed in milliseconds * @param [onComplete] - callback once effect is over * @example * // fade the camera to white upon

(
		color: Color | string,
		duration: number = 1000,
		onComplete?: () => void,
	)

Source from the content-addressed store, hash-verified

740 * });
741 */
742 fadeOut(
743 color: Color | string,
744 duration: number = 1000,
745 onComplete?: () => void,
746 ): void {
747 this.addCameraEffect(
748 new FadeEffect(this, {
749 color,
750 duration,
751 direction: "out",
752 onComplete,
753 }),
754 );
755 }
756
757 /**
758 * fadeIn effect <p>

Callers 3

camera.spec.jsFile · 0.80
updateMethod · 0.80
updateMethod · 0.80

Calls 1

addCameraEffectMethod · 0.95

Tested by

no test coverage detected