@nice2dev/ui-graphics 1.0.0 → 1.0.3
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/CHANGELOG.md +147 -1
- package/dist/cjs/animation/AnimatedPerson.js +2 -2
- package/dist/cjs/animation/AnimatedPerson.js.map +1 -1
- package/dist/cjs/animation/AnimationEditor.js +11 -6
- package/dist/cjs/animation/AnimationEditor.js.map +1 -1
- package/dist/cjs/animation/Audience.js +4 -3
- package/dist/cjs/animation/Audience.js.map +1 -1
- package/dist/cjs/animation/BodyRenderer.js +5 -2
- package/dist/cjs/animation/BodyRenderer.js.map +1 -1
- package/dist/cjs/animation/rig/RigPlayer.js +2 -2
- package/dist/cjs/animation/rig/RigPlayer.js.map +1 -1
- package/dist/cjs/animation/rig/RiggedBody.js +2 -2
- package/dist/cjs/animation/rig/RiggedBody.js.map +1 -1
- package/dist/cjs/animation/shapes/heads.js +4 -1
- package/dist/cjs/animation/shapes/heads.js.map +1 -1
- package/dist/cjs/core/LocalUI.js +1 -1
- package/dist/cjs/core/NiceBrushEngine.js +446 -0
- package/dist/cjs/core/NiceBrushEngine.js.map +1 -0
- package/dist/cjs/core/yjsCollaboration.js +292 -0
- package/dist/cjs/core/yjsCollaboration.js.map +1 -0
- package/dist/cjs/font/NiceFontEditor.js +89 -85
- package/dist/cjs/font/NiceFontEditor.js.map +1 -1
- package/dist/cjs/font/fontFormatUtils.js +468 -0
- package/dist/cjs/font/fontFormatUtils.js.map +1 -0
- package/dist/cjs/game/GameAsset2dEditor.js +38 -24
- package/dist/cjs/game/GameAsset2dEditor.js.map +1 -1
- package/dist/cjs/icon/NiceIconEditor.js +218 -133
- package/dist/cjs/icon/NiceIconEditor.js.map +1 -1
- package/dist/cjs/index.js +83 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/nice2dev-ui-graphics.css +1 -1
- package/dist/cjs/photo/NiceAITools.js +446 -0
- package/dist/cjs/photo/NiceAITools.js.map +1 -0
- package/dist/cjs/photo/PhotoEditor.js +2 -2
- package/dist/cjs/photo/PhotoEditor.js.map +1 -1
- package/dist/cjs/pixel/PixelEditor.js +16 -5
- package/dist/cjs/pixel/PixelEditor.js.map +1 -1
- package/dist/cjs/pixel/PixelEditor.module.css.js +1 -1
- package/dist/cjs/pixel/PixelEditorMenuBar.js +2 -1
- package/dist/cjs/pixel/PixelEditorMenuBar.js.map +1 -1
- package/dist/cjs/pixel/PixelEditorRightPanel.js +3 -2
- package/dist/cjs/pixel/PixelEditorRightPanel.js.map +1 -1
- package/dist/cjs/pixel/PixelEditorTimeline.js +2 -1
- package/dist/cjs/pixel/PixelEditorTimeline.js.map +1 -1
- package/dist/cjs/pixel/PixelEditorToolbar.js +2 -1
- package/dist/cjs/pixel/PixelEditorToolbar.js.map +1 -1
- package/dist/cjs/pixel/SpriteGeneratorPanel.js +224 -0
- package/dist/cjs/pixel/SpriteGeneratorPanel.js.map +1 -0
- package/dist/cjs/pixel/animalGeneratorPresets.js +654 -0
- package/dist/cjs/pixel/animalGeneratorPresets.js.map +1 -0
- package/dist/cjs/pixel/buildingGeneratorPresets.js +573 -0
- package/dist/cjs/pixel/buildingGeneratorPresets.js.map +1 -0
- package/dist/cjs/pixel/characterGeneratorPresets.js +563 -0
- package/dist/cjs/pixel/characterGeneratorPresets.js.map +1 -0
- package/dist/cjs/pixel/spriteGeneratorCore.js +297 -0
- package/dist/cjs/pixel/spriteGeneratorCore.js.map +1 -0
- package/dist/cjs/pixel/usePixelEditor.js +16 -0
- package/dist/cjs/pixel/usePixelEditor.js.map +1 -1
- package/dist/cjs/texture/Nice3DTexturePainter.js +123 -79
- package/dist/cjs/texture/Nice3DTexturePainter.js.map +1 -1
- package/dist/cjs/ui/NiceUIDesigner.js +175 -62
- package/dist/cjs/ui/NiceUIDesigner.js.map +1 -1
- package/dist/cjs/ui/dist/index.js +50089 -0
- package/dist/cjs/ui/dist/index.js.map +1 -0
- package/dist/cjs/vector/NiceSvgToCode.js +427 -0
- package/dist/cjs/vector/NiceSvgToCode.js.map +1 -0
- package/dist/cjs/vector/VectorEditor.js +7 -3
- package/dist/cjs/vector/VectorEditor.js.map +1 -1
- package/dist/cjs/vector/VectorEditor.module.css.js +1 -1
- package/dist/cjs/vector/VectorEditorMenuBar.js +5 -1
- package/dist/cjs/vector/VectorEditorMenuBar.js.map +1 -1
- package/dist/cjs/vector/VectorEditorRightPanel.js +23 -19
- package/dist/cjs/vector/VectorEditorRightPanel.js.map +1 -1
- package/dist/esm/animation/AnimatedPerson.js +2 -2
- package/dist/esm/animation/AnimatedPerson.js.map +1 -1
- package/dist/esm/animation/AnimationEditor.js +12 -8
- package/dist/esm/animation/AnimationEditor.js.map +1 -1
- package/dist/esm/animation/Audience.js +5 -4
- package/dist/esm/animation/Audience.js.map +1 -1
- package/dist/esm/animation/BodyRenderer.js +4 -2
- package/dist/esm/animation/BodyRenderer.js.map +1 -1
- package/dist/esm/animation/rig/RigPlayer.js +4 -4
- package/dist/esm/animation/rig/RigPlayer.js.map +1 -1
- package/dist/esm/animation/rig/RiggedBody.js +2 -2
- package/dist/esm/animation/rig/RiggedBody.js.map +1 -1
- package/dist/esm/animation/shapes/heads.js +4 -2
- package/dist/esm/animation/shapes/heads.js.map +1 -1
- package/dist/esm/core/LocalUI.js +4 -4
- package/dist/esm/core/NiceBrushEngine.js +442 -0
- package/dist/esm/core/NiceBrushEngine.js.map +1 -0
- package/dist/esm/core/yjsCollaboration.js +283 -0
- package/dist/esm/core/yjsCollaboration.js.map +1 -0
- package/dist/esm/font/NiceFontEditor.js +89 -85
- package/dist/esm/font/NiceFontEditor.js.map +1 -1
- package/dist/esm/font/fontFormatUtils.js +461 -0
- package/dist/esm/font/fontFormatUtils.js.map +1 -0
- package/dist/esm/game/GameAsset2dEditor.js +38 -25
- package/dist/esm/game/GameAsset2dEditor.js.map +1 -1
- package/dist/esm/icon/NiceIconEditor.js +218 -133
- package/dist/esm/icon/NiceIconEditor.js.map +1 -1
- package/dist/esm/index.js +21 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/nice2dev-ui-graphics.css +1 -1
- package/dist/esm/photo/NiceAITools.js +439 -0
- package/dist/esm/photo/NiceAITools.js.map +1 -0
- package/dist/esm/photo/PhotoEditor.js +2 -2
- package/dist/esm/photo/PhotoEditor.js.map +1 -1
- package/dist/esm/pixel/PixelEditor.js +16 -6
- package/dist/esm/pixel/PixelEditor.js.map +1 -1
- package/dist/esm/pixel/PixelEditor.module.css.js +1 -1
- package/dist/esm/pixel/PixelEditorMenuBar.js +2 -1
- package/dist/esm/pixel/PixelEditorMenuBar.js.map +1 -1
- package/dist/esm/pixel/PixelEditorRightPanel.js +3 -2
- package/dist/esm/pixel/PixelEditorRightPanel.js.map +1 -1
- package/dist/esm/pixel/PixelEditorTimeline.js +2 -1
- package/dist/esm/pixel/PixelEditorTimeline.js.map +1 -1
- package/dist/esm/pixel/PixelEditorToolbar.js +2 -1
- package/dist/esm/pixel/PixelEditorToolbar.js.map +1 -1
- package/dist/esm/pixel/SpriteGeneratorPanel.js +222 -0
- package/dist/esm/pixel/SpriteGeneratorPanel.js.map +1 -0
- package/dist/esm/pixel/animalGeneratorPresets.js +647 -0
- package/dist/esm/pixel/animalGeneratorPresets.js.map +1 -0
- package/dist/esm/pixel/buildingGeneratorPresets.js +566 -0
- package/dist/esm/pixel/buildingGeneratorPresets.js.map +1 -0
- package/dist/esm/pixel/characterGeneratorPresets.js +556 -0
- package/dist/esm/pixel/characterGeneratorPresets.js.map +1 -0
- package/dist/esm/pixel/spriteGeneratorCore.js +279 -0
- package/dist/esm/pixel/spriteGeneratorCore.js.map +1 -0
- package/dist/esm/pixel/usePixelEditor.js +16 -0
- package/dist/esm/pixel/usePixelEditor.js.map +1 -1
- package/dist/esm/texture/Nice3DTexturePainter.js +123 -79
- package/dist/esm/texture/Nice3DTexturePainter.js.map +1 -1
- package/dist/esm/ui/NiceUIDesigner.js +175 -62
- package/dist/esm/ui/NiceUIDesigner.js.map +1 -1
- package/dist/esm/ui/dist/index.js +49686 -0
- package/dist/esm/ui/dist/index.js.map +1 -0
- package/dist/esm/vector/NiceSvgToCode.js +423 -0
- package/dist/esm/vector/NiceSvgToCode.js.map +1 -0
- package/dist/esm/vector/VectorEditor.js +7 -4
- package/dist/esm/vector/VectorEditor.js.map +1 -1
- package/dist/esm/vector/VectorEditor.module.css.js +1 -1
- package/dist/esm/vector/VectorEditorMenuBar.js +5 -1
- package/dist/esm/vector/VectorEditorMenuBar.js.map +1 -1
- package/dist/esm/vector/VectorEditorRightPanel.js +23 -19
- package/dist/esm/vector/VectorEditorRightPanel.js.map +1 -1
- package/package.json +3 -4
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var spriteGeneratorCore = require('./spriteGeneratorCore.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* animalGeneratorPresets.ts — Modular animal sprite generator.
|
|
7
|
+
*
|
|
8
|
+
* Parts: heads (cat, dog, wolf, bird, dragon, rabbit, bear, horse),
|
|
9
|
+
* bodies, legs, tails, wings, manes.
|
|
10
|
+
* Integrates with quadruped skeleton template.
|
|
11
|
+
*/
|
|
12
|
+
/* ════════════════════════════════════════════════════════════════
|
|
13
|
+
COLOUR PALETTES
|
|
14
|
+
════════════════════════════════════════════════════════════════ */
|
|
15
|
+
const FUR_PALETTES = {
|
|
16
|
+
white: ['#f0f0f0', '#d0d0d0', '#b0b0b0', '#909090'],
|
|
17
|
+
black: ['#404040', '#303030', '#202020', '#101010'],
|
|
18
|
+
brown: ['#c08848', '#a06830', '#805020', '#603818'],
|
|
19
|
+
gray: ['#a0a0a0', '#808080', '#606060', '#404040'],
|
|
20
|
+
orange: ['#e09040', '#c07828', '#a06020', '#804818'],
|
|
21
|
+
golden: ['#f0d068', '#d0b048', '#b09030', '#907020'],
|
|
22
|
+
cream: ['#f0e8d0', '#d8d0b8', '#c0b8a0', '#a8a088'],
|
|
23
|
+
};
|
|
24
|
+
const SCALE_PALETTES = {
|
|
25
|
+
green: ['#40a040', '#308030', '#206020', '#104010'],
|
|
26
|
+
red: ['#c04040', '#a03030', '#802020', '#601010'],
|
|
27
|
+
blue: ['#4060c0', '#3048a0', '#203880', '#182060'],
|
|
28
|
+
gold: ['#f0d060', '#d0b040', '#a08020', '#806010'],
|
|
29
|
+
purple: ['#8040c0', '#6030a0', '#402080', '#301060'],
|
|
30
|
+
};
|
|
31
|
+
const FEATHER_PALETTES = {
|
|
32
|
+
brown: ['#a08040', '#806030', '#604020', '#402810'],
|
|
33
|
+
white: ['#f0f0f0', '#d8d8d8', '#c0c0c0', '#a0a0a0'],
|
|
34
|
+
blue: ['#4080d0', '#3060b0', '#204890', '#183070'],
|
|
35
|
+
red: ['#d04040', '#b03030', '#902020', '#701010'],
|
|
36
|
+
tropical: ['#40c040', '#f0d040', '#d06020', '#c03030'],
|
|
37
|
+
};
|
|
38
|
+
/* ════════════════════════════════════════════════════════════════
|
|
39
|
+
ANIMAL PARTS
|
|
40
|
+
════════════════════════════════════════════════════════════════ */
|
|
41
|
+
const _ = -1;
|
|
42
|
+
/* ── Cat head ── */
|
|
43
|
+
const CAT_HEAD_S = spriteGeneratorCore.createPartData(8, 7, [
|
|
44
|
+
[_, 0, _, _, _, _, 0, _],
|
|
45
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
46
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
47
|
+
[0, 0, 2, 0, 0, 2, 0, 0],
|
|
48
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
49
|
+
[0, 0, 0, 3, 3, 0, 0, 0],
|
|
50
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
51
|
+
], ['#e09040', '#c07828', '#40a040', '#f0a0a0']);
|
|
52
|
+
const CAT_HEAD_E = spriteGeneratorCore.createPartData(6, 7, [
|
|
53
|
+
[_, _, _, _, 0, _],
|
|
54
|
+
[_, 0, 0, 0, 0, 0],
|
|
55
|
+
[0, 0, 0, 0, 0, 0],
|
|
56
|
+
[0, 0, 0, 2, 0, 0],
|
|
57
|
+
[0, 0, 0, 0, 0, 0],
|
|
58
|
+
[0, 0, 0, 0, 3, 0],
|
|
59
|
+
[_, 0, 0, 0, 0, _],
|
|
60
|
+
], ['#e09040', '#c07828', '#40a040', '#f0a0a0']);
|
|
61
|
+
/* ── Dog head ── */
|
|
62
|
+
const DOG_HEAD_S = spriteGeneratorCore.createPartData(8, 8, [
|
|
63
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
64
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
65
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
66
|
+
[0, 0, 2, 0, 0, 2, 0, 0],
|
|
67
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
68
|
+
[_, 0, 0, 3, 3, 0, 0, _],
|
|
69
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
70
|
+
[_, _, _, 0, 0, _, _, _],
|
|
71
|
+
], ['#c08848', '#a06830', '#301818', '#301818']);
|
|
72
|
+
const DOG_HEAD_E = spriteGeneratorCore.createPartData(7, 8, [
|
|
73
|
+
[_, _, 0, 0, 0, _, _],
|
|
74
|
+
[_, 0, 0, 0, 0, 0, _],
|
|
75
|
+
[0, 0, 0, 0, 0, 0, _],
|
|
76
|
+
[0, 0, 0, 0, 2, 0, _],
|
|
77
|
+
[0, 0, 0, 0, 0, 0, _],
|
|
78
|
+
[_, 0, 0, 0, 0, 3, 0],
|
|
79
|
+
[_, _, 0, 0, 0, 3, 0],
|
|
80
|
+
[_, _, _, 0, 0, 0, _],
|
|
81
|
+
], ['#c08848', '#a06830', '#301818', '#301818']);
|
|
82
|
+
/* ── Wolf head ── */
|
|
83
|
+
const WOLF_HEAD_S = spriteGeneratorCore.createPartData(10, 8, [
|
|
84
|
+
[_, 0, _, _, _, _, _, _, 0, _],
|
|
85
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
86
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
87
|
+
[0, 0, 0, 2, 0, 0, 2, 0, 0, 0],
|
|
88
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
89
|
+
[_, 0, 0, 0, 3, 3, 0, 0, 0, _],
|
|
90
|
+
[_, _, 0, 0, 0, 0, 0, 0, _, _],
|
|
91
|
+
[_, _, _, 0, 0, 0, 0, _, _, _],
|
|
92
|
+
], ['#808080', '#606060', '#f0d060', '#301818']);
|
|
93
|
+
/* ── Bird head ── */
|
|
94
|
+
const BIRD_HEAD_S = spriteGeneratorCore.createPartData(6, 6, [
|
|
95
|
+
[_, _, 0, 0, _, _],
|
|
96
|
+
[_, 0, 0, 0, 0, _],
|
|
97
|
+
[0, 0, 2, 2, 0, 0],
|
|
98
|
+
[0, 0, 0, 0, 0, 0],
|
|
99
|
+
[_, 0, 3, 3, 0, _],
|
|
100
|
+
[_, _, _, 3, _, _],
|
|
101
|
+
], ['#a08040', '#806030', '#301818', '#f0a020']);
|
|
102
|
+
/* ── Dragon head ── */
|
|
103
|
+
const DRAGON_HEAD_S = spriteGeneratorCore.createPartData(10, 9, [
|
|
104
|
+
[_, _, _, 0, _, _, 0, _, _, _],
|
|
105
|
+
[_, _, 0, 0, 0, 0, 0, 0, _, _],
|
|
106
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
107
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
108
|
+
[0, 0, 0, 2, 0, 0, 2, 0, 0, 0],
|
|
109
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
110
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
111
|
+
[_, _, 0, 0, 3, 3, 0, 0, _, _],
|
|
112
|
+
[_, _, _, 0, 0, 0, 0, _, _, _],
|
|
113
|
+
], ['#40a040', '#308030', '#f0d060', '#301818']);
|
|
114
|
+
/* ── Rabbit head ── */
|
|
115
|
+
const RABBIT_HEAD_S = spriteGeneratorCore.createPartData(8, 10, [
|
|
116
|
+
[_, _, 0, _, _, 0, _, _],
|
|
117
|
+
[_, _, 0, _, _, 0, _, _],
|
|
118
|
+
[_, _, 0, _, _, 0, _, _],
|
|
119
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
120
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
121
|
+
[0, 0, 2, 0, 0, 2, 0, 0],
|
|
122
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
123
|
+
[0, 0, 0, 3, 3, 0, 0, 0],
|
|
124
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
125
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
126
|
+
], ['#f0e8d0', '#d8d0b8', '#d04040', '#f0a0a0']);
|
|
127
|
+
/* ── Bear head ── */
|
|
128
|
+
const BEAR_HEAD_S = spriteGeneratorCore.createPartData(10, 9, [
|
|
129
|
+
[_, 0, 0, _, _, _, _, 0, 0, _],
|
|
130
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
131
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
132
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
133
|
+
[0, 0, 0, 2, 0, 0, 2, 0, 0, 0],
|
|
134
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
135
|
+
[0, 0, 0, 0, 3, 3, 0, 0, 0, 0],
|
|
136
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
137
|
+
[_, _, 0, 0, 0, 0, 0, 0, _, _],
|
|
138
|
+
], ['#805020', '#603818', '#201010', '#402818']);
|
|
139
|
+
/* ── Horse head ── */
|
|
140
|
+
const HORSE_HEAD_S = spriteGeneratorCore.createPartData(8, 10, [
|
|
141
|
+
[_, _, _, 0, 0, _, _, _],
|
|
142
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
143
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
144
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
145
|
+
[0, 0, 2, 0, 0, 2, 0, 0],
|
|
146
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
147
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
148
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
149
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
150
|
+
[_, _, _, 0, 0, _, _, _],
|
|
151
|
+
], ['#c08848', '#a06830', '#301818']);
|
|
152
|
+
/* ── Bodies ── */
|
|
153
|
+
const BODY_SMALL = spriteGeneratorCore.createPartData(8, 6, [
|
|
154
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
155
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
156
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
157
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
158
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
159
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
160
|
+
], ['#e09040', '#c07828']);
|
|
161
|
+
const BODY_MEDIUM = spriteGeneratorCore.createPartData(12, 8, [
|
|
162
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, _, _, _],
|
|
163
|
+
[_, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
|
|
164
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
165
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
166
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
167
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
168
|
+
[_, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
|
|
169
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, _, _, _],
|
|
170
|
+
], ['#c08848', '#a06830']);
|
|
171
|
+
const BODY_LARGE = spriteGeneratorCore.createPartData(14, 10, [
|
|
172
|
+
[_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
|
|
173
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
|
|
174
|
+
[_, _, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
|
|
175
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
176
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
177
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
178
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
179
|
+
[_, _, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
|
|
180
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
|
|
181
|
+
[_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
|
|
182
|
+
], ['#805020', '#603818']);
|
|
183
|
+
const BODY_BIRD = spriteGeneratorCore.createPartData(8, 7, [
|
|
184
|
+
[_, _, _, 0, 0, _, _, _],
|
|
185
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
186
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
187
|
+
[0, 0, 0, 0, 0, 0, 0, 0],
|
|
188
|
+
[_, 0, 0, 0, 0, 0, 0, _],
|
|
189
|
+
[_, _, 0, 0, 0, 0, _, _],
|
|
190
|
+
[_, _, _, 0, 0, _, _, _],
|
|
191
|
+
], ['#a08040', '#806030']);
|
|
192
|
+
const BODY_DRAGON = spriteGeneratorCore.createPartData(14, 10, [
|
|
193
|
+
[_, _, _, _, _, 0, 0, 0, 0, _, _, _, _, _],
|
|
194
|
+
[_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
|
|
195
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
|
|
196
|
+
[_, _, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _, _],
|
|
197
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
198
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
199
|
+
[_, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, _],
|
|
200
|
+
[_, _, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, _, _],
|
|
201
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, 0, 0, _, _, _],
|
|
202
|
+
[_, _, _, _, 0, 0, 0, 0, 0, 0, _, _, _, _],
|
|
203
|
+
], ['#40a040', '#f0d060']);
|
|
204
|
+
/* ── Legs ── */
|
|
205
|
+
const LEG_THIN = spriteGeneratorCore.createPartData(2, 5, [
|
|
206
|
+
[0, 0],
|
|
207
|
+
[0, 0],
|
|
208
|
+
[0, 0],
|
|
209
|
+
[0, 0],
|
|
210
|
+
[0, 1],
|
|
211
|
+
], ['#c08848', '#a06830']);
|
|
212
|
+
const LEG_THICK = spriteGeneratorCore.createPartData(3, 5, [
|
|
213
|
+
[0, 0, 0],
|
|
214
|
+
[0, 0, 0],
|
|
215
|
+
[0, 0, 0],
|
|
216
|
+
[0, 0, 0],
|
|
217
|
+
[0, 0, 1],
|
|
218
|
+
], ['#805020', '#603818']);
|
|
219
|
+
const LEG_BIRD = spriteGeneratorCore.createPartData(2, 5, [
|
|
220
|
+
[_, 0],
|
|
221
|
+
[_, 0],
|
|
222
|
+
[_, 0],
|
|
223
|
+
[0, 0],
|
|
224
|
+
[0, 0],
|
|
225
|
+
], ['#f0a020', '#c08010']);
|
|
226
|
+
const LEG_DRAGON = spriteGeneratorCore.createPartData(3, 6, [
|
|
227
|
+
[_, 0, 0],
|
|
228
|
+
[0, 0, 0],
|
|
229
|
+
[0, 0, 0],
|
|
230
|
+
[0, 0, 0],
|
|
231
|
+
[0, 0, 0],
|
|
232
|
+
[0, 1, 0],
|
|
233
|
+
], ['#40a040', '#206020']);
|
|
234
|
+
/* ── Tails ── */
|
|
235
|
+
const TAIL_SHORT = spriteGeneratorCore.createPartData(4, 3, [
|
|
236
|
+
[0, 0, _, _],
|
|
237
|
+
[_, 0, 0, _],
|
|
238
|
+
[_, _, 0, 0],
|
|
239
|
+
], ['#e09040', '#c07828']);
|
|
240
|
+
const TAIL_LONG = spriteGeneratorCore.createPartData(6, 4, [
|
|
241
|
+
[0, 0, _, _, _, _],
|
|
242
|
+
[_, 0, 0, _, _, _],
|
|
243
|
+
[_, _, 0, 0, _, _],
|
|
244
|
+
[_, _, _, 0, 0, 0],
|
|
245
|
+
], ['#c08848', '#a06830']);
|
|
246
|
+
const TAIL_FLUFFY = spriteGeneratorCore.createPartData(6, 5, [
|
|
247
|
+
[_, 0, 0, _, _, _],
|
|
248
|
+
[0, 0, 0, 0, _, _],
|
|
249
|
+
[_, 0, 0, 0, 0, _],
|
|
250
|
+
[_, _, 0, 0, 0, 0],
|
|
251
|
+
[_, _, _, 0, 0, _],
|
|
252
|
+
], ['#808080', '#606060']);
|
|
253
|
+
const TAIL_DRAGON = spriteGeneratorCore.createPartData(8, 4, [
|
|
254
|
+
[0, 0, _, _, _, _, _, _],
|
|
255
|
+
[_, 0, 0, 0, _, _, _, _],
|
|
256
|
+
[_, _, _, 0, 0, 0, _, _],
|
|
257
|
+
[_, _, _, _, _, 0, 1, 0],
|
|
258
|
+
], ['#40a040', '#308030']);
|
|
259
|
+
const TAIL_BIRD = spriteGeneratorCore.createPartData(5, 5, [
|
|
260
|
+
[_, _, 0, _, _],
|
|
261
|
+
[_, 0, 0, 0, _],
|
|
262
|
+
[0, 0, 0, 0, 0],
|
|
263
|
+
[_, 0, 0, 0, _],
|
|
264
|
+
[_, _, 0, _, _],
|
|
265
|
+
], ['#a08040', '#806030']);
|
|
266
|
+
/* ── Wings ── */
|
|
267
|
+
const WING_SMALL = spriteGeneratorCore.createPartData(6, 5, [
|
|
268
|
+
[_, _, _, _, 0, _],
|
|
269
|
+
[_, _, _, 0, 0, 0],
|
|
270
|
+
[_, _, 0, 0, 0, 0],
|
|
271
|
+
[_, 0, 0, 0, 0, 0],
|
|
272
|
+
[0, 0, 0, 0, 0, _],
|
|
273
|
+
], ['#a08040', '#806030']);
|
|
274
|
+
const WING_LARGE = spriteGeneratorCore.createPartData(10, 8, [
|
|
275
|
+
[_, _, _, _, _, _, _, _, 0, _],
|
|
276
|
+
[_, _, _, _, _, _, _, 0, 0, 0],
|
|
277
|
+
[_, _, _, _, _, _, 0, 0, 0, 0],
|
|
278
|
+
[_, _, _, _, _, 0, 0, 0, 0, 0],
|
|
279
|
+
[_, _, _, _, 0, 0, 0, 0, 0, 0],
|
|
280
|
+
[_, _, _, 0, 0, 0, 0, 0, 0, 0],
|
|
281
|
+
[_, _, 0, 0, 0, 0, 0, 0, 0, _],
|
|
282
|
+
[_, 0, 0, 0, 0, 0, 0, 0, _, _],
|
|
283
|
+
], ['#40a040', '#308030']);
|
|
284
|
+
const WING_BAT = spriteGeneratorCore.createPartData(10, 7, [
|
|
285
|
+
[_, _, 0, _, _, 0, _, _, 0, _],
|
|
286
|
+
[_, 0, 0, _, 0, 0, _, 0, 0, _],
|
|
287
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
288
|
+
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
|
289
|
+
[_, 0, 0, 0, 0, 0, 0, 0, 0, _],
|
|
290
|
+
[_, _, 0, 0, 0, 0, 0, 0, _, _],
|
|
291
|
+
[_, _, _, 0, 0, 0, 0, _, _, _],
|
|
292
|
+
], ['#404040', '#303030']);
|
|
293
|
+
/* ── Manes ── */
|
|
294
|
+
const MANE_SHORT = spriteGeneratorCore.createPartData(6, 4, [
|
|
295
|
+
[_, _, 0, 0, _, _],
|
|
296
|
+
[_, 0, 0, 0, 0, _],
|
|
297
|
+
[0, 0, 0, 0, 0, 0],
|
|
298
|
+
[_, _, 0, 0, _, _],
|
|
299
|
+
], ['#c08848', '#a06830']);
|
|
300
|
+
const MANE_LONG = spriteGeneratorCore.createPartData(6, 8, [
|
|
301
|
+
[_, _, 0, 0, _, _],
|
|
302
|
+
[_, 0, 0, 0, 0, _],
|
|
303
|
+
[0, 0, 0, 0, 0, 0],
|
|
304
|
+
[0, 0, 0, 0, 0, 0],
|
|
305
|
+
[0, 0, 0, 0, 0, 0],
|
|
306
|
+
[_, 0, 0, 0, 0, _],
|
|
307
|
+
[_, 0, 0, 0, 0, _],
|
|
308
|
+
[_, _, 0, 0, _, _],
|
|
309
|
+
], ['#c08848', '#a06830']);
|
|
310
|
+
/* ── Horns ── */
|
|
311
|
+
const HORNS_SMALL = spriteGeneratorCore.createPartData(8, 3, [
|
|
312
|
+
[0, _, _, _, _, _, _, 0],
|
|
313
|
+
[0, 0, _, _, _, _, 0, 0],
|
|
314
|
+
[_, 0, _, _, _, _, 0, _],
|
|
315
|
+
], ['#f0e8d0', '#d8d0b8']);
|
|
316
|
+
const HORNS_DRAGON = spriteGeneratorCore.createPartData(10, 4, [
|
|
317
|
+
[0, _, _, _, _, _, _, _, _, 0],
|
|
318
|
+
[0, 0, _, _, _, _, _, _, 0, 0],
|
|
319
|
+
[_, 0, 0, _, _, _, _, 0, 0, _],
|
|
320
|
+
[_, _, 0, _, _, _, _, 0, _, _],
|
|
321
|
+
], ['#805020', '#603818']);
|
|
322
|
+
/* ════════════════════════════════════════════════════════════════
|
|
323
|
+
REGISTER ALL ANIMAL PARTS
|
|
324
|
+
════════════════════════════════════════════════════════════════ */
|
|
325
|
+
const ANIMAL_PARTS = [
|
|
326
|
+
// ── Heads ──
|
|
327
|
+
{
|
|
328
|
+
id: 'animal-head-cat', name: 'Cat Head', category: 'animalHead', slot: 'head',
|
|
329
|
+
anchorX: 4, anchorY: 6, zOrder: 10, tags: ['cat', 'small', 'pet'],
|
|
330
|
+
pixels: spriteGeneratorCore.generateMirroredDirections({ S: CAT_HEAD_S, E: CAT_HEAD_E }),
|
|
331
|
+
recolorableIndices: [0, 1],
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
id: 'animal-head-dog', name: 'Dog Head', category: 'animalHead', slot: 'head',
|
|
335
|
+
anchorX: 4, anchorY: 7, zOrder: 10, tags: ['dog', 'medium', 'pet'],
|
|
336
|
+
pixels: spriteGeneratorCore.generateMirroredDirections({ S: DOG_HEAD_S, E: DOG_HEAD_E }),
|
|
337
|
+
recolorableIndices: [0, 1],
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
id: 'animal-head-wolf', name: 'Wolf Head', category: 'animalHead', slot: 'head',
|
|
341
|
+
anchorX: 5, anchorY: 7, zOrder: 10, tags: ['wolf', 'wild', 'predator'],
|
|
342
|
+
pixels: { S: WOLF_HEAD_S },
|
|
343
|
+
recolorableIndices: [0, 1],
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: 'animal-head-bird', name: 'Bird Head', category: 'animalHead', slot: 'head',
|
|
347
|
+
anchorX: 3, anchorY: 5, zOrder: 10, tags: ['bird', 'small', 'flying'],
|
|
348
|
+
pixels: { S: BIRD_HEAD_S },
|
|
349
|
+
recolorableIndices: [0, 1],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
id: 'animal-head-dragon', name: 'Dragon Head', category: 'animalHead', slot: 'head',
|
|
353
|
+
anchorX: 5, anchorY: 8, zOrder: 10, tags: ['dragon', 'fantasy', 'large'],
|
|
354
|
+
pixels: { S: DRAGON_HEAD_S },
|
|
355
|
+
recolorableIndices: [0, 1],
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: 'animal-head-rabbit', name: 'Rabbit Head', category: 'animalHead', slot: 'head',
|
|
359
|
+
anchorX: 4, anchorY: 9, zOrder: 10, tags: ['rabbit', 'small', 'pet'],
|
|
360
|
+
pixels: { S: RABBIT_HEAD_S },
|
|
361
|
+
recolorableIndices: [0, 1],
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
id: 'animal-head-bear', name: 'Bear Head', category: 'animalHead', slot: 'head',
|
|
365
|
+
anchorX: 5, anchorY: 8, zOrder: 10, tags: ['bear', 'large', 'wild'],
|
|
366
|
+
pixels: { S: BEAR_HEAD_S },
|
|
367
|
+
recolorableIndices: [0, 1],
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
id: 'animal-head-horse', name: 'Horse Head', category: 'animalHead', slot: 'head',
|
|
371
|
+
anchorX: 4, anchorY: 9, zOrder: 10, tags: ['horse', 'large', 'rideable'],
|
|
372
|
+
pixels: { S: HORSE_HEAD_S },
|
|
373
|
+
recolorableIndices: [0, 1],
|
|
374
|
+
},
|
|
375
|
+
// ── Bodies ──
|
|
376
|
+
{
|
|
377
|
+
id: 'animal-body-small', name: 'Small Body', category: 'animalBody', slot: 'body',
|
|
378
|
+
anchorX: 4, anchorY: 0, zOrder: 5, tags: ['small', 'cat', 'rabbit'],
|
|
379
|
+
pixels: { S: BODY_SMALL },
|
|
380
|
+
recolorableIndices: [0, 1],
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
id: 'animal-body-medium', name: 'Medium Body', category: 'animalBody', slot: 'body',
|
|
384
|
+
anchorX: 6, anchorY: 0, zOrder: 5, tags: ['medium', 'dog', 'wolf'],
|
|
385
|
+
pixels: { S: BODY_MEDIUM },
|
|
386
|
+
recolorableIndices: [0, 1],
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: 'animal-body-large', name: 'Large Body', category: 'animalBody', slot: 'body',
|
|
390
|
+
anchorX: 7, anchorY: 0, zOrder: 5, tags: ['large', 'bear', 'horse'],
|
|
391
|
+
pixels: { S: BODY_LARGE },
|
|
392
|
+
recolorableIndices: [0, 1],
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
id: 'animal-body-bird', name: 'Bird Body', category: 'animalBody', slot: 'body',
|
|
396
|
+
anchorX: 4, anchorY: 0, zOrder: 5, tags: ['bird', 'small', 'flying'],
|
|
397
|
+
pixels: { S: BODY_BIRD },
|
|
398
|
+
recolorableIndices: [0, 1],
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
id: 'animal-body-dragon', name: 'Dragon Body', category: 'animalBody', slot: 'body',
|
|
402
|
+
anchorX: 7, anchorY: 0, zOrder: 5, tags: ['dragon', 'fantasy', 'large'],
|
|
403
|
+
pixels: { S: BODY_DRAGON },
|
|
404
|
+
recolorableIndices: [0, 1],
|
|
405
|
+
},
|
|
406
|
+
// ── Legs ──
|
|
407
|
+
{
|
|
408
|
+
id: 'animal-leg-thin', name: 'Thin Leg', category: 'animalLeg', slot: 'leftLeg',
|
|
409
|
+
anchorX: 1, anchorY: 0, zOrder: 3, tags: ['thin', 'small', 'cat', 'dog'],
|
|
410
|
+
pixels: { S: LEG_THIN },
|
|
411
|
+
recolorableIndices: [0, 1],
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
id: 'animal-leg-thick', name: 'Thick Leg', category: 'animalLeg', slot: 'leftLeg',
|
|
415
|
+
anchorX: 1, anchorY: 0, zOrder: 3, tags: ['thick', 'large', 'bear', 'horse'],
|
|
416
|
+
pixels: { S: LEG_THICK },
|
|
417
|
+
recolorableIndices: [0, 1],
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
id: 'animal-leg-bird', name: 'Bird Leg', category: 'animalLeg', slot: 'leftLeg',
|
|
421
|
+
anchorX: 1, anchorY: 0, zOrder: 3, tags: ['bird', 'claw'],
|
|
422
|
+
pixels: { S: LEG_BIRD },
|
|
423
|
+
recolorableIndices: [0, 1],
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
id: 'animal-leg-dragon', name: 'Dragon Leg', category: 'animalLeg', slot: 'leftLeg',
|
|
427
|
+
anchorX: 1, anchorY: 0, zOrder: 3, tags: ['dragon', 'claw', 'large'],
|
|
428
|
+
pixels: { S: LEG_DRAGON },
|
|
429
|
+
recolorableIndices: [0, 1],
|
|
430
|
+
},
|
|
431
|
+
// ── Tails ──
|
|
432
|
+
{
|
|
433
|
+
id: 'animal-tail-short', name: 'Short Tail', category: 'animalTail', slot: 'tail',
|
|
434
|
+
anchorX: 0, anchorY: 1, zOrder: 2, tags: ['short', 'cat', 'dog'],
|
|
435
|
+
pixels: { S: TAIL_SHORT },
|
|
436
|
+
recolorableIndices: [0, 1],
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
id: 'animal-tail-long', name: 'Long Tail', category: 'animalTail', slot: 'tail',
|
|
440
|
+
anchorX: 0, anchorY: 1, zOrder: 2, tags: ['long', 'dog', 'wolf'],
|
|
441
|
+
pixels: { S: TAIL_LONG },
|
|
442
|
+
recolorableIndices: [0, 1],
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
id: 'animal-tail-fluffy', name: 'Fluffy Tail', category: 'animalTail', slot: 'tail',
|
|
446
|
+
anchorX: 0, anchorY: 2, zOrder: 2, tags: ['fluffy', 'fox', 'wolf'],
|
|
447
|
+
pixels: { S: TAIL_FLUFFY },
|
|
448
|
+
recolorableIndices: [0, 1],
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
id: 'animal-tail-dragon', name: 'Dragon Tail', category: 'animalTail', slot: 'tail',
|
|
452
|
+
anchorX: 0, anchorY: 1, zOrder: 2, tags: ['dragon', 'spiked'],
|
|
453
|
+
pixels: { S: TAIL_DRAGON },
|
|
454
|
+
recolorableIndices: [0, 1],
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: 'animal-tail-bird', name: 'Bird Tail', category: 'animalTail', slot: 'tail',
|
|
458
|
+
anchorX: 2, anchorY: 0, zOrder: 2, tags: ['bird', 'feather'],
|
|
459
|
+
pixels: { S: TAIL_BIRD },
|
|
460
|
+
recolorableIndices: [0, 1],
|
|
461
|
+
},
|
|
462
|
+
// ── Wings ──
|
|
463
|
+
{
|
|
464
|
+
id: 'animal-wing-small', name: 'Small Wing', category: 'animalWing', slot: 'wing',
|
|
465
|
+
anchorX: 0, anchorY: 4, zOrder: 8, tags: ['small', 'bird'],
|
|
466
|
+
pixels: { S: WING_SMALL },
|
|
467
|
+
recolorableIndices: [0, 1],
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
id: 'animal-wing-large', name: 'Large Wing', category: 'animalWing', slot: 'wing',
|
|
471
|
+
anchorX: 0, anchorY: 7, zOrder: 8, tags: ['large', 'dragon'],
|
|
472
|
+
pixels: { S: WING_LARGE },
|
|
473
|
+
recolorableIndices: [0, 1],
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
id: 'animal-wing-bat', name: 'Bat Wing', category: 'animalWing', slot: 'wing',
|
|
477
|
+
anchorX: 0, anchorY: 6, zOrder: 8, tags: ['bat', 'dragon', 'dark'],
|
|
478
|
+
pixels: { S: WING_BAT },
|
|
479
|
+
recolorableIndices: [0, 1],
|
|
480
|
+
},
|
|
481
|
+
// ── Manes ──
|
|
482
|
+
{
|
|
483
|
+
id: 'animal-mane-short', name: 'Short Mane', category: 'animalMane', slot: 'mane',
|
|
484
|
+
anchorX: 3, anchorY: 0, zOrder: 9, tags: ['short', 'horse'],
|
|
485
|
+
pixels: { S: MANE_SHORT },
|
|
486
|
+
recolorableIndices: [0, 1],
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: 'animal-mane-long', name: 'Long Mane', category: 'animalMane', slot: 'mane',
|
|
490
|
+
anchorX: 3, anchorY: 0, zOrder: 9, tags: ['long', 'lion', 'horse'],
|
|
491
|
+
pixels: { S: MANE_LONG },
|
|
492
|
+
recolorableIndices: [0, 1],
|
|
493
|
+
},
|
|
494
|
+
// ── Horns ──
|
|
495
|
+
{
|
|
496
|
+
id: 'animal-horns-small', name: 'Small Horns', category: 'animalHead', slot: 'head',
|
|
497
|
+
anchorX: 4, anchorY: 2, zOrder: 12, tags: ['horns', 'small', 'goat'],
|
|
498
|
+
pixels: { S: HORNS_SMALL },
|
|
499
|
+
recolorableIndices: [0, 1],
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: 'animal-horns-dragon', name: 'Dragon Horns', category: 'animalHead', slot: 'head',
|
|
503
|
+
anchorX: 5, anchorY: 3, zOrder: 12, tags: ['horns', 'dragon', 'large'],
|
|
504
|
+
pixels: { S: HORNS_DRAGON },
|
|
505
|
+
recolorableIndices: [0, 1],
|
|
506
|
+
},
|
|
507
|
+
];
|
|
508
|
+
function animalAssembly(name, parts, w = 32, h = 32) {
|
|
509
|
+
return {
|
|
510
|
+
id: `animal-${name.toLowerCase().replace(/\s+/g, '-')}`,
|
|
511
|
+
name,
|
|
512
|
+
parts,
|
|
513
|
+
skeletonId: 'quadruped',
|
|
514
|
+
canvasWidth: w,
|
|
515
|
+
canvasHeight: h,
|
|
516
|
+
projection: 'sideView',
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
const ANIMAL_PRESETS = [
|
|
520
|
+
{
|
|
521
|
+
id: 'preset-cat', name: 'Cat', description: 'Small domestic cat',
|
|
522
|
+
tags: ['cat', 'pet', 'small'],
|
|
523
|
+
assembly: animalAssembly('Cat', [
|
|
524
|
+
{ partId: 'animal-leg-thin', offsetX: 8, offsetY: 22 },
|
|
525
|
+
{ partId: 'animal-leg-thin', offsetX: 12, offsetY: 22 },
|
|
526
|
+
{ partId: 'animal-leg-thin', offsetX: 18, offsetY: 22 },
|
|
527
|
+
{ partId: 'animal-leg-thin', offsetX: 22, offsetY: 22 },
|
|
528
|
+
{ partId: 'animal-body-small', offsetX: 10, offsetY: 16 },
|
|
529
|
+
{ partId: 'animal-head-cat', offsetX: 6, offsetY: 9 },
|
|
530
|
+
{ partId: 'animal-tail-short', offsetX: 22, offsetY: 15 },
|
|
531
|
+
]),
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
id: 'preset-dog', name: 'Dog', description: 'Medium-sized dog',
|
|
535
|
+
tags: ['dog', 'pet', 'medium'],
|
|
536
|
+
assembly: animalAssembly('Dog', [
|
|
537
|
+
{ partId: 'animal-leg-thin', offsetX: 6, offsetY: 22 },
|
|
538
|
+
{ partId: 'animal-leg-thin', offsetX: 10, offsetY: 22 },
|
|
539
|
+
{ partId: 'animal-leg-thin', offsetX: 18, offsetY: 22 },
|
|
540
|
+
{ partId: 'animal-leg-thin', offsetX: 22, offsetY: 22 },
|
|
541
|
+
{ partId: 'animal-body-medium', offsetX: 6, offsetY: 14 },
|
|
542
|
+
{ partId: 'animal-head-dog', offsetX: 2, offsetY: 6 },
|
|
543
|
+
{ partId: 'animal-tail-long', offsetX: 22, offsetY: 13 },
|
|
544
|
+
]),
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
id: 'preset-wolf', name: 'Wolf', description: 'Wild wolf with fluffy tail',
|
|
548
|
+
tags: ['wolf', 'wild', 'predator'],
|
|
549
|
+
assembly: animalAssembly('Wolf', [
|
|
550
|
+
{ partId: 'animal-leg-thin', offsetX: 5, offsetY: 22 },
|
|
551
|
+
{ partId: 'animal-leg-thin', offsetX: 9, offsetY: 22 },
|
|
552
|
+
{ partId: 'animal-leg-thin', offsetX: 18, offsetY: 22 },
|
|
553
|
+
{ partId: 'animal-leg-thin', offsetX: 22, offsetY: 22 },
|
|
554
|
+
{ partId: 'animal-body-medium', offsetX: 5, offsetY: 14 },
|
|
555
|
+
{ partId: 'animal-head-wolf', offsetX: 1, offsetY: 6 },
|
|
556
|
+
{ partId: 'animal-tail-fluffy', offsetX: 22, offsetY: 12 },
|
|
557
|
+
]),
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
id: 'preset-bird', name: 'Bird', description: 'Small bird with wings',
|
|
561
|
+
tags: ['bird', 'flying', 'small'],
|
|
562
|
+
assembly: animalAssembly('Bird', [
|
|
563
|
+
{ partId: 'animal-leg-bird', offsetX: 12, offsetY: 24 },
|
|
564
|
+
{ partId: 'animal-leg-bird', offsetX: 16, offsetY: 24 },
|
|
565
|
+
{ partId: 'animal-body-bird', offsetX: 10, offsetY: 17 },
|
|
566
|
+
{ partId: 'animal-head-bird', offsetX: 9, offsetY: 11 },
|
|
567
|
+
{ partId: 'animal-wing-small', offsetX: 18, offsetY: 14 },
|
|
568
|
+
{ partId: 'animal-tail-bird', offsetX: 6, offsetY: 19 },
|
|
569
|
+
]),
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
id: 'preset-dragon', name: 'Dragon', description: 'Fire-breathing dragon with wings',
|
|
573
|
+
tags: ['dragon', 'fantasy', 'large'],
|
|
574
|
+
assembly: animalAssembly('Dragon', [
|
|
575
|
+
{ partId: 'animal-leg-dragon', offsetX: 4, offsetY: 24 },
|
|
576
|
+
{ partId: 'animal-leg-dragon', offsetX: 9, offsetY: 24 },
|
|
577
|
+
{ partId: 'animal-leg-dragon', offsetX: 18, offsetY: 24 },
|
|
578
|
+
{ partId: 'animal-leg-dragon', offsetX: 23, offsetY: 24 },
|
|
579
|
+
{ partId: 'animal-body-dragon', offsetX: 4, offsetY: 14 },
|
|
580
|
+
{ partId: 'animal-head-dragon', offsetX: 0, offsetY: 4 },
|
|
581
|
+
{ partId: 'animal-horns-dragon', offsetX: 0, offsetY: 1 },
|
|
582
|
+
{ partId: 'animal-wing-large', offsetX: 18, offsetY: 4 },
|
|
583
|
+
{ partId: 'animal-tail-dragon', offsetX: 22, offsetY: 18 },
|
|
584
|
+
], 32, 32),
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
id: 'preset-rabbit', name: 'Rabbit', description: 'Small fluffy rabbit',
|
|
588
|
+
tags: ['rabbit', 'pet', 'small'],
|
|
589
|
+
assembly: animalAssembly('Rabbit', [
|
|
590
|
+
{ partId: 'animal-leg-thin', offsetX: 10, offsetY: 24 },
|
|
591
|
+
{ partId: 'animal-leg-thin', offsetX: 14, offsetY: 24 },
|
|
592
|
+
{ partId: 'animal-leg-thin', offsetX: 18, offsetY: 24 },
|
|
593
|
+
{ partId: 'animal-leg-thin', offsetX: 22, offsetY: 24 },
|
|
594
|
+
{ partId: 'animal-body-small', offsetX: 10, offsetY: 18 },
|
|
595
|
+
{ partId: 'animal-head-rabbit', offsetX: 6, offsetY: 8 },
|
|
596
|
+
{ partId: 'animal-tail-short', offsetX: 22, offsetY: 18 },
|
|
597
|
+
]),
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
id: 'preset-bear', name: 'Bear', description: 'Large bear',
|
|
601
|
+
tags: ['bear', 'wild', 'large'],
|
|
602
|
+
assembly: animalAssembly('Bear', [
|
|
603
|
+
{ partId: 'animal-leg-thick', offsetX: 4, offsetY: 22 },
|
|
604
|
+
{ partId: 'animal-leg-thick', offsetX: 9, offsetY: 22 },
|
|
605
|
+
{ partId: 'animal-leg-thick', offsetX: 18, offsetY: 22 },
|
|
606
|
+
{ partId: 'animal-leg-thick', offsetX: 23, offsetY: 22 },
|
|
607
|
+
{ partId: 'animal-body-large', offsetX: 3, offsetY: 12 },
|
|
608
|
+
{ partId: 'animal-head-bear', offsetX: 0, offsetY: 3 },
|
|
609
|
+
{ partId: 'animal-tail-short', offsetX: 22, offsetY: 14 },
|
|
610
|
+
]),
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
id: 'preset-horse', name: 'Horse', description: 'Horse with mane',
|
|
614
|
+
tags: ['horse', 'rideable', 'large'],
|
|
615
|
+
assembly: animalAssembly('Horse', [
|
|
616
|
+
{ partId: 'animal-leg-thick', offsetX: 4, offsetY: 22 },
|
|
617
|
+
{ partId: 'animal-leg-thick', offsetX: 9, offsetY: 22 },
|
|
618
|
+
{ partId: 'animal-leg-thick', offsetX: 18, offsetY: 22 },
|
|
619
|
+
{ partId: 'animal-leg-thick', offsetX: 23, offsetY: 22 },
|
|
620
|
+
{ partId: 'animal-body-large', offsetX: 3, offsetY: 12 },
|
|
621
|
+
{ partId: 'animal-head-horse', offsetX: 0, offsetY: 2 },
|
|
622
|
+
{ partId: 'animal-mane-long', offsetX: 4, offsetY: 4 },
|
|
623
|
+
{ partId: 'animal-tail-long', offsetX: 22, offsetY: 14 },
|
|
624
|
+
]),
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
id: 'preset-phoenix', name: 'Phoenix', description: 'Mythical fire bird',
|
|
628
|
+
tags: ['phoenix', 'fantasy', 'bird', 'fire'],
|
|
629
|
+
assembly: animalAssembly('Phoenix', [
|
|
630
|
+
{ partId: 'animal-leg-bird', offsetX: 12, offsetY: 24 },
|
|
631
|
+
{ partId: 'animal-leg-bird', offsetX: 16, offsetY: 24 },
|
|
632
|
+
{ partId: 'animal-body-bird', offsetX: 10, offsetY: 17,
|
|
633
|
+
colorOverrides: { 0: '#f06020', 1: '#c04010' } },
|
|
634
|
+
{ partId: 'animal-head-bird', offsetX: 9, offsetY: 11,
|
|
635
|
+
colorOverrides: { 0: '#f06020', 1: '#c04010', 3: '#f0d060' } },
|
|
636
|
+
{ partId: 'animal-wing-large', offsetX: 18, offsetY: 10,
|
|
637
|
+
colorOverrides: { 0: '#f0a020', 1: '#d06010' } },
|
|
638
|
+
{ partId: 'animal-tail-bird', offsetX: 4, offsetY: 19,
|
|
639
|
+
colorOverrides: { 0: '#f07030', 1: '#d05020' } },
|
|
640
|
+
]),
|
|
641
|
+
},
|
|
642
|
+
];
|
|
643
|
+
/** Initialize: register all animal parts */
|
|
644
|
+
function initAnimalParts() {
|
|
645
|
+
spriteGeneratorCore.registerParts(ANIMAL_PARTS);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
exports.ANIMAL_PARTS = ANIMAL_PARTS;
|
|
649
|
+
exports.ANIMAL_PRESETS = ANIMAL_PRESETS;
|
|
650
|
+
exports.FEATHER_PALETTES = FEATHER_PALETTES;
|
|
651
|
+
exports.FUR_PALETTES = FUR_PALETTES;
|
|
652
|
+
exports.SCALE_PALETTES = SCALE_PALETTES;
|
|
653
|
+
exports.initAnimalParts = initAnimalParts;
|
|
654
|
+
//# sourceMappingURL=animalGeneratorPresets.js.map
|