Skip to content

Commit

Permalink
fix test atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
HengHuH committed May 14, 2024
1 parent 5b7bec9 commit 6252209
Showing 1 changed file with 16 additions and 3 deletions.
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

0 comments on commit 6252209

Please sign in to comment.