Skip to content

Commit c4fd78c

Browse files
committedNov 7, 2024
v3.2.0
Final help panel tweaks Allow typing expiration blocks as multiline
1 parent 3160410 commit c4fd78c

File tree

11 files changed

+378
-196862
lines changed

11 files changed

+378
-196862
lines changed
 

‎dist/app.js

+2-93,778
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package-lock.json

+319-2,210
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snowstorm",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "Minecraft Bedrock Edition particle editor",
55
"author": {
66
"name": "JannisX11",
@@ -32,20 +32,20 @@
3232
"vue-template-compiler": "^2.6.12",
3333
"webpack": "^5.89.0",
3434
"webpack-bundle-size-analyzer": "^3.1.0",
35-
"webpack-cli": "^3.3.12",
35+
"webpack-cli": "^5.1.4",
3636
"webpack-dev-server": "^5.0.2"
3737
},
3838
"dependencies": {
3939
"bootstrap": "^4.6.2",
4040
"fflate": "^0.7.3",
4141
"lucide-vue": "^0.298.0",
42-
"molangjs": "^1.6.4",
42+
"molangjs": "^1.6.5",
4343
"prismjs": "^1.28.0",
4444
"root": "github:JannisX11/vue-prism-editor",
4545
"three": "^0.134.0",
4646
"vue": "^2.6.12",
4747
"vue-color": "^2.8.0",
4848
"vue-prism-component": "^1.2.0",
49-
"wintersky": "^1.3.0"
49+
"wintersky": "^1.3.2"
5050
}
5151
}

‎src/components/App.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<code-viewer v-if="tab == 'code'"></code-viewer>
2323

2424

25-
<help-panel v-if="is_help_panel_open || tab == 'help'" ref="help_panel" :portrait_view="portrait_view" @close="is_help_panel_open = false; setTab(previous_tab)"></help-panel>
25+
<help-panel v-if="is_help_panel_open || tab == 'help'" ref="help_panel" :portrait_view="portrait_view" @close="is_help_panel_open = false; portrait_view && setTab(previous_tab);"></help-panel>
2626

2727

2828
<div class="resizer"
@@ -127,7 +127,7 @@ export default {
127127
},
128128
async openHelpPage(tab_key, group_key) {
129129
this.is_help_panel_open = true;
130-
this.setTab('help');
130+
if (portrait_view) this.setTab('help');
131131
await Vue.nextTick();
132132
this.$refs.help_panel.openPage(tab_key, group_key);
133133
},

‎src/components/HelpPanel.vue

+23-16
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,32 @@
55
<a class="back_button" v-if="category_key" @click="openPage('', '')"><ChevronLeft :size="20" /> Back to overview</a>
66
</div>
77

8-
<content v-if="!category_key">
9-
<h1>Documentation</h1>
10-
<ul>
11-
<li v-for="(cat, cat_key) in HelpData">
12-
<span class="category_title">{{ cat.title }}</span>
13-
<ul>
14-
<li v-for="(pg, pg_key) in HelpData[cat_key].pages" class="clickable" @click="openPage(cat_key, pg_key)">{{ pg.title }}</li>
15-
</ul>
16-
</li>
17-
</ul>
18-
</content>
19-
<content v-else-if="page">
8+
<content ref="content">
9+
<template v-if="!category_key">
10+
<h1>Documentation</h1>
11+
<ul>
12+
<li v-for="(cat, cat_key) in HelpData">
13+
<span class="category_title">{{ cat.title }}</span>
14+
<ul>
15+
<li v-for="(pg, pg_key) in HelpData[cat_key].pages" class="clickable" @click="openPage(cat_key, pg_key)">{{ pg.title }}</li>
16+
</ul>
17+
</li>
18+
</ul>
19+
</template>
20+
<template v-else-if="page">
2021

21-
<h1>{{ page.title }}</h1>
22-
<HelpText v-if="page.text" :text="page.text"></HelpText>
22+
<h1>{{ page.title }}</h1>
23+
<HelpText v-if="page.text" :text="page.text"></HelpText>
2324

24-
<HelpInputList v-if="page.inputs" :inputs="page.inputs" :category_key="category_key" :page_key="page_key" />
25+
<HelpInputList v-if="page.inputs" :inputs="page.inputs" :category_key="category_key" :page_key="page_key" />
26+
</template>
2527
</content>
2628
</div>
2729
</template>
2830

2931
<script>
3032
import HelpData from './../help'
31-
import { X, ChevronLeft } from 'lucide-vue'
33+
import { X, ChevronLeft, Watch } from 'lucide-vue'
3234
import HelpText from './HelpPanel/HelpText.vue';
3335
import HelpInputList from './HelpPanel/HelpInputList.vue';
3436
import Vue from 'vue';
@@ -53,6 +55,11 @@ export default {
5355
props: {
5456
portrait_view: Boolean
5557
},
58+
watch: {
59+
page_key() {
60+
this.$refs.content.scrollTop = 0;
61+
}
62+
},
5663
computed: {
5764
page() {
5865
return HelpData[this.category_key]?.pages[this.page_key];

‎src/export.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ function getValue(key, required) {
2525
if (type.array) {
2626
var result = [];
2727
for (var num of value) {
28-
result.push(processValue(num, type));
28+
let value = processValue(num, type);
29+
if (type.type == 'string' && typeof value == 'string' && value.includes('\n')) {
30+
let lines = value.split(/\s*\n+\s*/g).filter(line => line.length);
31+
result.push(...lines);
32+
} else {
33+
result.push(value);
34+
}
2935
}
3036
if (!result.find(v => v) && !required) result = undefined;
3137
} else {

‎src/help.js

+14-5
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default {
8484
text: [
8585
'An identifier consists of two parts: The project namespace, and the particle name. The namespace is always separated by a colon',
8686
'The identifier should be all in lower-case letters and use underscores to separate words. Letters from a-z, numbers, points and underscores are allowed, other characters may cause issues.',
87-
'Example: `snowstorm:fire`',
87+
'Example: snowstorm:fire',
8888
'The identifier can be used in-game to reference the particle effect, for example in particle commands, scripts, or entities.'
8989
]
9090
},
@@ -128,7 +128,7 @@ export default {
128128
type: 'select',
129129
text: [
130130
{type: 'h3', text: 'Steady'},
131-
'Particles are spawned steadily over the lifetime of the emitter',
131+
'Particles are spawned steadily during the lifetime of the emitter',
132132
{type: 'h3', text: 'Instant'},
133133
'All particles are spawned instantly at the start of the emitter\'s lifetime',
134134
{type: 'h3', text: 'Manual'},
@@ -155,6 +155,14 @@ export default {
155155
inputs: {
156156
mode: {
157157
type: 'select',
158+
text: [
159+
{type: 'h3', text: 'Looping'},
160+
'Emitter will loop until it is removed.',
161+
{type: 'h3', text: 'Once'},
162+
'Emitter will execute once, and once the lifetime ends or the number of particles allowed to emit have emitted, the emitter expires.',
163+
{type: 'h3', text: 'Expression'},
164+
'Emitter will turn "on" when the activation expression is non-zero, and will turn "off" when it\'s zero. This is useful for situations like driving an entity-attached emitter from an entity variable.'
165+
]
158166
},
159167
active_time: {
160168
type: 'molang',
@@ -388,7 +396,7 @@ export default {
388396
{type: 'h3', text: 'Blend'},
389397
'Blend supports partial transparency in pixels. Note that with this material, particles of different colors, even from different effect, can cause visual flickering in-game when viewed behind each other.',
390398
{type: 'h3', text: 'Additive'},
391-
'Partial transparency is supported. Particles are stacked on top of each other using additive blending. This is ideal for creating light effects.',
399+
'Partial transparency is supported. Particles are rendered additive blending. This is ideal for creating light effects.',
392400
{type: 'h3', text: 'Opaque'},
393401
'The particle is fully opaque, no transparent pixels are supported.',
394402
{type: 'h3', text: 'Custom:'},
@@ -482,6 +490,7 @@ export default {
482490
type: 'color',
483491
},
484492
expression: {
493+
label: 'Color Expression',
485494
type: 'molang',
486495
context: 'particle',
487496
evaluation: 'per_tick',
@@ -506,7 +515,7 @@ export default {
506515
type: 'image',
507516
label: 'Image',
508517
text: [
509-
'In VS Code, the image gets loaded from the provided texture path automatically. To use this, ensure that you open the entire texture pack folder as a project in VSCode, rather than just the individual particle file.',
518+
'In VS Code, the image gets loaded from the provided texture path automatically. To use this, ensure that you open the entire texture pack folder as a project in VSCode, not just the individual particle file.',
510519
'In the web app, you need to upload your PNG file to preview it, unless you are using one of the included vanilla particle files.',
511520
'Painting on the texture is supported using the provided editing tools.'
512521
]
@@ -530,7 +539,7 @@ export default {
530539
},
531540
size: {
532541
type: 'number',
533-
text: 'This size is used to set a base size for the UV map. This does not have to match the actual texture resolution, but the aspect ratio should be the same.'
542+
text: 'This size is used to set a base size for the UV map. This does not have to be identical to the actual texture resolution, but the aspect ratio should match.'
534543
},
535544
uv: {
536545
type: 'number',

‎src/input_structure.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ const Data = {
629629
max_frame: new Input({
630630
id: 'particle_texture_max_frame',
631631
label: 'Max Frame',
632-
info: 'Maximum amount of frames to draw from the flipbook',
632+
info: 'Maximum amount of animation frames to draw from the flipbook',
633633
enabled_modes: ['animated']
634634
}),
635635
stretch_to_lifetime: new Input({
@@ -677,15 +677,15 @@ const Data = {
677677
expire_in: new Input({
678678
id: 'particle_lifetime_expire_in',
679679
label: 'Kill in Blocks',
680-
info: 'List of blocks to that let the particle expire on contact. Block IDs have a namespace and are separated by a space character.',
680+
info: 'List of blocks that let the particle expire on contact. Enter the block IDs including the namespace.',
681681
placeholder: 'minecraft:stone',
682682
axis_count: -1,
683683
type: 'text'
684684
}),
685685
expire_outside: new Input({
686686
id: 'particle_lifetime_expire_outside',
687687
label: 'Only in Blocks',
688-
info: 'List of blocks outside of which the particle expires. Block IDs have a namespace and are separated by a space character.',
688+
info: 'List of blocks outside of which the particle expires. Enter the block IDs including the namespace.',
689689
placeholder: 'minecraft:air',
690690
axis_count: -1,
691691
type: 'text'

‎vscode_extension/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "snowstorm",
33
"displayName": "Snowstorm",
44
"description": "Minecraft Bedrock Edition particle editor",
5-
"version": "3.1.0",
6-
"enableProposedApi": false,
5+
"version": "3.2.0",
6+
"enabledApiProposals": [],
77
"publisher": "JannisX11",
88
"engines": {
99
"vscode": "^1.44.0"

‎vscode_extension/snowstorm/app.js

+2-93,778
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎yarn.lock

-7,063
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.