hammer/lib/init.luau
Mark Marks cab13e4213 chore: Make jecs a dependency, bump jecs to v0.3.0
+ Make jecs a wally dependency instead of a file in lib. This wasn't done earlier due to wally packages not being able to be used outside of Roblox without dynamically requiring them. Now, a script is used to download the latest source of jecsfrom Github associated with the version in the manifest.

+ Bump jecs-utils to v0.1.3 and release
2024-09-24 15:35:21 +02:00

33 lines
985 B
Text

--!strict
--!optimize 2
local jecs = require("@jecs")
local WORLD = require("./world")
local collect = require("./collect")
export type collect_signal_like<T...> = collect.signal_like<any, T...>
export type collect_verbose_signal_like<D, T...> = collect.signal_like<D, T...>
local command_buffer = require("./command_buffer")
export type command_buffer = command_buffer.command_buffer
local handle = require("./handle")
export type handle = handle.handle
local ref = require("./ref")
local replicator = require("./replicator")
export type replicator = replicator.replicator
export type changes = replicator.changes
--- Set the world for all utilities.
--- Should be called once per context before any utility is used.
--- @param world jecs.World
local function initialize(world: jecs.World)
WORLD.set(world)
end
return {
initialize = initialize,
collect = collect,
handle = handle,
replicator = replicator,
ref = ref,
command_buffer = command_buffer,
}