Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Functional, minimal, data-driven, ultra-high performance ECS library written in Javascript
Functional, minimal, data-oriented, ultra-high performance ECS library written using JavaScript TypedArrays.
🔮 Simple, declarative API | 🔥 Blazing fast iteration |
🔍 Powerful & performant queries | 💾 Serialization included |
🍃 Zero dependencies | 🌐 Node or browser |
🤏 <5kb minzipped | 🏷 TypeScript support |
❤ Made with love | 🔺 glMatrix support |
🚀 Unparalleled performance benchmarks
noctjs/ecs-benchmark | ddmills/js-ecs-benchmarks |
npm i bitecs
🏁 Getting Started |
📑 API |
❔ FAQ |
🏛 Tutorial |
import {
createWorld,
Types,
defineComponent,
defineQuery,
addEntity,
addComponent,
pipe,
} from 'bitecs'
const Vector3 = { x: Types.f32, y: Types.f32, z: Types.f32 }
const Position = defineComponent(Vector3)
const Velocity = defineComponent(Vector3)
const movementQuery = defineQuery([Position, Velocity])
const movementSystem = (world) => {
const ents = movementQuery(world)
for (let i = 0; i < ents.length; i++) {
const eid = ents[i]
Position.x[eid] += Velocity.x[eid]
Position.y[eid] += Velocity.y[eid]
Position.z[eid] += Velocity.z[eid]
}
return world
}
const timeSystem = world => {
const { time } = world
const now = performance.now()
const delta = now - time.then
time.delta = delta
time.elapsed += delta
time.then = now
return world
}
const pipeline = pipe(movementSystem, timeSystem)
const world = createWorld()
world.time = { delta: 0, elapsed: 0, then: performance.now() }
const eid = addEntity(world)
addComponent(world, Position, eid)
addComponent(world, Velocity, eid)
Velocity.x[eid] = 1.23
Velocity.y[eid] = 1.23
setInterval(() => {
pipeline(world)
}, 16)
FAQs
Functional, minimal, data-oriented, ultra-high performance ECS library written in Javascript
The npm package bitecs receives a total of 944 weekly downloads. As such, bitecs popularity was classified as not popular.
We found that bitecs 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.