mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-26 09:50:02 +00:00
* Add component registration and metadata API * Fix test case erroring * Initial commit * Simplify entity swap logic in world_entity function * Allow to disconnect signals * Remove appending to array * Add ecs_assert and fix entity range handling * Fix listener array indexing in observers * Only max_id and alive_count if range_begin is larger than built in ranges * No nullable records * Index is not a stable pointer
33 lines
543 B
Text
33 lines
543 B
Text
--!optimize 2
|
|
--!native
|
|
|
|
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
local jecs = require(ReplicatedStorage.Lib:Clone())
|
|
local mirror = require(ReplicatedStorage.mirror:Clone())
|
|
|
|
|
|
|
|
return {
|
|
ParameterGenerator = function()
|
|
local ecs = jecs.world()
|
|
ecs:range(1000, 20000)
|
|
local mcs = mirror.World.new()
|
|
return ecs, mcs
|
|
end,
|
|
|
|
Functions = {
|
|
Mirror = function(_, ecs, mcs)
|
|
for i = 1, 100 do
|
|
|
|
mcs:entity()
|
|
end
|
|
end,
|
|
|
|
Jecs = function(_, ecs, mcs)
|
|
for i = 1, 100 do
|
|
|
|
ecs:entity()
|
|
end
|
|
end,
|
|
},
|
|
}
|