TextureTown

TextureTown or TT is a Texture Repository. It can be found in the “Projects” navbar or on the site map tile I6.

When you first visit TextureTown, you will be greeted by a chime, following by a “voice”1), Welcoming you to TextureTown.

tt.jpg

Interaction

There is 17 categories in TT. Here is a list of them:

- Abstract Brown & Grey

- Abstract Green & Yellow

- Abstract Pink & Blue

- Building Parts

- Fabric

- Fire & Light

- Fractals

- Humans & Technology

- Leather & Fur

- Metal

- Nature & Earth

- Paper & Sponge

- Pattern & Prints

- Plants

- Stone & Brick

- Water

- Wood

Hovering over the texture will show you a nice preview of the hovered texture. It previews it as a tiled background, Sphere, Cube and a flat square! floorp_bd8uc0w9or.jpg

When the user wants to download the selected texture, they can simply click on the texture, and it'll be downloaded.

TextureTown has a Texture of the day thing, which picks a random texture each day!

TextureTown also has a Mastodon Instance, allowing users to see the texture of the day.2)

Playground

The background on the main page of TextureTown is a 3D render of the TextureTown's “playroom”, which is actually a replica of the Snake Room, (which is Movie 1), Let's go try out the Playroom. The playroom link is under the TextTown Logo.

We will be met with Ozwomp, and Nombeg, in greyscale.

We can look around by dragging the mouse, and to move, you hold the right click button.

If we drag and dropped a file onto the playroom, we can see that the specific object gets applied with the picture we dropped on to.

Additionally, there are things in the playroom that will make the “Chat” on the bottom left say things. This table should list all of them.

Object Message Character?
Cushion That cushion is bigger than your house… could you carry it? No
Flat Box Looks like its a boxed copy of Ozwomps Voyage :O No
Latter Woah thats a big ladder! Its much too big for you to go up!! No
Ozwomp Ozwomp: Play my game HUMAN! Visit the Games Page : Yes
Nombeg Nombeg #7: Life is suffering… maybe this will help Visit the Games Page : Yes

API

TextureTown has it's own API.

All textures are listed in the manifest in JSON format: https://textures.neocities.org/manifest.json - The JSON file is split between “info” and “catalogue”

  • info - contains useful meta data - such as the manifest version and texture count!
  • catalogue - contains a list of texture categories and the images contained in each category!

To construct a texture link see the example script below!

You can also access thumbnails in the same fashion - select from the thumbnail folder - prefix the filename with “thumb_” and replace the filetype with .jpg (all thumbnails are jpg format!)

To find a specific file or category by name, I suggest using a map (e.g. in Javascript catalogue.map(x ⇒ x[name]);)

Finally you can access a pretty formatted section name using catalogue[INDEX OF THE CATEGORY YOU WANT].niceName - e.g. “Fire & Light”

Here is a simple random fire texture script to use on your site!

sample.js
//Download the Manifest File
fetch("https://textures.neocities.org/manifest.json")
    .then((res) => res.json())
    .then((json) => {
        //Success! Your code goes here!
        let manifest = json;
 
        //Get the index of the fire category
        let fireIndex = manifest.catalogue
            .map(function (e) {
                return e.name;
            })
            .indexOf("fire-and-light");
 
        //Pick a random image from that category
        let fireCatagoryFileCount = manifest.catalogue[fireIndex].files.length;
        let randomImageName = manifest.catalogue[fireIndex].files[
            Math.floor(Math.random() * fireCatagoryFileCount) + 1];
 
        //Create a full texture url
        let textureURL = manifest.info.base_url + "/" 
        + manifest.info.textures_folder + "/" + manifest.catalogue[fireIndex].name 
        + "/" + randomImageName;
 
        alert(textureURL);
    });
 

1) “The voice on TT is not me; it was recorded from a 1970s voice synth, and then it was autotuned to make it sound more musical ^^” - Melon