Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions test/atlas/pkg/ant.test.atlas/main_system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,28 @@ local w = world.w
local image = require "image"
local fastio = require "fastio"
local m = ecs.system "main_system"
local iatlas = ecs.require "ant.atlas|atlas"
local iatlas = import_package "ant.atlas"
local fs = require "bee.filesystem"
local vfs = require "vfs"

local vpath = "/pkg/ant.resources/textures/atlas"
local output = "/test/atlas/pkg/ant.test.atlas"
local rects = {}

for i = 1, 6 do
table.insert(rects, {
irpath = fs.current_path():string() .. vpath .. "/t" .. i .. ".png",
arpath = fs.current_path():string() .. output .. "/t" .. i .. ".a"
})
end

local atlas = {
name = "test", x = 1, y = 1, w = 1024, h = 1024, bottom_y = 1,
vpath = vpath,
rpath = fs.current_path():string() .. vpath
irpath = fs.current_path():string() .. output .. '/out.png',
ivpath = "/pkg/ant.test.atlas/out.png",
trpath = fs.current_path():string() .. output .. "/out.texture",
tvpath = "/pkg/ant.test.atlas/out.texture",
rects = rects
}

function m:init_world()
Expand Down