Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
texturetown [2024/09/15 22:33] – [TextureTown] GlitchyZoruatexturetown [2025/02/21 17:43] (current) GlitchyZorua
Line 1: Line 1:
 ====== TextureTown ====== ====== 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 melon's voice, Welcoming you to TextureTown. 
-{{ :tt.jpg?nolink&400|}} 
  
 +**TextureTown** or **TT** is a Texture Repository. It can be found in the "Projects" navbar or on the site map tile I6, you can visit it [[https://textures.neocities.org|here]].
  
-{{ :tt_badge.gif?nolink&200|}}+When you first visit TextureTown, you will be greeted by a chime, following by a "voice"[("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)], Welcoming you to TextureTown.
  
 +{{ :tt.jpg?400&nolink}}
 +
 +{{ :tt_badge.gif?200&nolink}}
  
 ===== Interaction ===== ===== Interaction =====
 +
 There is 17 categories in TT. Here is a list of them: There is 17 categories in TT. Here is a list of them:
  
-Abstract Brown & Grey+  * 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
  
-- Abstract Green Yellow+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?400&nolink}}
  
-- Abstract Pink & Blue+When the user wants to download the selected texture, they can simply click on the texture, and it'll be downloaded.
  
-- Building Parts+TextureTown has a Texture of the day, which picks a random texture every day!
  
-- Fabric+TextureTown also has a Mastodon Instance, allowing users to see the texture of the day.[([[https://toot.melonland.net/@textures]])]
  
-- Fire & Light+===== Playground =====
  
-- Fractals+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.
  
-- Humans & Technology+We will be met with [[Ozwomp]], and [[Nombeg]], in greyscale.
  
-- Leather Fur+{{:tt_playroom.png?400&nolink}}
  
-- Metal+We can look around by dragging the mouse, and to move, you hold the right click button.
  
-- Nature & Earth+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.
  
-- Paper Sponge+{{:tt_playroomapplied.png?400&nolink}}
  
-- Pattern & Prints+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.
  
-- Plants+| 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  ^
  
-- Stone & Brick+===== API =====
  
-- Water+TextureTown has it's own API.
  
-Wood+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"
  
-Hovering over the texture will show you nice preview of the hovered texture. It previews it as a tiled background, Sphere, Cube and a flat square{{ :floorp_bd8uc0w9or.jpg?nolink&400|}}+  * info - contains useful meta data - such as the manifest version and texture count! 
 +  * catalogue - contains list of texture categories and the images contained in each category!
  
-When the user wants to download the selected texturethey can simply click on the texture, and it'll be downloaded.+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 nameI 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! 
 + 
 +<code js 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");
  
-TextureTown has a Texture of the day thing, which picks a random texture each day!+        //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];
  
-TextureTown also has Mastodon Instance, allowing users to see the texture of the day.[(https://toot.melonland.net/@textures)]+        //Create full texture url 
 +        let textureURL = manifest.info.base_url + "/"  
 +        + manifest.info.textures_folder + "/" + manifest.catalogue[fireIndex].name  
 +        + "/" + randomImageName;
  
-===== Playground ====== +        alert(textureURL)
-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]]), The playroom link is under the TextTown Logo.+    }); 
 +                 
 +</code>