size_t pretty_type() [T = Position]
size_t pretty_enum() [E = Color, C = Red]
size_t pretty_enum() [E = Color, C = 3]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using flecs.script.* | |
| using flecs.components.* | |
| using flecs.game | |
| // "Terraced canyon & lava vein" — stepped mesas + deep cut + glowing lava river | |
| const Resolution: 185 | |
| const Scale: 44 / Resolution | |
| const Size: 58 | |
| const Height: 2.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using flecs.components.* | |
| using flecs.script.* | |
| const Size = 100 | |
| const Res = 200 | |
| const Scale = 10 | |
| const P = Size / Res | |
| const M = Size / Scale / P |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using flecs.script.* | |
| using flecs.components.* | |
| using flecs.game | |
| const Resolution: 175 | |
| const Scale: 40 / Resolution | |
| const Size: 50 | |
| const Height: 1.8 | |
| const CellW: Size / Resolution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using flecs.script.* | |
| using flecs.components.* | |
| const xMax = 250 | |
| const yMax = 500 | |
| const xCenter = xMax / 2 | |
| const yCenter = yMax / 2 | |
| const sand = Rgb: {0.92, 0.86, 0.55} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <prefab_storage_tests.h> | |
| #include <stdio.h> | |
| ECS_COMPONENT_DECLARE(Position); | |
| ECS_COMPONENT_DECLARE(Rotation); | |
| ECS_COMPONENT_DECLARE(Velocity); | |
| ECS_COMPONENT_DECLARE(Transform); | |
| ECS_COMPONENT_DECLARE(TransformRef); | |
| ECS_COMPONENT_DECLARE(Parent); | |
| ECS_COMPONENT_DECLARE(Children); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using flecs.script.* | |
| using flecs.components.* | |
| using flecs.game | |
| const Stone = Rgb: {0.4, 0.3, 0.3} | |
| const SideWalk = Rgb: {0.4, 0.4, 0.4} | |
| const Concrete = Rgb: {0.3, 0.3, 0.3} | |
| const Door = Rgb: {0.1, 0.07, 0.04} | |
| const Frame = Rgb: {0.7, 0.7, 0.7} | |
| const Awning = Rgb: {0.06, 0.08, 0.05} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Code uses a custom benchmarking solution (vs. criterion) so that the numbers | |
| // are comparable to the Flecs benchmarks in this repository: | |
| // https://github.com/SanderMertens/ecs_benchmark | |
| use bevy_ecs::prelude::*; | |
| // use bevy_hierarchy::*; | |
| use bevy_ecs::world::CommandQueue; | |
| use std::hint::black_box; | |
| use rand; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Test for importing script from URL | |
| using flecs.components.* | |
| using flecs.game | |
| using assemblies | |
| town :- Town{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <c_app.h> | |
| #include "flecs.h" | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define STARS (1000) | |
| #define PLANETS_MAX (10) | |
| #define P_PLANET_WATER (0.1) | |
| #define P_PLANET_OIL (0.005) | |
| #define P_PLANET_COPPER (0.05) |
NewerOlder