fullptr / apecs Goto Github PK
View Code? Open in Web Editor NEWA petite entity component system
License: MIT License
A petite entity component system
License: MIT License
Whenever you call the callbacks the code reads
for (auto cb : std::get<std::vector<callback_t<Comp>>>(d_on_add)) {
cb(entity, ret);
}
where probably you'd want to use for( auto& cb : ...
in order to not copy the callback object into cb
.
Line 573, which is in member function registry<Comps...>::view()
, currently reads
apx::entity = d_entities[index];
which I needed to change to
apx::entity entity = d_entities[index];
in order to make it compile (with GCC10).
Hi, really like the minimalist approach of apecs!
I just tried compiling with GCC10 and stumbled over the following issue:
In template class handle
the type of member field registry
depends on the template parameters of handle
.
In the member functions of handle
that call registry->function<Comp>(...)
it is therefore necessary to use the template
keyword as in registry->template function<Comp>(...)
.
In member function registry<Comps...>::add(apx::entity entity, Comp&& component)
the argument component
is passed on with std::move()
even though Comp
could be some_component_type&
.
Since emplace()
does it correctly you probably know that you just need to use std::forward
instead, and can then remove the other overload of add()
, the one with the const Comp&
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.