Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6252209

Browse files
committedMay 14, 2024·
fix test atlas
1 parent 5b7bec9 commit 6252209

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed
 

‎test/atlas/pkg/ant.test.atlas/main_system.lua

+16-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@ local w = world.w
44
local image = require "image"
55
local fastio = require "fastio"
66
local m = ecs.system "main_system"
7-
local iatlas = ecs.require "ant.atlas|atlas"
7+
local iatlas = import_package "ant.atlas"
88
local fs = require "bee.filesystem"
99
local vfs = require "vfs"
1010

1111
local vpath = "/pkg/ant.resources/textures/atlas"
12+
local output = "/test/atlas/pkg/ant.test.atlas"
13+
local rects = {}
14+
15+
for i = 1, 6 do
16+
table.insert(rects, {
17+
irpath = fs.current_path():string() .. vpath .. "/t" .. i .. ".png",
18+
arpath = fs.current_path():string() .. output .. "/t" .. i .. ".a"
19+
})
20+
end
21+
1222
local atlas = {
1323
name = "test", x = 1, y = 1, w = 1024, h = 1024, bottom_y = 1,
14-
vpath = vpath,
15-
rpath = fs.current_path():string() .. vpath
24+
irpath = fs.current_path():string() .. output .. '/out.png',
25+
ivpath = "/pkg/ant.test.atlas/out.png",
26+
trpath = fs.current_path():string() .. output .. "/out.texture",
27+
tvpath = "/pkg/ant.test.atlas/out.texture",
28+
rects = rects
1629
}
1730

1831
function m:init_world()

0 commit comments

Comments
 (0)