From a1440f508da55dc5d73b2c90d91bea7ea0dc3d0d Mon Sep 17 00:00:00 2001 From: Muhammad Rifqi Priyo Susanto Date: Sat, 6 Mar 2021 08:00:00 +0700 Subject: [PATCH] Apply recommendations from Lighthouse --- experiment/addition_game.html | 4 +-- experiment/dip_contrast_enhancement.html | 4 +-- experiment/dip_edge_detection.html | 4 +-- experiment/dip_grey_transform.html | 4 +-- experiment/dip_smoothing.html | 4 +-- experiment/drive_a_car.html | 4 +-- experiment/genetic_algorithm.html | 8 ++--- experiment/index.html | 2 +- experiment/localoutlierfactor.html | 4 +-- experiment/negative_lens.html | 4 +-- experiment/positive_lens.html | 4 +-- experiment/vibration_test.html | 6 ++-- experiment/waterdrop.html | 4 +-- index.html | 6 ++-- library.html | 6 ++-- main.css | 1 + minetest.html | 40 ++++++++++++------------ 17 files changed, 55 insertions(+), 54 deletions(-) diff --git a/experiment/addition_game.html b/experiment/addition_game.html index 092353c..cd6d227 100644 --- a/experiment/addition_game.html +++ b/experiment/addition_game.html @@ -1,5 +1,5 @@ - + Addition Game - Experiments - srifqi @@ -47,7 +47,7 @@

This was created because I want to implement a game that was played so much, either at school or when playing with friends in my neighbourhood.

Play until you don't have numbers in your hand

open in new window

- + diff --git a/experiment/dip_contrast_enhancement.html b/experiment/dip_contrast_enhancement.html index 2c7d587..ff4759f 100644 --- a/experiment/dip_contrast_enhancement.html +++ b/experiment/dip_contrast_enhancement.html @@ -1,5 +1,5 @@ - + Contrast Enhancement - Experiments - srifqi @@ -48,7 +48,7 @@

There are two techniques described here: contrast stretching and histogram equalization. Each techniques has its own usage.

Histogram equalization makes objects easier to distinguish, but can make the image looks "unreal".

open in new window

- + diff --git a/experiment/dip_edge_detection.html b/experiment/dip_edge_detection.html index 0f6aa3d..c728890 100644 --- a/experiment/dip_edge_detection.html +++ b/experiment/dip_edge_detection.html @@ -1,5 +1,5 @@ - + Point and Edge Detection - Experiments - srifqi @@ -48,7 +48,7 @@

There are one point detector and three edge detector: Sobel operator, Prewitt operator, and Robert cross.

It seems like Sobel operator is the brightest. This is a reason to use thresholding after edge detection.

open in new window

- + diff --git a/experiment/dip_grey_transform.html b/experiment/dip_grey_transform.html index b1b690a..c8a0b63 100644 --- a/experiment/dip_grey_transform.html +++ b/experiment/dip_grey_transform.html @@ -1,5 +1,5 @@ - + Greyscale Transformation - Experiments - srifqi @@ -48,7 +48,7 @@

There are three transformation: image negative (invert color), logarithmic transformation, and power-law (gamma) transformation.

Power-law transformation can be used for contrast streching.

open in new window

- + diff --git a/experiment/dip_smoothing.html b/experiment/dip_smoothing.html index b4b81f0..8f984d8 100644 --- a/experiment/dip_smoothing.html +++ b/experiment/dip_smoothing.html @@ -1,5 +1,5 @@ - + Image Smoothing - Experiments - srifqi @@ -48,7 +48,7 @@

There are three smoothing techniques: mean blur (box blur), Gaussian blur, and median filter.

For salt-and-paper noises, median filter works very well!

open in new window

- + diff --git a/experiment/drive_a_car.html b/experiment/drive_a_car.html index bb5a629..58f2d0e 100644 --- a/experiment/drive_a_car.html +++ b/experiment/drive_a_car.html @@ -1,5 +1,5 @@ - + Drive A Car - Experiments - srifqi @@ -53,7 +53,7 @@ var f=50/3,g=t=y=0,j=k=1,m=[0,0,0,0,0],h=500,w=800,p=w/8,o=w/4,r=h/5,e=250;for(n

Drive a car and avoid obstacles!

open in new window

- + diff --git a/experiment/genetic_algorithm.html b/experiment/genetic_algorithm.html index ce393d9..a273ac2 100644 --- a/experiment/genetic_algorithm.html +++ b/experiment/genetic_algorithm.html @@ -1,5 +1,5 @@ - + Genetic Algorithm - Experiments - srifqi @@ -44,12 +44,12 @@ -

This was created because I want to create a basic implementation of genetic algorithm. I have seen things like this before, but I forget about the original web page.

+

This was created because I want to create a basic implementation of genetic algorithm. I have seen things like this before, but I forget about the original web page.

There are 25 individuals in each generation. Each new generation is created from top 5 individuals. No individual lives past its generation.

-

You can control and edit initial configuration by clicking "Edit environment" button or you can read its source code and try to modify it yourself!

+

You can control and edit initial configuration by clicking "Edit environment" button or you can read its source code and try to modify it yourself!

What if you use other target words?

open in new window

- + diff --git a/experiment/index.html b/experiment/index.html index 5c57998..9ccfe2e 100644 --- a/experiment/index.html +++ b/experiment/index.html @@ -1,5 +1,5 @@ - + Experiments - srifqi diff --git a/experiment/localoutlierfactor.html b/experiment/localoutlierfactor.html index af37f16..5aaad89 100644 --- a/experiment/localoutlierfactor.html +++ b/experiment/localoutlierfactor.html @@ -1,5 +1,5 @@ - + Local Outlier Factor - Experiments - srifqi @@ -48,7 +48,7 @@

Local outlier factor is used in anomaly detection.

Have you tried a data set without any outliers?

open in new window

- + diff --git a/experiment/negative_lens.html b/experiment/negative_lens.html index f67900a..2a3deb3 100644 --- a/experiment/negative_lens.html +++ b/experiment/negative_lens.html @@ -1,5 +1,5 @@ - + Negative Lens - Experiments - srifqi @@ -54,7 +54,7 @@ function G(a,b){for(a=a||1,b=b||1,0>a&&(a=-a),0>b&&(b=-b),b>a&&(a=[b,b=a][0]);;)

Simulation of a ray of light goes through negative lens

open in new window

- + diff --git a/experiment/positive_lens.html b/experiment/positive_lens.html index 61116b8..4efe07b 100644 --- a/experiment/positive_lens.html +++ b/experiment/positive_lens.html @@ -1,5 +1,5 @@ - + Positive Lens - Experiments - srifqi @@ -54,7 +54,7 @@ function G(a,b){for(a=a||1,b=b||1,0>a&&(a=-a),0>b&&(b=-b),b>a&&(a=[b,b=a][0]);;)

Simulation of a ray of light goes through positive lens

open in new window

- + diff --git a/experiment/vibration_test.html b/experiment/vibration_test.html index a96dfcf..3cfc0c1 100644 --- a/experiment/vibration_test.html +++ b/experiment/vibration_test.html @@ -1,5 +1,5 @@ - + Web Vibration API - Experiments - srifqi @@ -45,11 +45,11 @@

I was browsing on the Web when suddenly an advertisement showed up and vibrate my phone. I was confused for a second because it said that there is a virus inside my phone. Knowing that it is an advertisement, I ignored that. But, I did not know that you can vibrate your device from Web!

-

This was created to demonstrate Web Vibration API. It consists of a function, navigator.vibrate(), to do vibration for some amount of time.

+

This was created to demonstrate Web Vibration API. It consists of a function, navigator.vibrate(), to do vibration for some amount of time.

Since the API only allows to vibrate for a finite amount of time, a timer is scheduled to re-vibrate the device (using setTimeout() function). To prevent gap between vibration, the length of each vibration is doubled. It is fine because the vibrate() function will reset the duration.

Try different vibration cycle

open in new window

- + diff --git a/experiment/waterdrop.html b/experiment/waterdrop.html index e757102..0ce4e82 100644 --- a/experiment/waterdrop.html +++ b/experiment/waterdrop.html @@ -1,5 +1,5 @@ - + Waterdrop - Experiments - srifqi @@ -56,7 +56,7 @@ var e=[10,110,210,310],w=h=400,W=H=200,f=0,g=100,h=50/3,i=1000;c.width=c.height=

Watch every drop of water drops

open in new window

- + diff --git a/index.html b/index.html index 385a669..27d168f 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + srifqi @@ -21,8 +21,8 @@

Hi! I'm srifqi.

-

I'm a computer science student at Sebelas Maret University. I like to do coding and creating mini projects. Sometimes, I document or review my progress in my blog. You can explore them using links on the left bar.

-

I also like to play Minetest, a voxel game engine (and also the game). It is my longest game that I still play (and contribute!) until now. I make mods and published some of them to Minetest Content Database.

+

I'm a computer science student at Sebelas Maret University. I like to do coding and creating mini projects. Sometimes, I document or review my progress in my blog. You can explore them using links on the left bar.

+

I also like to play Minetest, a voxel game engine (and also the game). It is my longest game that I still play (and contribute!) until now. I make mods and published some of them to Minetest Content Database.

While exploring my projects, unless stated, my code is licensed under MIT License.

diff --git a/library.html b/library.html index 81d037d..435f2b5 100644 --- a/library.html +++ b/library.html @@ -1,5 +1,5 @@ - + Libraries - srifqi @@ -17,7 +17,7 @@
  • Experiments
  • Minetest
  • Libraries
  • @@ -25,7 +25,7 @@

    I created some (small, maybe unusable) libraries. These were created to teach me about creating API and GitHub Pages. Here are some of them.

    diff --git a/main.css b/main.css index 5dae4f1..c37ebb4 100644 --- a/main.css +++ b/main.css @@ -146,6 +146,7 @@ figure { } figure img { + height: auto; max-width: 100%; width: 250px; } diff --git a/minetest.html b/minetest.html index f817365..9678312 100644 --- a/minetest.html +++ b/minetest.html @@ -1,5 +1,5 @@ - + Minetest - srifqi @@ -17,7 +17,7 @@ article>aside { } .mod-no { - color: red; + color: #b30000; } .cdb { @@ -37,8 +37,8 @@ article>aside {
    -

    I like to play Minetest, a voxel game engine (and also the game). It is my longest game that I still play (and contribute!) until now. I make mods and published some of them to Minetest Content Database.

    -

    Minetest came to me when I was searching for voxel sandboxing game (that is free!) many years ago. Since then, I either play it, create mods for it, or contribute to it. Here are some of my mods:

    +

    I like to play Minetest, a voxel game engine (and also the game). It is my longest game that I still play (and contribute!) until now. I make mods and published some of them to Minetest Content Database.

    +

    Minetest came to me when I was searching for voxel sandboxing game (that is free!) many years ago. Since then, I either play it, create mods for it, or contribute to it. Here are some of my mods:

    Superflat Map Generator

    This mod generates world layer by layer. This mod was created because I read that Minecraft has superflat mode in its world generation. This works the same, albeit uses different format, as superflat in Minecraft.

    -

    The actual description is "(Yet Another) Superflat Map Generator" because there is another map generator that generates flat world, e.g. built-in flat mapgen and flatgen mod.

    +

    The actual description is "(Yet Another) Superflat Map Generator" because there is another map generator that generates flat world, e.g. built-in flat mapgen and flatgen mod.

    - Flat world from superflat mod + Flat world from superflat mod
    Flat world from superflat mod
    @@ -73,19 +73,19 @@ article>aside { Latest version0.7
    First release ActiveYes - Forum topiclink + Forum topiclink ContentDBNot Registered -

    This mod generates world with more biomes and features than what Minetest had back then. It also supports other mods: moreores and bakedclay. This mod was my attempt to create map generator that uses noise (2D and 3D) and supports another mod.

    -

    This mod can be modified by another mod. I also create an example for that in another mod: amgmt_plugin. Now, Minetest supports custom biomes from its modding API that makes this mod irrelevant.

    +

    This mod generates world with more biomes and features than what Minetest had back then. It also supports other mods: moreores and bakedclay. This mod was my attempt to create map generator that uses noise (2D and 3D) and supports another mod.

    +

    This mod can be modified by another mod. I also create an example for that in another mod: amgmt_plugin. Now, Minetest supports custom biomes from its modding API that makes this mod irrelevant.

    - An intersection of many biomes from amgmt mod + An intersection of many biomes from amgmt mod
    An intersection of many biomes
    - A river bordering two biomes from amgmt mod + A river bordering two biomes from amgmt mod
    A river bordering two biomes
    @@ -97,11 +97,11 @@ article>aside { advancedban - + Advanced Ban on Content DB Latest version0.3
    First release ActiveYes - Forum topiclink + Forum topiclink @@ -120,13 +120,13 @@ article>aside { Latest version0.1
    First release ActiveYes - Forum topiclink + Forum topiclink ContentDBNot Registered

    This mod bans player when they are dead, i.e. Minecraft's hardcore mode.

    -

    This is a continuation from advancedban mod. I actually forgot which idea comes first: this or ban player's name. If I recall correctly, this idea comes first and then I realised that Minetest bans only IP address.

    +

    This is a continuation from advancedban mod. I actually forgot which idea comes first: this or ban player's name. If I recall correctly, this idea comes first and then I realised that Minetest bans only IP address.

    I have not checked this mod for so long. Maybe, I should back into improving this mod. There are requests to set a timer to reset the list and/or add API for other mods.

    @@ -140,14 +140,14 @@ article>aside { Latest version0.1.2
    First release ActiveYes - Forum topiclink + Forum topiclink ContentDBNot Registered

    This mod limits messages by distance so that only players within certain distance are able to hear. Player can "pay" to "shout" (send message without distance limitation), though.

    This mod was created because I like the idea that you can not hear distant speech.

    -

    This idea already implemented before in chatplus mod. But, shout mod only implements this very idea. Also, it has payment for "shouting".

    +

    This idea already implemented before in chatplus mod. But, shout mod only implements this very idea. Also, it has payment for "shouting".

    Carpet

    @@ -160,7 +160,7 @@ article>aside { Latest version0.3
    First release ActiveNo - Forum topiclink + Forum topiclink ContentDBNot Registered