
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@javelin/ecs
Advanced tools
  for Node and web browsers.
Visit https://javelin.games for documentation, examples, and external resources.
Entities are organized by their component makeup into Archetypes for quick lookups and iteration. In a small app (10 component types, 10 archetypes, 10 queries), Javelin can iterate ~2.5 million entities per 16ms on a 2GHz Intel i5 processor.
Define your game's data model using plain old JavaScript objects.
const Transform = {
x: float64,
y: float64,
}
const Inventory = {
bags: arrayOf(arrayOf(uint32)),
}
const world = createWorld()
const entity = world.create(
component(Transform), // => { x: 0, y: 0 }
component(Inventory), // => { bags: [] }
)
Query game state using familiar syntax.
const bodies = createQuery(Transform, Velocity)
const physics = () =>
bodies((e, [t, v]) => {
t.x += v.x
t.y += v.y
})
Best practices are built-in with tools like Topics for inter-system messaging.
const commands = createTopic<PhysicsCommand>()
const movement = () =>
input((e, [input]) => {
if (input.jump) {
commands.push(impulse(e, 0, 10))
}
})
const physics = () => {
for (const command of commands) {
// ...
}
}
and Effects for handling async code, third-party dependencies, and events.
const render = () => {
const scene = useScene()
const model = useLoadGLTF("llama.gltf")
useMonitor(
players,
e => scene.insert(e, model, world.get(e, Transform)),
e => scene.destroy(e),
)
}
FAQs
Unknown package
The npm package @javelin/ecs receives a total of 246 weekly downloads. As such, @javelin/ecs popularity was classified as not popular.
We found that @javelin/ecs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.