Skip to content

Commit a37d7e8

Browse files
committed
improve lookbook
1 parent 6e931d2 commit a37d7e8

File tree

8 files changed

+109
-6
lines changed

8 files changed

+109
-6
lines changed
100 KB
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"frames": {
3+
"head-00": {
4+
"frame": { "x": 286, "y": 1077, "w": 274, "h": 336 },
5+
"rotated": false,
6+
"trimmed": false,
7+
"spriteSourceSize": { "x": 0, "y": 0, "w": 274, "h": 336 },
8+
"sourceSize": { "w": 274, "h": 336 }
9+
},
10+
"robot-00": {
11+
"frame": { "x": 445, "y": 305, "w": 351, "h": 356 },
12+
"rotated": false,
13+
"trimmed": false,
14+
"spriteSourceSize": { "x": 0, "y": 0, "w": 351, "h": 356 },
15+
"sourceSize": { "w": 351, "h": 356 }
16+
},
17+
"robot-01": {
18+
"frame": { "x": 1, "y": 431, "w": 335, "h": 339 },
19+
"rotated": false,
20+
"trimmed": false,
21+
"spriteSourceSize": { "x": 0, "y": 0, "w": 335, "h": 339 },
22+
"sourceSize": { "w": 335, "h": 339 }
23+
},
24+
"robot-02": {
25+
"frame": { "x": 1, "y": 772, "w": 283, "h": 423 },
26+
"rotated": false,
27+
"trimmed": false,
28+
"spriteSourceSize": { "x": 0, "y": 0, "w": 283, "h": 423 },
29+
"sourceSize": { "w": 283, "h": 423 }
30+
},
31+
"robot-03": {
32+
"frame": { "x": 445, "y": 1, "w": 384, "h": 302 },
33+
"rotated": false,
34+
"trimmed": false,
35+
"spriteSourceSize": { "x": 0, "y": 0, "w": 384, "h": 302 },
36+
"sourceSize": { "w": 384, "h": 302 }
37+
},
38+
"robot-04": {
39+
"frame": { "x": 831, "y": 1, "w": 126, "h": 150 },
40+
"rotated": false,
41+
"trimmed": false,
42+
"spriteSourceSize": { "x": 0, "y": 0, "w": 126, "h": 150 },
43+
"sourceSize": { "w": 126, "h": 150 }
44+
},
45+
"robot-05": {
46+
"frame": { "x": 633, "y": 663, "w": 283, "h": 414 },
47+
"rotated": false,
48+
"trimmed": false,
49+
"spriteSourceSize": { "x": 0, "y": 0, "w": 283, "h": 414 },
50+
"sourceSize": { "w": 283, "h": 414 }
51+
},
52+
"skull-00": {
53+
"frame": { "x": 1, "y": 1, "w": 442, "h": 428 },
54+
"rotated": false,
55+
"trimmed": false,
56+
"spriteSourceSize": { "x": 0, "y": 0, "w": 442, "h": 428 },
57+
"sourceSize": { "w": 442, "h": 428 }
58+
}
59+
},
60+
"meta": {
61+
"app": "https://www.codeandweb.com/texturepacker",
62+
"version": "1.0",
63+
"image": "skulls-n-robots--natural.png",
64+
"format": "RGBA8888",
65+
"size": { "w": 1024, "h": 2048 },
66+
"scale": "1",
67+
"smartupdate": "$TexturePacker:SmartUpdate:9d5eb569e15f9fb706b8e29bb02bd21e:67229d0c6336253efe0d6524e8cb93e2:a8f162fc7a0dcbafee8f3f64b02e2a94$"
68+
}
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"frames": {
3+
"ship-00": {
4+
"frame": { "x": 844, "y": 1, "w": 468, "h": 466 },
5+
"rotated": false,
6+
"trimmed": false,
7+
"spriteSourceSize": { "x": 0, "y": 0, "w": 468, "h": 466 },
8+
"sourceSize": { "w": 468, "h": 466 }
9+
},
10+
"ship-01": {
11+
"frame": { "x": 1, "y": 1, "w": 841, "h": 920 },
12+
"rotated": false,
13+
"trimmed": false,
14+
"spriteSourceSize": { "x": 0, "y": 0, "w": 841, "h": 920 },
15+
"sourceSize": { "w": 841, "h": 920 }
16+
},
17+
"ship-02": {
18+
"frame": { "x": 844, "y": 469, "w": 443, "h": 418 },
19+
"rotated": false,
20+
"trimmed": false,
21+
"spriteSourceSize": { "x": 0, "y": 0, "w": 443, "h": 418 },
22+
"sourceSize": { "w": 443, "h": 418 }
23+
}
24+
},
25+
"meta": {
26+
"app": "https://www.codeandweb.com/texturepacker",
27+
"version": "1.0",
28+
"image": "spaceships.png",
29+
"format": "RGBA8888",
30+
"size": { "w": 1313, "h": 1313 },
31+
"scale": "1",
32+
"smartupdate": "$TexturePacker:SmartUpdate:261fbe1c75839df77d33ecf1e185da74:0d916bf28d20488915a6dd96169d5eee:3272f82166f65e17cc3a00865a7647ff$"
33+
}
34+
}
1.09 MB
Loading
Loading
Loading

apps/lookbook/src/pages/demos/textured-sprites.astro

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {title} from './_textured-sprites.json';
1414
}
1515
body {
1616
background-color: #391e39;
17-
background: radial-gradient(circle, rgb(82 95 132) 0%, rgb(149 188 199) 100%);
17+
background: radial-gradient(circle, rgb(175 82 82) 0%, rgb(90 148 191) 100%);
1818
color: #eee;
1919
font-family: sans-serif;
2020
font-size: 16px;
@@ -35,17 +35,17 @@ import {title} from './_textured-sprites.json';
3535
const demo = new PerspectiveOrbitDemo(document.getElementById('canvas-container'), {antialias: false});
3636

3737
demo.on('init', async ({scene}) => {
38-
const CAPACITY = 333;
38+
const CAPACITY = 256;
3939

4040
const geometry = new TexturedSpritesGeometry(CAPACITY);
4141

42-
const {tileSet, texture} = await new TileSetLoader().loadAsync(assetsUrl('nobinger-anim-sheet.png'), {
43-
tileWidth: 64,
44-
tileHeight: 64,
42+
const {tileSet, texture} = await new TileSetLoader().loadAsync(assetsUrl('skinball-256.png'), {
43+
tileWidth: 256,
44+
tileHeight: 256,
4545
margin: 1,
4646
});
4747

48-
const bouncingSprites = new BouncingSprites(geometry.instancedPool, tileSet.atlas, 100, 75, 7, CAPACITY);
48+
const bouncingSprites = new BouncingSprites(geometry.instancedPool, tileSet.atlas, 100, 75, 4, CAPACITY);
4949

5050
bouncingSprites.createSprites();
5151

0 commit comments

Comments
 (0)