mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
Merge 7280cd9062 into fc80d631ab
This commit is contained in:
commit
44fdde05c0
1 changed files with 8 additions and 3 deletions
|
|
@ -25,8 +25,14 @@ local function main(world: jecs.World)
|
|||
:without(ct.TRANSFORM_PREDICTED)
|
||||
:cached()
|
||||
|
||||
local predicted_transforms = world
|
||||
:query(ct.Transform, ct.Renderable)
|
||||
:with(ct.TRANSFORM_PREDICTED)
|
||||
:cached()
|
||||
|
||||
OB.observer(world:query(ct.PivotTo, ct.Renderable), pivots_added)
|
||||
|
||||
|
||||
return function()
|
||||
for entity, transform, renderable in authoritative_transforms do
|
||||
local model = renderable :: Model
|
||||
|
|
@ -55,7 +61,7 @@ local function main(world: jecs.World)
|
|||
end
|
||||
end
|
||||
|
||||
local w = jecs.world()
|
||||
local world = jecs.world()
|
||||
|
||||
local entity = world:entity()
|
||||
local part = Instance.new("Part")
|
||||
|
|
@ -64,6 +70,5 @@ part.Parent = workspace
|
|||
world:set(entity, ct.Renderable, part)
|
||||
world:set(entity, ct.PivotTo, CFrame.new())
|
||||
|
||||
local system = main(w)
|
||||
local system = main(world)
|
||||
system(1/60)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue