Add documentation and change default to off.

master
David G 2018-11-10 16:24:00 -07:00
parent ded1b68605
commit efc09bca3b
7 changed files with 42 additions and 3 deletions

35
README.md Normal file
View File

@ -0,0 +1,35 @@
Vignette
--------
A Minetest mod to place a vignette filter on the screen.
![Vignette Screenshot](screenshot.png "Vignette")
By David G (kestral246), based on the concept by TriBlade9.
How to enable
-------------
This mod defaults to not applying filter. To enable, use the chat command:
> "/vignette"
Repeated use of this command will toggle the effect off and on.
Licenses
--------
Source code
> The MIT License (MIT)
Media (textures)
>Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

View File

@ -2,7 +2,9 @@
-- Adds a vignette filter to player's screen
-- Based on concept by TriBlade9
-- By David_G (kestral246@gmail.com)
-- Includes chat command "/vignette", which toggles effect off or on
-- Don't enable vignette effect at start.
-- Use chat command "/vignette" to enable, and then to toggle effect off or on.
local vignette = {}
@ -11,13 +13,13 @@ minetest.register_on_joinplayer(function(player)
vignette[pname] = {
id = player:hud_add({
hud_elem_type = "image",
text = "vignette.png",
text = "blank.png",
position = {x=0, y=0},
scale = {x=-100, y=-100},
alignment = {x=1, y=1},
offset = {x=0, y=0}
}),
enable = true }
enable = false }
end)
minetest.register_chatcommand("vignette", {

2
mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = vignette
description = Add vignette filter over screen.

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 42 KiB