Giter Site home page Giter Site logo

foxnne / pixi Goto Github PK

View Code? Open in Web Editor NEW
536.0 10.0 17.0 12.97 MB

Pixel art editor made with Zig.

Home Page: https://foxnne.github.io/pixi/

License: MIT License

Zig 49.32% C 9.22% C++ 40.65% WGSL 0.04% Objective-C 0.78%
2d animation cross-platform editor gamedev imgui mit-license pixelart zig ziglang

pixi's People

Contributors

brookjeynes avatar fabioarnold avatar foxnne avatar jeremy-coleman avatar jonsnowbd avatar kamidev avatar visendev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixi's Issues

Zig semantic analysis fails on case-sensitive filesystems

/home/nixigaj/dev/exp/pixi/src/pixi.zig:52:30: error: unable to load '/home/nixigaj/dev/exp/pixi/src/Settings.zig': FileNotFound
pub const Settings = @import("Settings.zig");

This can be fixed by changing this line to pub const Settings = @import("settings.zig");:

pub const Settings = @import("Settings.zig");

or changing the name of settings.zig.

OS: Fedora 38 with XFS
Zig version: 0.12.0-dev.297+d2014fe97

Configurable Hotkeys

I tried to give this a shot early on, and Hotkeys.zig holds all the current default hotkeys. We will need to add a section in the settings to configure and change these hotkeys and save them with settings.

Settings do not get saved currently

Need to come up with a good way to handle user settings and saving between sessions. Likely something similar to how we handle recents and things like that.

system-sdk: I can still see a symlink there

Looks like there are still some symlinks in zig-gamedev/libs/macos12:

For example:
https://github.com/foxnne/pixi/blob/main/src/deps/zig-gamedev/system-sdk/macos12/System/Library/Frameworks/ApplicationServices.framework/ApplicationServices.tbd

Please make sure to delete the entire system-sdk folder and copy it again from zig-gamedev.

Build error due to hash mismatch

System info

zig version: 0.12.0-dev.1092+68ed78775
OS: Ubuntu 22.04.3 LTS

Build error output

$ zig build run
Fetch Packages [9/8] /home/ngupta/src/pixi/build.zig.zon:16:21: error: hash mismatch: manifest declares 12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662 but the fetched package has 1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
            .hash = "12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:20:21: error: hash mismatch: manifest declares 1220120328740b87b10f373b8b716d5fb7f73b437c770d18cc9012137328f2dd30e2 but the fetched package has 1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
            .hash = "1220120328740b87b10f373b8b716d5fb7f73b437c770d18cc9012137328f2dd30e2",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:24:21: error: hash mismatch: manifest declares 122098cc0b0a39d24aaffcd6d5556e8f31f5dd1a754559ffa468918f2ed6c1ad0a03 but the fetched package has 1220c254a60ad909c6eed868977cfec39a9f6e475f7df1794dd8ff4e0f8ee346c50d
            .hash = "122098cc0b0a39d24aaffcd6d5556e8f31f5dd1a754559ffa468918f2ed6c1ad0a03",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:28:21: error: hash mismatch: manifest declares 12202044ed9fd69af156b0afde619ffd1d111554c557f57ab670ca9960e76d60d0b8 but the fetched package has 1220cf991e2155684c173f03dbc470e3745645eb1da9c2b04e8221fe3ea575130a5e
            .hash = "12202044ed9fd69af156b0afde619ffd1d111554c557f57ab670ca9960e76d60d0b8",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:32:21: error: hash mismatch: manifest declares 1220d0bf732d8291b8629ce7e115efb6adef84dcc1218317ee0a89a6f1663153f2a9 but the fetched package has 1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
            .hash = "1220d0bf732d8291b8629ce7e115efb6adef84dcc1218317ee0a89a6f1663153f2a9",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:36:21: error: hash mismatch: manifest declares 12206ca5fe2c3d35964b3a1cd30c4ff4e1050852f0062db0dda122513dc9477d5115 but the fetched package has 12205c30ad438ec20bc16300b10eede7c26788e5ed41e99200b57f3bab2f85c1b46e
            .hash = "12206ca5fe2c3d35964b3a1cd30c4ff4e1050852f0062db0dda122513dc9477d5115",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:40:21: error: hash mismatch: manifest declares 12206ed50a939287c717f76547baf24e54301de4500505c19f10965ef559619baf10 but the fetched package has 1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
            .hash = "12206ed50a939287c717f76547baf24e54301de4500505c19f10965ef559619baf10",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ngupta/src/pixi/build.zig.zon:44:21: error: hash mismatch: manifest declares 1220cba50a09790cc799b5923b61f65425dd82959408efdc5c221a6801d5af4e4c89 but the fetched package has 1220e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
            .hash = "1220cba50a09790cc799b5923b61f65425dd82959408efdc5c221a6801d5af4e4c89",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Problems building on Linux

Hi,
I tried to build on Linux, but so far no success.
The problem seems to be in the compilation of the src/deps/zip/src/zip.c file.
I tried to play around with the compiler flags in src/deps/zip/build.zig, but so far I didn't have success.

Building with --verbose gives the following output:

zig build-exe pixi Debug native: error: error(compilation): clang failed with stderr: In file included from /home/moritz/workspace/pixi/src/deps/zip/src/zip.c:39:
/home/moritz/workspace/pixi/src/deps/zip/src/miniz.h:4988:9: warning: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files. [-W#pragma-messages]
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:328:16: error: call to undeclared function 'fileno'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:329:14: error: call to undeclared function 'ftruncate'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:430:11: error: call to undeclared function 'symlink'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:1596:62: error: use of undeclared identifier 'S_ISVTX'
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:1609:7: error: call to undeclared function 'S_ISSOCK'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:1612:28: error: use of undeclared identifier 'S_IFMT'
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:1612:39: error: use of undeclared identifier 'S_IFDIR'
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:1995:64: error: use of undeclared identifier 'S_ISVTX'
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:2008:9: error: call to undeclared function 'S_ISSOCK'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:2011:30: error: use of undeclared identifier 'S_IFMT'
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:2011:41: error: use of undeclared identifier 'S_IFDIR'


zig build-exe pixi Debug native: error: the following command failed with 1 compilation errors:
/home/moritz/.zvm/0.11.0/zig build-exe /home/moritz/.cache/zig/p/12206e93994d37b3ce5c790e391736130f2a26bec06eca01ca51ab08a6d8105ab7f9/src/platform/native/main.zig /home/moritz/workspace/pixi/zig-cache/o/24b413b1ee93732ef819956cbc15e503/libglfw.a /home/moritz/workspace/pixi/zig-cache/o/866ee5f3cd50f6a21b2eaf412d05620d/libvulkan-headers.a /home/moritz/workspace/pixi/zig-cache/o/d91e3cdb1eebcfa48768a0283e3a5ce3/libx11-headers.a /home/moritz/workspace/pixi/zig-cache/o/a73a6e599325954e781c94589ebc6a22/libwayland-headers.a /home/moritz/workspace/pixi/zig-cache/o/6368440c09a64a737825bb496b5dfd1e/libvulkan-headers.a /home/moritz/workspace/pixi/zig-cache/o/7131266b8d63acd3a8dfb32082645086/libx11-headers.a /home/moritz/workspace/pixi/zig-cache/o/ddb3369925ede10e1a61d7ada6557a63/libwayland-headers.a -cflags -std=c++17 -- /home/moritz/.cache/zig/p/12209e517b8b459b95fb66f045580a66f8901970e7416f2ae90613df63adb710e19c/src/mach_dawn.cpp /home/moritz/workspace/pixi/zig-cache/o/1e610ab9854fd7e7cc42c5fa99f41699/libnfd.a -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -latk-1.0 -lgobject-2.0 -lglib-2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 -lgtk-3 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lgobject-2.0 -lglib-2.0 /home/moritz/workspace/pixi/zig-cache/o/8f63f04e226365b5cf6b4137a17f2df2/libzstbi.a /home/moritz/workspace/pixi/zig-cache/o/cd7bc3bc83f85d578a4e400e721a4f6d/libzgui.a -ldawn -cflags -std=c99 -fno-sanitize=undefined -Wno-error -- /home/moritz/workspace/pixi/src/deps/zip/src/zip.c -ldawn -lc++ -lc --cache-dir /home/moritz/workspace/pixi/zig-cache --global-cache-dir /home/moritz/.cache/zig --name pixi --mod mach-glfw::/home/moritz/.cache/zig/p/122002e355cf42b8d257efc95229c9ee6be4cca189c1718f86179cb7c21225beeb75/src/main.zig --mod zmath_options::/home/moritz/workspace/pixi/zig-cache/c/e509c24c6875314c018ffd153187081b/options.zig --mod gamemode::/home/moritz/.cache/zig/p/12207678927df42d7895a72fc220a5a18e21f241b42ca6cb6c1c3004a54bdd314d1d/src/main.zig --mod gpu::/home/moritz/.cache/zig/p/12209e517b8b459b95fb66f045580a66f8901970e7416f2ae90613df63adb710e19c/src/main.zig --mod app:core,zstbi,zmath,zgui,nfd=nfd0,zip:/home/moritz/workspace/pixi/src/pixi.zig --mod core:gpu,glfw=mach-glfw,gamemode:/home/moritz/.cache/zig/p/12206e93994d37b3ce5c790e391736130f2a26bec06eca01ca51ab08a6d8105ab7f9/src/main.zig --mod nfd0::/home/moritz/workspace/pixi/src/deps/nfd-zig/src/lib.zig --mod zstbi::/home/moritz/workspace/pixi/src/deps/zig-gamedev/zstbi/src/zstbi.zig --mod nfd::/home/moritz/workspace/pixi/src/deps/nfd-zig/src/lib.zig --mod zgui:zgui_options:/home/moritz/workspace/pixi/src/deps/zig-gamedev/zgui/src/main.zig --mod zip::/home/moritz/workspace/pixi/src/deps/zip/zip.zig --mod zgui_options::/home/moritz/workspace/pixi/zig-cache/c/2723cee70181f1b014942fd461e32628/options.zig --mod zmath:zmath_options:/home/moritz/workspace/pixi/src/deps/zig-gamedev/zmath/src/main.zig --deps glfw=mach-glfw,gamemode,core,app,mach-glfw,zstbi,zgui,zmath,nfd,zip -I /home/moritz/.cache/zig/p/12205a6ce386007b97e22ef4b78a4f68c98af2cd6e1fde82589191fda79b9de54d0d/include -I /home/moritz/workspace/pixi/zig-cache/i/167f9d52e604e61f23eea80a2b9e971a/include -I /home/moritz/workspace/pixi/zig-cache/i/14b46a3e15be19157371235065e51d6b/include -I /home/moritz/workspace/pixi/zig-cache/i/899bf3d5091aaceefe8404027451dafd/include -I /home/moritz/workspace/pixi/zig-cache/i/23b3b26164c3d2226e55e8631241c626/include -I /home/moritz/.cache/zig/p/12209e517b8b459b95fb66f045580a66f8901970e7416f2ae90613df63adb710e19c/src -I /home/moritz/workspace/pixi/src/deps/zig-gamedev/zgui/src -I /home/moritz/workspace/pixi/src/deps/zig-gamedev/zgui/libs -I /home/moritz/workspace/pixi/src/deps/zig-gamedev/zgui/libs/imgui -I /home/moritz/workspace/pixi/src/deps/zig-gamedev/zgui/libs/imgui/backends -I /home/moritz/workspace/pixi/src/deps/zip/src -I /home/moritz/workspace/pixi/zig-cache/mach/gpu-dawn/release-d7b308b/include -I /home/moritz/.cache/zig/p/122000a081af36ea3c216b7514c390a287b26df1e8d3b1f83b951ab319b51e34acb8/src/dawn -L /home/moritz/workspace/pixi/zig-cache/mach/gpu-dawn/release-d7b308b/x86_64-linux-gnu/release-fast --main-pkg-path /home/moritz/.cache/zig/p/12206e93994d37b3ce5c790e391736130f2a26bec06eca01ca51ab08a6d8105ab7f9/src -fno-lto --listen=- 
Build Summary: 31/36 steps succeeded; 1 failed (disable with --summary none)
install transitive failure
├─ install pixi transitive failure
│  └─ zig build-exe pixi Debug native 1 errors
└─ pixi transitive failure
   └─ install pixi transitive failure
      └─ zig build-exe pixi Debug native (+22 more reused dependencies)
/home/moritz/workspace/pixi/src/deps/zip/src/zip.c:1:1: error: unable to build C object: clang exited with code 1

I'm using zig v0.11.0 and run a pretty standard ubuntu 22.04 installation.
Any help in resolving this would be greatly appreciated.

[macOS] Window freezes and flashes magenta unpredictably on random file loads

This is a long-standing issue since moving to zig-gamedev, I'm unsure of the cause and it seems to be rather random, some file loads trigger it and some don't, and not the same files every time. It can be forced to happen by loading many files, i.e. packing a full project.

I suspect that the issue is related to this, however, I'm unable to verify yet until the dawn lib is updated.

I did try to debug the application using Xcode, which did at least reveal the following error messages:

2023-07-11 13:09:07.434221-0500 Pixi[71341:647781] Metal GPU Frame Capture Enabled
2023-07-11 13:09:07.434349-0500 Pixi[71341:647781] Metal API Validation Enabled
info: [zgpu] High-performance device has been selected:
info: [zgpu]   Name: Apple M2
info: [zgpu]   Driver: Metal driver on macOS Version 13.4.1 (Build 22F82)
info: [zgpu]   Adapter type: discrete_gpu
info: [zgpu]   Backend type: metal
2023-07-11 13:09:18.445450-0500 Pixi[71341:647781] +[CATransaction synchronize] called within transaction
2023-07-11 13:09:19.581168-0500 Pixi[71341:647781] [default] CGSWindowShmemCreateWithPort failed on port 0
2023-07-11 13:09:45.459204-0500 Pixi[71341:648487] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOGPUCommandBufferCallbackErrorTimeout)
...
2023-07-11 13:09:45.465631-0500 Pixi[71341:648487] Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (00000004:kIOGPUCommandBufferCallbackErrorSubmissionsIgnored)

Double clicking the toolbar title bar crashes the application

I'm undocking and double clicking the title bar. Sorry, I don't know why my mouse cursor isn't being recorded. :(

Pixi_rfwlVPtvwb.mp4

Output:

Assertion failed: (g.CurrentWindowStack.Size == 1) && "Mismatched Begin/BeginChild vs End/EndChild calls: did you forget to call End/EndChild?", file C:\Users\Fabio\Developer\pixi\src\deps\upaya\src\deps\imgui\cimgui\imgui\imgui.cpp, line 7529
The following command exited with error code 3 (expected 0):
cd C:\Users\Fabio\Developer\pixi && C:\Users\Fabio\Developer\pixi\zig-out\bin\Pixi.exe 
error: UnexpectedExitCode

Use case: Tiling visualization

It would be useful to be able to have a way to visualize how a sprite would look tiled. This would be very useful for things like creating tilesets

Document Zig version

Looks like a cool project. Could you document which version of Zig can build this project and include that in the README?

Failure to compile without gtk3-dev installed

When trying to run the project I get the following error:

/home/keith/github/pixi/src/deps/nfd-zig/nativefiledialog/src/nfd_gtk.c:1:1: error: unable to build C object: clang exited with code 1
error: nfd...
error: The following command exited with error code 1:
/home/keith/apps/zig-linux-x86_64-0.10.0/zig build-lib /home/keith/github/pixi/src/deps/nfd-zig/src/lib.zig -cflags -Wall -- /home/keith/github/pixi/src/deps/nfd-zig/nativefiledialog/src/nfd_common.c -cflags -Wall -- /home/keith/github/pixi/src/deps/nfd-zig/nativefiledialog/src/nfd_gtk.c -lc -latk-1.0 -lgdk-3 -lgtk-3 -lglib-2.0 -lgobject-2.0 --cache-dir /home/keith/github/pixi/zig-cache --global-cache-dir /home/keith/.cache/zig --name nfd -static -I /home/keith/github/pixi/src/deps/nfd-zig/nativefiledialog/src/include --enable-cache
error: the following build command failed with exit code 1:
/home/keith/github/pixi/zig-cache/o/82d56624fe6eb18572bc1eeb3f795282/build /home/keith/apps/zig-linux-x86_64-0.10.0/zig /home/keith/github/pixi /home/keith/github/pixi/zig-cache /home/keith/.cache/zig run

Maybe you can add gtk-3 requirement in README?

Implement `camera` for canvas

  • Implement a camera struct that allows for zooming/scaling and panning the current document texture on the canvas.

Allow resizing, but via adding/removing rows/columns

I've been considering allowing file resize, but with respect to animations and sprite names, this could get messy quickly.

As .pixi files are typically much larger than they have to be, and new files can be created easily to allow more sprites to the final packed atlas, I think the best way to allow "resizing" of the whole artboard is to go with an approach that allows you to add/remove rows and columns. This would need to create a new image per layer and copy/edit the artwork to the new image without destroying all previously created animations.

Build error related to libdawn

Compiler version:

⟩ zig-master version
0.10.0-dev.4476+0f0076666

OS info: Fedora 36, Linux 5.19.15-201.fc36.x86_64

Compile error:

zig-master build run
LLD Link... ld.lld: error: /home/justin/workspace/pixi/src/deps/zig-gamedev/zgpu/libs/dawn/x86_64-linux-gnu/libdawn.a:1: unknown directive: version
>>> version https://git-lfs.github.com/spec/v1
>>> ^
error: FileNotFound
/home/justin/system/zig-master/lib/std/os.zig:2755:19: 0x2c54e6 in mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/home/justin/system/zig-master/lib/std/os.zig:2715:9: 0x2af627 in mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/home/justin/system/zig-master/lib/std/fs.zig:1402:9: 0x2af51b in makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/home/justin/system/zig-master/lib/std/os.zig:2755:19: 0x2c54e6 in mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/home/justin/system/zig-master/lib/std/os.zig:2715:9: 0x2af627 in mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/home/justin/system/zig-master/lib/std/fs.zig:1402:9: 0x2af51b in makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/home/justin/system/zig-master/lib/std/build.zig:2112:13: 0x34dd6e in runPkgConfig (build)
            return error.PackageNotFound;
            ^
/home/justin/system/zig-master/lib/std/os.zig:2755:19: 0x2c54e6 in mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/home/justin/system/zig-master/lib/std/os.zig:2715:9: 0x2af627 in mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/home/justin/system/zig-master/lib/std/fs.zig:1402:9: 0x2af51b in makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/home/justin/system/zig-master/lib/std/build.zig:2112:13: 0x34dd6e in runPkgConfig (build)
            return error.PackageNotFound;
            ^
/home/justin/system/zig-master/lib/std/os.zig:1689:23: 0x314b78 in openatZ (build)
            .NOENT => return error.FileNotFound,
                      ^
/home/justin/system/zig-master/lib/std/fs.zig:1151:13: 0x2f8da6 in openFileZ (build)
            try os.openatZ(self.fd, sub_path, os_flags, 0);
            ^
/home/justin/system/zig-master/lib/std/fs.zig:1078:9: 0x2d64c8 in openFile (build)
        return self.openFileZ(&path_c, flags);
        ^
/home/justin/system/zig-master/lib/std/fs.zig:2508:24: 0x33a210 in updateFile (build)
        var src_file = try source_dir.openFile(source_path, .{});
                       ^
/home/justin/system/zig-master/lib/std/build.zig:1089:29: 0x33b087 in updateFile (build)
        const prev_status = try fs.Dir.updateFile(cwd, source_path, cwd, dest_path, .{});
                            ^
/home/justin/system/zig-master/lib/std/build.zig:3417:9: 0x367f34 in make (build)
        try builder.updateFile(self.artifact.getOutputSource().getPath(builder), full_dest_path);
        ^
/home/justin/system/zig-master/lib/std/build.zig:3649:9: 0x2c58f7 in make (build)
        try self.makeFn(self);
        ^
/home/justin/system/zig-master/lib/std/build.zig:509:9: 0x2b0284 in makeOneStep (build)
        try s.make();
        ^
/home/justin/system/zig-master/lib/std/build.zig:503:17: 0x2b01f2 in makeOneStep (build)
                return err;
                ^
/home/justin/system/zig-master/lib/std/build.zig:503:17: 0x2b01f2 in makeOneStep (build)
                return err;
                ^
/home/justin/system/zig-master/lib/std/build.zig:503:17: 0x2b01f2 in makeOneStep (build)
                return err;
                ^
/home/justin/system/zig-master/lib/std/build.zig:464:13: 0x2aff52 in make (build)
            try self.makeOneStep(s);
            ^
/home/justin/system/zig-master/lib/build_runner.zig:223:21: 0x2b3014 in main (build)
            else => return err,
                    ^
error: the following build command failed with exit code 1:
/home/justin/workspace/pixi/zig-cache/o/e19008840973012112d96838c813ec6d/build /home/justin/system/zig-master/zig /home/justin/workspace/pixi /home/justin/workspace/pixi/zig-cache /home/justin/.cache/zig run

Internal Docs

It would be great if some more of the internals were documented, eg, what functionality is implemented where, naming conventions, etc...

Failing test on macOS

Steps to reproduce

➜  pixi git:(main) zig build test
zig test Debug native: error: the following command failed with 1 compilation errors:
/Users/jonas/src/zig/zig/build/stage3/bin/zig test /Users/jonas/src/zig/pixi/src/pixi.zig --cache-dir /Users/jonas/src/zig/pixi/zig-cache --global-cache-dir /Users/jonas/.cache/zig --name test --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
test transitive failure
└─ run test transitive failure
   └─ zig test Debug native 1 errors
src/pixi.zig:7:23: error: no package named 'zstbi' available within package 'root'
const zstbi = @import("zstbi");
                      ^~~~~~~
referenced by:
    test_0: src/pixi.zig:39:9
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

Test environement

➜  pixi git:(main) git log -1 | tee
commit 968c7a234bc361d0870bdb12a680700ded8f5e26
Author: foxnne <[email protected]>
Date:   Wed Aug 9 15:59:49 2023 -0500

    hotkeys: Fix issue where some hotkeys wouldnt work building release_fast

➜  pixi git:(main) git log -1 | tee
commit 968c7a234bc361d0870bdb12a680700ded8f5e26
Author: foxnne <[email protected]>
Date:   Wed Aug 9 15:59:49 2023 -0500

    hotkeys: Fix issue where some hotkeys wouldnt work building release_fast
➜  pixi git:(main) sw_vers; clang --version; zig version
ProductName:		macOS
ProductVersion:		13.5
BuildVersion:		22G74
Homebrew clang version 16.0.6
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
0.12.0-dev.47+0461a64a9

Selection tool

One critical thing is adding a selection tool so it's easy to copy/paste parts of an image around. This is decently complex, as we will need to track changes for history as well as making sure we don't break other tools.

Currently, all that is available is copying the selected sprite to another tile (ctrl/cmd + arrow keys) or shifting the currently selected sprite (shift + arrow keys). Shifting isn't perfect as it leaves existing pixels as they are when shifting.

I think I like these quick keys for copying sprites, which comes in handy when creating and editing animations, but a proper selection tool would be really nice.

How to create a new file?

I'm on Linux and I think I don't see anything to create a new file? I feel like this is a dumb question but I don't know how to start drawing. I can only import existing png images

Allow different pencil cursor sizes

I haven't really looked into this yet, but it would be really convenient to allow different pencil sizes for larger artwork.

Currently, only the single pixel the cursor is on is drawn. I believe we could track pencil size and allow larger draw areas which expand around the currently hovered pixel.

Just as a note: currently the "preview" of the pixel to be drawn is just an additional hidden layer.

Update to latest `mach-core` and `mach-sysgpu`, and nominated `zig` version

Currently mach-core has disabled sysgpu until further notice, which we need for stability on macOS. There is also a crash on build with sysgpu enabled on Windows for the version currently used in Pixi.

We will be frozen on this version until sysgpu is reenabled in mach-core.

For now, Windows/Linux users can build and run using zig build run, and macOS users can build and run using zig build run -Duse_sysgpu=true.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.