local api = ... local ecs = api.ecs return { name = "skeleton", enabled = true, init = function() --api.ext.skeleton.extendECS() end, update = function() local iui = api.iui local backend = api.backend local mainWindow = api.mainWindow end, load = function() end, draw = function(pass) if api.iui.idiom == "vr" then else end end, -- ECS API docs: https://bakpakin.github.io/tiny-ecs/doc extendECS = function() local exampleSystem = ecs.processingSystem({ updatethread = true, -- drawthread = true filter = ecs.requireAll('mycomponent'), onAdd = function(self,obj) print_r(obj) end, onRemove = function(self,obj) end, process = function(self,obj) end, }) ecs.addSystem( api.world, exampleSystem ) -- add example entity object local obj = { foo = "bar", mycomponent = { a = 1 } } ecs.add( api.world, obj ) obj.commit() -- notify other systems to update entitycache end }