pixelkiln 0.78.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +13 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/gallery.css +9 -0
- package/dist/client/gallery.js +174 -2
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/docs/CHARACTERS.md +12 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13905,7 +13905,12 @@ var AssetPatchSchema = z6.object({
|
|
|
13905
13905
|
width: z6.number().int().nullable().optional(),
|
|
13906
13906
|
height: z6.number().int().nullable().optional(),
|
|
13907
13907
|
size: z6.number().int().nullable().optional(),
|
|
13908
|
-
tags: z6.array(z6.string()).optional()
|
|
13908
|
+
tags: z6.array(z6.string()).optional(),
|
|
13909
|
+
/**
|
|
13910
|
+
* A loop shorthand's `animation.directions`, replaced whole: each named
|
|
13911
|
+
* direction is drawn, and each one's flip comes free as a mirror.
|
|
13912
|
+
*/
|
|
13913
|
+
loopDirections: z6.array(CharacterDirectionSchema).min(1).optional()
|
|
13909
13914
|
}).strict();
|
|
13910
13915
|
var NewStateSchema = z6.object({
|
|
13911
13916
|
/** Asset id of the parent this states; must already exist. */
|
|
@@ -14254,6 +14259,13 @@ function applyEdit(raw, edit) {
|
|
|
14254
14259
|
if (patch.tags.length) asset.tags = patch.tags;
|
|
14255
14260
|
else delete asset.tags;
|
|
14256
14261
|
}
|
|
14262
|
+
if (patch.loopDirections) {
|
|
14263
|
+
const animation = asset.animation;
|
|
14264
|
+
if (!animation || !Array.isArray(animation.directions)) {
|
|
14265
|
+
throw new ManifestEditError(`asset "${edit.assetId}" is not a loop declared with animation.directions`);
|
|
14266
|
+
}
|
|
14267
|
+
asset.animation = { ...animation, directions: patch.loopDirections };
|
|
14268
|
+
}
|
|
14257
14269
|
}
|
|
14258
14270
|
async function withCandidate(manifestPath, edit, use, unchanged) {
|
|
14259
14271
|
const absolute = path23.resolve(manifestPath);
|