Web-based formspec editor (beta)

User avatar
luk3yx
Member
 
Posts: 61
Joined: Sun Oct 21, 2012 18:14
Location: Earth
GitHub: luk3yx
IRC: luk3yx
In-game: luk3yx

Web-based formspec editor (beta)

by luk3yx » Fri Jan 31, 2020 08:12

Web-based formspec edtior

Really actually removing the pains of formspec design.

Git repository

Try it online

Uses Fengari to run my formspec_ast and fs51 mods on web browsers.

image[​] elements use HDX textures by default (dynamically loaded when required).

Screenshot

Image

Major features

  • Web-based (no waiting for MT to load)
  • Property editor
  • ${lua code} substitution in text values.
    • Don't remove the weird comments generated when exporting these formspecs if you plan to import them again.
  • The ability to load existing formspecs (provided they are version 2 or above).

Limitations

  • Although it can save formspecs in the version 1 format, it cannot load them in this format. Co-ordinates are backported with help from my fs51 mod.
  • The properties editor is slow when manipulating lots of properties.
  • Malicious formspecs imported with the ${...} substitution option enabled can freeze the webpage.
  • Element alignment might not be perfect.
  • There may be bugs in Google Chrome, I have only tested this in Firefox.
  • Texture modifiers in image[​] will not be displayed in the preview.
  • Not all formspec elements are supported.

Copyright / License

Copyright © 2020 by luk3yx

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Last edited by luk3yx on Sat Feb 01, 2020 07:44, edited 1 time in total.
git_undo() { [ -e .git ] || return 1; local r=$(git remote get-url origin); cd ..; rm -rf "$OLDPWD"; git clone "$r" "$OLDPWD"; cd "$OLDPWD"; }
 

twoelk
Member
 
Posts: 1352
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: Web-based formspec editor (beta)

by twoelk » Fri Jan 31, 2020 09:01

ooooooh cool

played a little

ups, decimal point not comma , yeah I always blunder into that ...
maybe displaying a grid might be usefull?
hmm colorchooser somewhere?

nevertheless pretty interesting
gotta do some real testing later
 

User avatar
texmex
Member
 
Posts: 1724
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: Web-based formspec editor (beta)

by texmex » Fri Jan 31, 2020 10:44

This is a game changer! Pun intended!
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

User avatar
luk3yx
Member
 
Posts: 61
Joined: Sun Oct 21, 2012 18:14
Location: Earth
GitHub: luk3yx
IRC: luk3yx
In-game: luk3yx

Re: Web-based formspec editor (beta)

by luk3yx » Sat Feb 01, 2020 07:48

twoelk wrote:ups, decimal point not comma , yeah I always blunder into that ...

Number inputs now treat commas as decimal points (however they still use . to display them).

twoelk wrote:maybe displaying a grid might be usefull?

Added a grid option (currently grid lines are 2px wide, however).

twoelk wrote:hmm colorchooser somewhere?

The only element that it would currently be used on is the box element, I probably won't add one for now.
git_undo() { [ -e .git ] || return 1; local r=$(git remote get-url origin); cd ..; rm -rf "$OLDPWD"; git clone "$r" "$OLDPWD"; cd "$OLDPWD"; }
 

User avatar
Nathan.S
Member
 
Posts: 971
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Web-based formspec editor (beta)

by Nathan.S » Sun Feb 02, 2020 21:33

This seems extremely useful, I always hate launching a world a dozen times just to get a formspec laid out correctly. The only thing I'm seeing that's missing is the scaling when you change the size of the browser window.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

User avatar
v-rob
Member
 
Posts: 729
Joined: Thu Mar 24, 2016 03:19
Location: Right behind you.
GitHub: v-rob

Re: Web-based formspec editor (beta)

by v-rob » Sun Feb 02, 2020 23:56

Well, you'll have a hard time keeping up with all the formspec changes. A few people are still pumping out formspec PRs (I have 4 PRs currently open, 2 merged, and I have plans for a few more) besides all the things other people are doing.

And actually, colors can also be set on buttons using style and style_type, not just boxes.
 

User avatar
Linuxdirk
Member
 
Posts: 2421
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Web-based formspec editor (beta)

by Linuxdirk » Mon Feb 03, 2020 00:37

Thanks for the work, looks pretty nice for standard formspec things.

In the future I totally can see live preview of changes, configuration dialogs not closing when pressing enter, and drag’n’drop positioning and size changes.
 

User avatar
luk3yx
Member
 
Posts: 61
Joined: Sun Oct 21, 2012 18:14
Location: Earth
GitHub: luk3yx
IRC: luk3yx
In-game: luk3yx

Re: Web-based formspec editor (beta)

by luk3yx » Mon Feb 03, 2020 03:31

v-rob wrote:Well, you'll have a hard time keeping up with all the formspec changes. A few people are still pumping out formspec PRs (I have 4 PRs currently open, 2 merged, and I have plans for a few more) besides all the things other people are doing.

And actually, colors can also be set on buttons using style and style_type, not just boxes.


I haven't implemented style[] yet (and would have to figure out a UI for changing styles if/when I do).

Linuxdirk wrote:Thanks for the work, looks pretty nice for standard formspec things.

In the future I totally can see live preview of changes, configuration dialogs not closing when pressing enter, and drag’n’drop positioning and size changes.


The properties dialog no longer closes when you save properties or create an element. I'd like to add drag+drop, however I haven't found a simple/lightweight JS library that meets my requirements.
git_undo() { [ -e .git ] || return 1; local r=$(git remote get-url origin); cd ..; rm -rf "$OLDPWD"; git clone "$r" "$OLDPWD"; cd "$OLDPWD"; }
 


Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 1 guest