fledge_lighting_2d 0.2.3 copy "fledge_lighting_2d: ^0.2.3" to clipboard
fledge_lighting_2d: ^0.2.3 copied to clipboard

2D dynamic lighting for Fledge — point/directional/spot lights, ambient light, additive-blended radial gradients on top of the sprite pass.

fledge_lighting_2d #

2D dynamic lighting for Fledge — point, directional, and spot lights, plus ambient illumination, drawn via an additive Canvas pass on top of the sprite render view.

pub package

Installation #

dependencies:
  fledge_lighting_2d: ^0.2.1

Quick Start #

import 'package:fledge_ecs/fledge_ecs.dart';
import 'package:fledge_lighting_2d/fledge_lighting_2d.dart';
import 'package:fledge_render_2d/fledge_render_2d.dart';
import 'package:flutter/material.dart';

final app = App()
  ..addPlugin(RenderPlugin())
  ..addPlugin(const LightingPlugin(ambient: AmbientLight.dark));

// Torch on the player.
app.world.spawn()
  ..insert(Transform2D.from(200, 200))
  ..insert(GlobalTransform2D.identity())
  ..insert(Light2D.point(
    color: const Color(0xFFFFDD88),
    radius: 180,
    innerRadius: 40,
  ));

runApp(LitFledgeRenderView(app: app));

Documentation #

See the Fledge documentation site for guides, API reference, and advanced usage.

License #

Apache 2.0 - See LICENSE for details.

0
likes
160
points
460
downloads

Documentation

API reference

Publisher

verified publisherfledge-framework.dev

Weekly Downloads

2D dynamic lighting for Fledge — point/directional/spot lights, ambient light, additive-blended radial gradients on top of the sprite pass.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ecs #game-engine #lighting #flutter-games

License

Apache-2.0 (license)

Dependencies

fledge_assets, fledge_ecs, fledge_render_2d, flutter, meta, vector_math

More

Packages that depend on fledge_lighting_2d