Skip to content

Commit 0f49317

Browse files
committed
36 new sounds, "NEW" badge + tag organization
1 parent 424b45b commit 0f49317

File tree

8 files changed

+641
-36
lines changed

8 files changed

+641
-36
lines changed

src/components/library-item/library-item.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
padding: 0.25rem;
3535
padding-bottom: 0;
3636
}
37+
.library-item-new {
38+
filter: hue-rotate(60deg);
39+
}
40+
.library-item-new-badge {
41+
border-radius: 1024px;
42+
color: white;
43+
font-size: 10px;
44+
font-weight: bold;
45+
background-color: $sound-primary;
46+
padding: 1px 5px;
47+
position: absolute;
48+
left: -8px;
49+
top: -8px;
50+
}
3751

3852
.library-item-extension {
3953
align-self: stretch;
@@ -43,6 +57,9 @@
4357
border-width: 2px;
4458
border-color: $motion-primary;
4559
}
60+
.library-item-sound:hover {
61+
border-color: $sound-primary;
62+
}
4663

4764
.library-item-favorite {
4865
background: transparent;

src/components/library-item/library-item.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ class LibraryItemComponent extends React.PureComponent {
313313
styles.libraryItem, {
314314
[styles.hidden]: this.props.hidden,
315315
[styles.libraryItemSound]: this.props.styleForSound,
316+
[styles.libraryItemNew]: this.props.isNew,
316317
}
317318
)}
318319
role="button"
@@ -324,6 +325,11 @@ class LibraryItemComponent extends React.PureComponent {
324325
onMouseEnter={this.props.showPlayButton ? null : this.props.onMouseEnter}
325326
onMouseLeave={this.props.showPlayButton ? null : this.props.onMouseLeave}
326327
>
328+
{this.props.isNew && (
329+
<div className={styles.libraryItemNewBadge}>
330+
NEW
331+
</div>
332+
)}
327333
{/* Layers of wrapping is to prevent layout thrashing on animation */}
328334
<Box className={styles.libraryItemImageContainerWrapper}>
329335
<Box
@@ -368,7 +374,8 @@ class LibraryItemComponent extends React.PureComponent {
368374
{this.props.showPlayButton ? (
369375
<PlayButton
370376
className={classNames({
371-
[styles.libraryItemSoundPlayButton]: this.props.styleForSound
377+
[styles.libraryItemSoundPlayButton]: this.props.styleForSound,
378+
[styles.libraryItemNewPlayButton]: this.props.isNew,
372379
})}
373380
isPlaying={this.props.isPlaying}
374381
onPlay={this.props.onPlay}
@@ -397,6 +404,7 @@ LibraryItemComponent.propTypes = {
397404
disabled: PropTypes.bool,
398405
extensionId: PropTypes.string,
399406
featured: PropTypes.bool,
407+
isNew: PropTypes.bool,
400408
hidden: PropTypes.bool,
401409
iconURL: PropTypes.string,
402410
overlayURL: PropTypes.string,

src/components/library/library.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ class LibraryComponent extends React.Component {
449449
extensionId={dataItem.extensionId}
450450
featured={dataItem.featured}
451451
hidden={dataItem.hidden}
452+
isNew={dataItem.tags && dataItem.tags.includes("new")}
452453
href={dataItem.href}
453454
iconMd5={dataItem.costumes ? dataItem.costumes[0].md5ext : dataItem.md5ext}
454455
iconRawURL={this.props.actor === "CostumeLibrary" ? `${PM_LIBRARY_API}files/${dataItem.libraryFilePage}` : dataItem.rawURL}

src/containers/library-item.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ class LibraryItem extends React.PureComponent {
187187
eventSubmittor={this.props.eventSubmittor}
188188
description={this.props.description}
189189
disabled={this.props.disabled}
190+
isNew={this.props.isNew}
190191
extensionId={this.props.extensionId}
191192
featured={this.props.featured}
192193
hidden={this.props.hidden}
@@ -243,6 +244,7 @@ LibraryItem.propTypes = {
243244
extensionId: PropTypes.string,
244245
href: PropTypes.string,
245246
featured: PropTypes.bool,
247+
isNew: PropTypes.bool,
246248
hidden: PropTypes.bool,
247249
iconMd5: PropTypes.string,
248250
iconRawURL: PropTypes.string,

src/lib/libraries/sound-tags.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
import messages from './tag-messages.js';
22
export default [
3+
{tag: 'penguinmod', intlLabel: messages.penguinmod},
4+
{type: 'divider'},
5+
{type: 'subtitle', intlLabel: "Types"},
36
{tag: 'themes', intlLabel: messages.themes},
47
{tag: 'loops', intlLabel: messages.loops},
5-
{tag: 'divider2', intlLabel: messages.scratch, type: 'divider'},
6-
{tag: 'animals', intlLabel: messages.animals},
78
{tag: 'effects', intlLabel: messages.effects},
9+
{type: 'divider'},
10+
{type: 'subtitle', intlLabel: "General"},
11+
{tag: 'animals', intlLabel: messages.animals},
12+
{tag: 'monster', intlLabel: messages.monsters},
813
{tag: 'notes', intlLabel: messages.notes},
914
{tag: 'percussion', intlLabel: messages.percussion},
10-
{tag: 'space', intlLabel: messages.space},
11-
{tag: 'sports', intlLabel: messages.sports},
1215
{tag: 'voice', intlLabel: messages.voice},
1316
{tag: 'wacky', intlLabel: messages.wacky},
14-
{tag: 'swords', intlLabel: messages.swords},
15-
{tag: 'guns', intlLabel: messages.guns},
1617
{tag: 'ui', intlLabel: messages.ui},
18+
{type: 'divider'},
19+
{type: 'subtitle', intlLabel: "Objects"},
1720
{tag: 'footsteps', intlLabel: messages.footsteps},
18-
{tag: 'penguinmod', intlLabel: messages.penguinmod}
21+
{tag: 'space', intlLabel: messages.space},
22+
{tag: 'sports', intlLabel: messages.sports},
23+
{tag: 'swords', intlLabel: messages.swords},
24+
{tag: 'guns', intlLabel: messages.guns},
25+
{type: 'divider'},
26+
{type: 'subtitle', intlLabel: "Materials"},
27+
{tag: 'metal', intlLabel: messages.metal},
1928
];

src/lib/libraries/sounds-lengths.json

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@
2929
"sounds/smallbreak3.mp3": 620,
3030
"sounds/smallbreak2.mp3": 600,
3131
"sounds/smallbreak1.mp3": 570,
32+
"sounds/slam05.mp3": 730,
33+
"sounds/slam04.mp3": 730,
34+
"sounds/slam03.mp3": 520,
35+
"sounds/slam02.mp3": 940,
3236
"sounds/slam01.mp3": 440,
3337
"sounds/shotgun.mp3": 3190,
38+
"sounds/scream7.mp3": 2220,
39+
"sounds/scream6.mp3": 650,
3440
"sounds/scream5.mp3": 2870,
3541
"sounds/scream4.mp3": 1440,
3642
"sounds/scream3.mp3": 550,
@@ -75,6 +81,7 @@
7581
"sounds/gunshot2.mp3": 1830,
7682
"sounds/gunshot1.mp3": 760,
7783
"sounds/gryrow.mp3": 56090,
84+
"sounds/groovy_break.mp3": 18320,
7885
"sounds/good.mp3": 1230,
7986
"sounds/good-morning.mp3": 710,
8087
"sounds/glass_shatter3.mp3": 1200,
@@ -120,10 +127,12 @@
120127
"sounds/bossa-chords.mp3": 22060,
121128
"sounds/bonk3.mp3": 630,
122129
"sounds/bonk2.mp3": 710,
130+
"sounds/boing5.mp3": 2220,
123131
"sounds/boing4.mp3": 970,
124132
"sounds/boing3.mp3": 1020,
125133
"sounds/boing2.mp3": 940,
126134
"sounds/bikehorn.mp3": 1070,
135+
"sounds/bellding.mp3": 3130,
127136
"sounds/basically_green.mp3": 15650,
128137
"sounds/audiencevoices.mp3": 36050,
129138
"sounds/alien.mp3": 9740,
@@ -142,6 +151,11 @@
142151
"sounds/keyboard/click2.mp3": 370,
143152
"sounds/keyboard/click1.mp3": 340,
144153
"sounds/keyboard/angry_typing01.mp3": 4830,
154+
"sounds/impact/impact05.mp3": 6450,
155+
"sounds/impact/impact04.mp3": 7260,
156+
"sounds/impact/impact03.mp3": 8050,
157+
"sounds/impact/impact02.mp3": 6900,
158+
"sounds/impact/impact01.mp3": 7030,
145159
"sounds/footsteps/wood3.mp3": 4440,
146160
"sounds/footsteps/wood2.mp3": 8390,
147161
"sounds/footsteps/wood1.mp3": 9770,
@@ -170,7 +184,29 @@
170184
"sounds/drumbreak/dnb1.mp3": 2850,
171185
"sounds/drumbreak/cowbell1.mp3": 5690,
172186
"sounds/drumbreak/break2.mp3": 4570,
173-
"sounds/drumbreak/break1.mp3": 5620
187+
"sounds/drumbreak/break1.mp3": 5620,
188+
"sounds/monster/snarl/snarl04.mp3": 2660,
189+
"sounds/monster/snarl/snarl03.mp3": 3580,
190+
"sounds/monster/snarl/snarl02.mp3": 3000,
191+
"sounds/monster/snarl/snarl01.mp3": 3000,
192+
"sounds/material/metal/sheet/sheet01.mp3": 600,
193+
"sounds/material/metal/scrape/scrape04.mp3": 340,
194+
"sounds/material/metal/scrape/scrape03.mp3": 340,
195+
"sounds/material/metal/scrape/scrape02.mp3": 500,
196+
"sounds/material/metal/scrape/scrape01.mp3": 240,
197+
"sounds/material/metal/pipe/pipe02.mp3": 1570,
198+
"sounds/material/metal/pipe/pipe01.mp3": 1650,
199+
"sounds/material/metal/hit/hit05.mp3": 370,
200+
"sounds/material/metal/hit/hit04.mp3": 550,
201+
"sounds/material/metal/hit/hit03.mp3": 860,
202+
"sounds/material/metal/hit/hit02.mp3": 1700,
203+
"sounds/material/metal/hit/hit01.mp3": 1440,
204+
"sounds/material/metal/door/door03.mp3": 1520,
205+
"sounds/material/metal/door/door02.mp3": 2460,
206+
"sounds/material/metal/door/door01.mp3": 2250,
207+
"sounds/material/metal/creak/creak03.mp3": 3160,
208+
"sounds/material/metal/creak/creak02.mp3": 3420,
209+
"sounds/material/metal/creak/creak01.mp3": 4830
174210
},
175211
"scratch": {
176212
"ff8b8c3bf841a11fd5fe3afaa92be1b5": 3730,

0 commit comments

Comments
 (0)