@javelin/devtool
v0.19.2
Published
Developer tool for Javelin ECS.
Downloads
88
Maintainers
Readme
@javelin/devtool
Developer tool for Javelin ECS.
Usage
import { createDevtool } from "@javelin/devtool"
import { createMessageHandler } from "@javelin/ecs"
const systems = []
const world = createWorld(systems)
const messageHandler = createMessageHandler({ world })
const devtool = createDevtool({
worlds: {
client: world,
},
onMessage(world, message) {
messageHandler.applyMessage(message)
},
})
const { log } = devtool.mount(document.getElementById("devtool"))
log.info("Devtool mounted!")