Am 11.05.20 um 22:25 schrieb Mr Flibble:
> auto const explosionMaterial = ng::game::material
> {
> {}, {},
Wow. So simple. Why not add a few other braces here: {}, {}, {} ? Would
be even cooler!
> ecs.shared_component<ng::game::texture>().populate("explosion",
> ng::to_ecs_component(ng::image{ ":/test/resources/explosion.png" }))
> };
> auto const explosionAnimation = ng::game::animation_filter
> {
>
> ecs.shared_component<ng::game::animation>().populate("explosion",
> ng::game::regular_sprite_sheet_to_animation(explosionMaterial,
> ng::vec2u32{ 4u, 3u }, 0.1))
> };
> auto explosion = ecs.create_entity(archetypes::explosion,
> explosionMaterial, explosionAnimation);
IOW, to you it may seem simple, to me it is just gibberish. And the
nesting of different braces <({ sprinkled with names reminds me of LISP
code.
Christian