Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| texturetown [2024/09/15 22:32] – created GlitchyZorua | texturetown [2025/08/28 15:33] (current) – [TextureTown] moved page link ribose | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== TextureTown ====== | ====== TextureTown ====== | ||
| - | **TextureTown** or **TT** is a Texture Repository. It can be found in the " | + | |
| - | When you first visit TextureTown, | + | **[[https:// |
| - | {{ :tt_badge.gif?nolink&200|}} {{ :tt.jpg?nolink&400|}} | + | |
| + | When you first visit TextureTown, | ||
| + | |||
| + | It was created on March 16, Wednesday 2022, 05:33:26 pm @106.55 | ||
| + | |||
| + | {{ :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! {{ : |
| - | - 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:// |
| - | - Fire & Light | + | ===== Playground ===== |
| - | - Fractals | + | The background on the main page of TextureTown is a 3D render of the TextureTown' |
| - | - Humans & Technology | + | We will be met with [[Ozwomp]], and [[Nombeg]], in greyscale. |
| - | - Leather | + | {{: |
| - | - 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 | + | {{: |
| - | - Pattern & Prints | + | Additionally, |
| - | - 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:// |
| - | Hovering over the texture | + | * info - contains useful meta data - such as the manifest version and texture |
| + | * catalogue - contains | ||
| - | When the user wants to download | + | 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 **" | ||
| + | |||
| + | 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. **" | ||
| + | |||
| + | Here is a simple random fire texture script to use on your site! | ||
| + | |||
| + | <code js sample.js> | ||
| + | // | ||
| + | fetch(" | ||
| + | .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(" | ||
| - | TextureTown has a Texture of the day thing, which picks a random | + | // |
| + | let fireCatagoryFileCount = manifest.catalogue[fireIndex].files.length; | ||
| + | let randomImageName = manifest.catalogue[fireIndex].files[ | ||
| + | Math.floor(Math.random() * fireCatagoryFileCount) + 1]; | ||
| - | TextureTown also has a Mastodon Instance, allowing users to see the texture | + | // |
| + | let textureURL = manifest.info.base_url + "/" | ||
| + | + manifest.info.textures_folder + "/" + manifest.catalogue[fireIndex].name | ||
| + | + "/" | ||
| - | ===== Playground ====== | + | alert(textureURL); |
| - | The background on the main page of TextureTown is a 3D render of the TextureTown' | + | }); |
| + | |||
| + | </ | ||
