Deconstructing Primitives

Learn about the ECS architecture in A-Frame and explore the internals of A-Frame primitives.

In this lesson, we’ll explore the fundamental building blocks of ECS, including entities, components, and systems, to better understand this powerful architectural pattern that underpins many interactive software systems.


Let’s revisit the components of ECS:

  • Entities: Containers whose behavior and appearance are defined by components.

  • Components: Logical modules attached to entities, defining their behavior and appearance.

  • Systems: Global scope managers and services for classes of components.

Let’s now learn about the application of the ECS architecture by deconstructing some A-Frame primitives.

Let’s say we have two different entities:

  • Player

  • Enemy

These entities share some components, such as rendering, position, and health.

Get hands-on with 1200+ tech skills courses.