From 42cf5523aa70277da7225df18a89245a6fdc7338 Mon Sep 17 00:00:00 2001 From: lukebemish Date: Thu, 29 Aug 2024 04:40:54 +0000 Subject: [PATCH] deploy: eb84d74e02ee68a6e511cd0eab74732b125457a7 --- 404.html | 4 ++-- assets/js/{6c6f794d.dcaa2605.js => 6c6f794d.1a16e1f1.js} | 2 +- .../{runtime~main.ebef8b4b.js => runtime~main.d0639924.js} | 2 +- index.html | 4 ++-- java/category/index.html | 4 ++-- java/concepts/index.html | 6 +++--- java/textures/index.html | 4 ++-- json/category/index.html | 4 ++-- json/dummy/index.html | 4 ++-- json/metadata/index.html | 4 ++-- json/texsources/category/index.html | 4 ++-- json/texsources/channel_route/index.html | 4 ++-- json/texsources/color/index.html | 4 ++-- json/texsources/crop/index.html | 4 ++-- json/texsources/error/index.html | 4 ++-- json/texsources/fallback/index.html | 4 ++-- json/texsources/file/index.html | 4 ++-- json/texsources/foreground_transfer/index.html | 4 ++-- json/texsources/masks/add/index.html | 4 ++-- json/texsources/masks/category/index.html | 4 ++-- json/texsources/masks/channel/index.html | 4 ++-- json/texsources/masks/cutoff/index.html | 4 ++-- json/texsources/masks/edge/index.html | 4 ++-- json/texsources/masks/grow/index.html | 4 ++-- json/texsources/masks/invert/index.html | 4 ++-- json/texsources/masks/multiply/index.html | 4 ++-- json/texsources/overlay/index.html | 4 ++-- json/texsources/palette_combined/index.html | 4 ++-- json/texsources/palette_spread/index.html | 4 ++-- json/texsources/shadowed/index.html | 4 ++-- json/texsources/splitter/index.html | 4 ++-- json/texsources/spread/index.html | 4 ++-- json/texsources/transform/index.html | 4 ++-- 33 files changed, 65 insertions(+), 65 deletions(-) rename assets/js/{6c6f794d.dcaa2605.js => 6c6f794d.1a16e1f1.js} (55%) rename assets/js/{runtime~main.ebef8b4b.js => runtime~main.d0639924.js} (98%) diff --git a/404.html b/404.html index 607154b..4b41938 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | Dynamic Asset Generator Docs - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/6c6f794d.dcaa2605.js b/assets/js/6c6f794d.1a16e1f1.js similarity index 55% rename from assets/js/6c6f794d.dcaa2605.js rename to assets/js/6c6f794d.1a16e1f1.js index 2afabfd..dfaa5b6 100644 --- a/assets/js/6c6f794d.dcaa2605.js +++ b/assets/js/6c6f794d.1a16e1f1.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdynamic_asset_generator_wiki=self.webpackChunkdynamic_asset_generator_wiki||[]).push([[428],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(n),h=a,m=p["".concat(c,".").concat(h)]||p[h]||d[h]||o;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=n(7462),a=(n(7294),n(3905));const o={sidebar_position:1},i="General Concepts",s={unversionedId:"java/concepts",id:"java/concepts",title:"General Concepts",description:"Resources and data are provided through a ResourceCache; DynAssetGen has built in implementations of ResourceCache for",source:"@site/docs/java/concepts.mdx",sourceDirName:"java",slug:"/java/concepts",permalink:"/DynamicAssetGenerator/java/concepts",draft:!1,editUrl:"https://github.com/lukebemishprojects/DynamicAssetGenerator/tree/docs/docs/java/concepts.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Java API",permalink:"/DynamicAssetGenerator/java/category"},next:{title:"Texture Generation",permalink:"/DynamicAssetGenerator/java/textures"}},c={},l=[],u={toc:l},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"general-concepts"},"General Concepts"),(0,a.kt)("p",null,"Resources and data are provided through a ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache"),"; DynAssetGen has built in implementations of ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache")," for\ngenerating assets and data. Resource caches have an identifier associated with them, and can be registered with ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache.register"),". For instance, to register a data cache:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'public static final DataResourceCache DATA_CACHE =\n ResourceCache.register(new DataResourceCache(new ResourceLocation("my_mod", "data")));\n')),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"AssetResourceCache")," is a similar built-in implementation for client resources."),(0,a.kt)("p",null,"Resource generation is structured around several core concepts:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"ResourceGenerationContext"),", an object which holds information about the current resource generation environment, including\na ",(0,a.kt)("inlineCode",{parentName:"li"},"ResourceSource")," which can be used to access existing resources."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"InputStreamSource"),", an object which can take a target file resource location and a generation context, and supplies an\n",(0,a.kt)("inlineCode",{parentName:"li"},"IoSupplier")," which can be used to read the resource data, or ",(0,a.kt)("inlineCode",{parentName:"li"},"null")," if no resource should be supplied."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"PathAwareInputStreamSource"),", a ",(0,a.kt)("inlineCode",{parentName:"li"},"InputStreamSource")," which is aware of which locations it can provide data for."),(0,a.kt)("li",{parentName:"ul"},"Reset listeners, callbacks which are invoked when a resource cache is reset. These should be used to invalidate any sort of\ncaching.")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"InputStreamSource")," also has a default method, ",(0,a.kt)("inlineCode",{parentName:"p"},"createCacheKey"),', which can be overridden to provide a "key" for the generated\nresource. Between resource pack reloads or game restarts, if this key has not changed for a resource at a given location, then\nthe existing, cached location will be used. Thus, this key should include all information needed to specify the resource; for\ntexture sources, for instance, the implementation of this key contains both the serialized texture source generator, as well\nas hashed versions of any images that the texture source reads.'),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache"),' contains a number of methods for adding input stream sources; these methods all\ninternally delegate to the "lazy" method which accepts a ',(0,a.kt)("inlineCode",{parentName:"p"},"Supplier")," and does not\nevaluate it until resources are requested from the cache. This means that a ",(0,a.kt)("inlineCode",{parentName:"p"},"PathAwareInputStreamSource")," can safely access\nexisting resources or data both when generating resources and when determining which resources it can provide."),(0,a.kt)("p",null,"Resources and data from other sources (the base game, resource packs, other mods, etc.) can be accessed through the provided\n",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceGenerationContext"),"; by default, this will not contain resources from other packs added by DynAssetGen. To access\nthese, provide their names in ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache#getDependencies"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkdynamic_asset_generator_wiki=self.webpackChunkdynamic_asset_generator_wiki||[]).push([[428],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(n),h=a,m=p["".concat(c,".").concat(h)]||p[h]||d[h]||o;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=h;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var r=n(7462),a=(n(7294),n(3905));const o={sidebar_position:1},i="General Concepts",s={unversionedId:"java/concepts",id:"java/concepts",title:"General Concepts",description:"Resources and data are provided through a ResourceCache; DynAssetGen has built in implementations of ResourceCache for",source:"@site/docs/java/concepts.mdx",sourceDirName:"java",slug:"/java/concepts",permalink:"/DynamicAssetGenerator/java/concepts",draft:!1,editUrl:"https://github.com/lukebemishprojects/DynamicAssetGenerator/tree/docs/docs/java/concepts.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Java API",permalink:"/DynamicAssetGenerator/java/category"},next:{title:"Texture Generation",permalink:"/DynamicAssetGenerator/java/textures"}},c={},l=[],u={toc:l},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"general-concepts"},"General Concepts"),(0,a.kt)("p",null,"Resources and data are provided through a ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache"),"; DynAssetGen has built in implementations of ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache")," for\ngenerating assets and data. Resource caches have an identifier associated with them, and can be registered with ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache.register"),". For instance, to register a data cache:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-java"},'public static final DataResourceCache DATA_CACHE =\n ResourceCache.register(new DataResourceCache(ResourceLocation.fromNamespaceAndPath("my_mod", "data")));\n')),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"AssetResourceCache")," is a similar built-in implementation for client resources."),(0,a.kt)("p",null,"Resource generation is structured around several core concepts:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"ResourceGenerationContext"),", an object which holds information about the current resource generation environment, including\na ",(0,a.kt)("inlineCode",{parentName:"li"},"ResourceSource")," which can be used to access existing resources."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"InputStreamSource"),", an object which can take a target file resource location and a generation context, and supplies an\n",(0,a.kt)("inlineCode",{parentName:"li"},"IoSupplier")," which can be used to read the resource data, or ",(0,a.kt)("inlineCode",{parentName:"li"},"null")," if no resource should be supplied."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"PathAwareInputStreamSource"),", a ",(0,a.kt)("inlineCode",{parentName:"li"},"InputStreamSource")," which is aware of which locations it can provide data for."),(0,a.kt)("li",{parentName:"ul"},"Reset listeners, callbacks which are invoked when a resource cache is reset. These should be used to invalidate any sort of\ncaching.")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"InputStreamSource")," also has a default method, ",(0,a.kt)("inlineCode",{parentName:"p"},"createCacheKey"),', which can be overridden to provide a "key" for the generated\nresource. Between resource pack reloads or game restarts, if this key has not changed for a resource at a given location, then\nthe existing, cached location will be used. Thus, this key should include all information needed to specify the resource; for\ntexture sources, for instance, the implementation of this key contains both the serialized texture source generator, as well\nas hashed versions of any images that the texture source reads.'),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache"),' contains a number of methods for adding input stream sources; these methods all\ninternally delegate to the "lazy" method which accepts a ',(0,a.kt)("inlineCode",{parentName:"p"},"Supplier")," and does not\nevaluate it until resources are requested from the cache. This means that a ",(0,a.kt)("inlineCode",{parentName:"p"},"PathAwareInputStreamSource")," can safely access\nexisting resources or data both when generating resources and when determining which resources it can provide."),(0,a.kt)("p",null,"Resources and data from other sources (the base game, resource packs, other mods, etc.) can be accessed through the provided\n",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceGenerationContext"),"; by default, this will not contain resources from other packs added by DynAssetGen. To access\nthese, provide their names in ",(0,a.kt)("inlineCode",{parentName:"p"},"ResourceCache#getDependencies"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.ebef8b4b.js b/assets/js/runtime~main.d0639924.js similarity index 98% rename from assets/js/runtime~main.ebef8b4b.js rename to assets/js/runtime~main.d0639924.js index 414057d..03657ef 100644 --- a/assets/js/runtime~main.ebef8b4b.js +++ b/assets/js/runtime~main.d0639924.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,a,r,c,f={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return f[e].call(a.exports,a,a.exports,n),a.exports}n.m=f,e=[],n.O=(t,a,r,c)=>{if(!a){var f=1/0;for(i=0;i=c)&&Object.keys(n.O).every((e=>n.O[e](a[d])))?a.splice(d--,1):(o=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[a,r,c]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);n.r(c);var f={};t=t||[null,a({}),a([]),a(a)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=a(o))Object.getOwnPropertyNames(o).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,n.d(c,f),c},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,a)=>(n.f[a](e,t),t)),[])),n.u=e=>"assets/js/"+({19:"7d094fa9",30:"6e185b89",32:"ce6d5892",53:"935f2afb",126:"83446120",144:"47c3952a",164:"755ef41e",182:"fe4be162",192:"44dfc0c3",304:"7683b903",370:"b126e018",427:"4e452c79",428:"6c6f794d",498:"98b08ef1",499:"44b4d68b",505:"dac30a3e",514:"1be78505",633:"c85460f9",673:"62ab9057",691:"faa602fb",732:"9c8aacc1",789:"24497b23",795:"f07fbff9",808:"221ddcfa",857:"cd4d8728",892:"2bd45a65",894:"ed6d288c",896:"106dceeb",915:"c8018ea8",917:"cabf8116",918:"17896441",932:"b6df1eb6",988:"905a1912",994:"373ee919"}[e]||e)+"."+{19:"09c9378d",30:"e3d2cf11",32:"49f07c0a",53:"4d5e26af",126:"211bec06",144:"fb963fe6",164:"4e15890d",182:"f07ec6f2",192:"e682941a",304:"a42cec06",370:"574e42f4",427:"8be3c704",428:"dcaa2605",498:"5789588e",499:"491bd551",505:"ded0eecb",514:"997dd4ad",633:"47ecaac0",673:"a2c84ef3",691:"404329d2",732:"f1a027e1",789:"217034a8",795:"4d4a520d",808:"69271533",857:"0501e1fd",892:"c8c51b7a",894:"e8ab2e2e",896:"6e8d0d0a",915:"776f408f",917:"767d43d4",918:"552fb1e4",932:"b0142369",972:"3d9a9180",988:"83ebc0af",994:"19c426e1"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},c="dynamic-asset-generator-wiki:",n.l=(e,t,a,f)=>{if(r[e])r[e].push(t);else{var o,d;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i{o.onerror=o.onload=null,clearTimeout(l);var c=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),c&&c.forEach((e=>e(a))),t)return t(a)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),d&&document.head.appendChild(o)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/DynamicAssetGenerator/",n.gca=function(e){return e={17896441:"918",83446120:"126","7d094fa9":"19","6e185b89":"30",ce6d5892:"32","935f2afb":"53","47c3952a":"144","755ef41e":"164",fe4be162:"182","44dfc0c3":"192","7683b903":"304",b126e018:"370","4e452c79":"427","6c6f794d":"428","98b08ef1":"498","44b4d68b":"499",dac30a3e:"505","1be78505":"514",c85460f9:"633","62ab9057":"673",faa602fb:"691","9c8aacc1":"732","24497b23":"789",f07fbff9:"795","221ddcfa":"808",cd4d8728:"857","2bd45a65":"892",ed6d288c:"894","106dceeb":"896",c8018ea8:"915",cabf8116:"917",b6df1eb6:"932","905a1912":"988","373ee919":"994"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(t,a)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var c=new Promise(((a,c)=>r=e[t]=[a,c]));a.push(r[2]=c);var f=n.p+n.u(t),o=new Error;n.l(f,(a=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var c=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;o.message="Loading chunk "+t+" failed.\n("+c+": "+f+")",o.name="ChunkLoadError",o.type=c,o.request=f,r[1](o)}}),"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,a)=>{var r,c,f=a[0],o=a[1],d=a[2],b=0;if(f.some((t=>0!==e[t]))){for(r in o)n.o(o,r)&&(n.m[r]=o[r]);if(d)var i=d(n)}for(t&&t(a);b{"use strict";var e,t,a,r,c,f={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return f[e].call(a.exports,a,a.exports,n),a.exports}n.m=f,e=[],n.O=(t,a,r,c)=>{if(!a){var f=1/0;for(i=0;i=c)&&Object.keys(n.O).every((e=>n.O[e](a[d])))?a.splice(d--,1):(o=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[a,r,c]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);n.r(c);var f={};t=t||[null,a({}),a([]),a(a)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=a(o))Object.getOwnPropertyNames(o).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,n.d(c,f),c},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,a)=>(n.f[a](e,t),t)),[])),n.u=e=>"assets/js/"+({19:"7d094fa9",30:"6e185b89",32:"ce6d5892",53:"935f2afb",126:"83446120",144:"47c3952a",164:"755ef41e",182:"fe4be162",192:"44dfc0c3",304:"7683b903",370:"b126e018",427:"4e452c79",428:"6c6f794d",498:"98b08ef1",499:"44b4d68b",505:"dac30a3e",514:"1be78505",633:"c85460f9",673:"62ab9057",691:"faa602fb",732:"9c8aacc1",789:"24497b23",795:"f07fbff9",808:"221ddcfa",857:"cd4d8728",892:"2bd45a65",894:"ed6d288c",896:"106dceeb",915:"c8018ea8",917:"cabf8116",918:"17896441",932:"b6df1eb6",988:"905a1912",994:"373ee919"}[e]||e)+"."+{19:"09c9378d",30:"e3d2cf11",32:"49f07c0a",53:"4d5e26af",126:"211bec06",144:"fb963fe6",164:"4e15890d",182:"f07ec6f2",192:"e682941a",304:"a42cec06",370:"574e42f4",427:"8be3c704",428:"1a16e1f1",498:"5789588e",499:"491bd551",505:"ded0eecb",514:"997dd4ad",633:"47ecaac0",673:"a2c84ef3",691:"404329d2",732:"f1a027e1",789:"217034a8",795:"4d4a520d",808:"69271533",857:"0501e1fd",892:"c8c51b7a",894:"e8ab2e2e",896:"6e8d0d0a",915:"776f408f",917:"767d43d4",918:"552fb1e4",932:"b0142369",972:"3d9a9180",988:"83ebc0af",994:"19c426e1"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},c="dynamic-asset-generator-wiki:",n.l=(e,t,a,f)=>{if(r[e])r[e].push(t);else{var o,d;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i{o.onerror=o.onload=null,clearTimeout(l);var c=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),c&&c.forEach((e=>e(a))),t)return t(a)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),d&&document.head.appendChild(o)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/DynamicAssetGenerator/",n.gca=function(e){return e={17896441:"918",83446120:"126","7d094fa9":"19","6e185b89":"30",ce6d5892:"32","935f2afb":"53","47c3952a":"144","755ef41e":"164",fe4be162:"182","44dfc0c3":"192","7683b903":"304",b126e018:"370","4e452c79":"427","6c6f794d":"428","98b08ef1":"498","44b4d68b":"499",dac30a3e:"505","1be78505":"514",c85460f9:"633","62ab9057":"673",faa602fb:"691","9c8aacc1":"732","24497b23":"789",f07fbff9:"795","221ddcfa":"808",cd4d8728:"857","2bd45a65":"892",ed6d288c:"894","106dceeb":"896",c8018ea8:"915",cabf8116:"917",b6df1eb6:"932","905a1912":"988","373ee919":"994"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(t,a)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var c=new Promise(((a,c)=>r=e[t]=[a,c]));a.push(r[2]=c);var f=n.p+n.u(t),o=new Error;n.l(f,(a=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var c=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;o.message="Loading chunk "+t+" failed.\n("+c+": "+f+")",o.name="ChunkLoadError",o.type=c,o.request=f,r[1](o)}}),"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,a)=>{var r,c,f=a[0],o=a[1],d=a[2],b=0;if(f.some((t=>0!==e[t]))){for(r in o)n.o(o,r)&&(n.m[r]=o[r]);if(d)var i=d(n)}for(t&&t(a);b Dynamic Asset Generator | Dynamic Asset Generator Docs - +

Dynamic Asset Generator

Dynamic Asset Generator (or DynAssetGen) is a minecraft mod meant to help dynamically generate assets and data at runtime, as opposed to creating them manually or when the mod is compiled. Some possible uses include:

  • Assets that match a player's resource packs
  • Assets based off of vanilla assets, which should not be redistributed
  • Data or assets that depend on config values or other data only known at runtime
  • Data or assets which vary based on the other data and assets present

This mod has both a Java API and a system for controlling the mod through JSON.

caution

This documentation is for the newest version of the mod; if you are using an older version, some of the information here may not apply, or names may look slightly different.

- + \ No newline at end of file diff --git a/java/category/index.html b/java/category/index.html index f3f5704..a0b11c6 100644 --- a/java/category/index.html +++ b/java/category/index.html @@ -4,14 +4,14 @@ Java API | Dynamic Asset Generator Docs - +

Java API

note

While these docs will contain examples and explanations, the javadocs for DynAssetGen are also a good source for information on the java API; while they are not complete, I am continually working to expand how much of the API surface is well documented in this way. Additionally, javadocs are published for each major DynAssetGen version after 4. Javadocs are located at https://javadoc.lukebemish.dev/dev/lukebemish/dynamicassetgenerator/6/.

Getting Started

The first step to get started with the Java API is to add DynAssetGen to your development environment. All artifacts for DynAssetGen are available on maven central:

repositories {
mavenCentral()
}

For each version of DynAssetGen, three types of artifacts are published:

  • common jars, which are in official "Mojmaps" mappings and contain no loader-specific code
  • fabric jars which run on Quilt and Fabric
  • neoforge jars which run on NeoForge

The artifact coordinates take the format dev.lukebemish:dynamicassetgenerator:<version>, and loader-specific jars are requested by capability:

Adding artifact on NeoForge
dependencies {
implementation('dev.lukebemish:dynamicassetgenerator:<version>') {
capabilities {
requireCapability('dev.lukebemish:dynamicassetgenerator-neoforge')
}
}
}
Adding artifact on Quilt or Fabric
dependencies {
modImplementation('dev.lukebemish:dynamicassetgenerator:<version>') {
capabilities {
requireCapability('dev.lukebemish:dynamicassetgenerator-fabric')
}
}
}

Available Versions

Minecraft VersionLatest
1.21Latest 1.21 Version
1.20.6Latest 1.20.6 Version
1.20.4Latest 1.20.4 Version
1.20.2Latest 1.20.2 Version
1.20.1Latest 1.20.1 Version
1.19.4Latest 1.19.3 Version
1.19.3Latest 1.19.3 Version
note

For versions before 6.0.0 (for Minecraft versions before 1.20.5), the mod was not on maven central but at https://maven.lukebemish.dev/releases/:

repositories {
maven {
url "https://maven.lukebemish.dev/releases/"
}
}

Additionally, the artifact coordinates took the format dev.lukebemish.dynamicassetgenerator:dynamicassetgenerator-<type>-<minecraft version>:<version>

Adding artifact on NeoForge
dependencies {
implementation 'dev.lukebemish.dynamicassetgenerator:dynamicassetgenerator-neoforge-<minecraft version>:<version>'
}
Adding artifact on Quilt or Fabric
dependencies {
modImplementation 'dev.lukebemish.dynamicassetgenerator:dynamicassetgenerator-fabriquilt-<minecraft version>:<version>'
}
- + \ No newline at end of file diff --git a/java/concepts/index.html b/java/concepts/index.html index 3469851..1451ce8 100644 --- a/java/concepts/index.html +++ b/java/concepts/index.html @@ -4,13 +4,13 @@ General Concepts | Dynamic Asset Generator Docs - +

General Concepts

Resources and data are provided through a ResourceCache; DynAssetGen has built in implementations of ResourceCache for -generating assets and data. Resource caches have an identifier associated with them, and can be registered with ResourceCache.register. For instance, to register a data cache:

public static final DataResourceCache DATA_CACHE =
ResourceCache.register(new DataResourceCache(new ResourceLocation("my_mod", "data")));

AssetResourceCache is a similar built-in implementation for client resources.

Resource generation is structured around several core concepts:

  • ResourceGenerationContext, an object which holds information about the current resource generation environment, including +generating assets and data. Resource caches have an identifier associated with them, and can be registered with ResourceCache.register. For instance, to register a data cache:

    public static final DataResourceCache DATA_CACHE =
    ResourceCache.register(new DataResourceCache(ResourceLocation.fromNamespaceAndPath("my_mod", "data")));

    AssetResourceCache is a similar built-in implementation for client resources.

    Resource generation is structured around several core concepts:

    • ResourceGenerationContext, an object which holds information about the current resource generation environment, including a ResourceSource which can be used to access existing resources.
    • InputStreamSource, an object which can take a target file resource location and a generation context, and supplies an IoSupplier<InputStream> which can be used to read the resource data, or null if no resource should be supplied.
    • PathAwareInputStreamSource, a InputStreamSource which is aware of which locations it can provide data for.
    • Reset listeners, callbacks which are invoked when a resource cache is reset. These should be used to invalidate any sort of caching.

    InputStreamSource also has a default method, createCacheKey, which can be overridden to provide a "key" for the generated @@ -23,7 +23,7 @@ existing resources or data both when generating resources and when determining which resources it can provide.

    Resources and data from other sources (the base game, resource packs, other mods, etc.) can be accessed through the provided ResourceGenerationContext; by default, this will not contain resources from other packs added by DynAssetGen. To access these, provide their names in ResourceCache#getDependencies.

- + \ No newline at end of file diff --git a/java/textures/index.html b/java/textures/index.html index c8af10d..cd8e556 100644 --- a/java/textures/index.html +++ b/java/textures/index.html @@ -4,7 +4,7 @@ Texture Generation | Dynamic Asset Generator Docs - + @@ -19,7 +19,7 @@ TexSource.register, and is used when caching texture sources; a texture source's generated texture must be fully describable by the information encoded by its codec, unless the experimental caching API is implemented for that texture source.

- + \ No newline at end of file diff --git a/json/category/index.html b/json/category/index.html index 950a065..2f89858 100644 --- a/json/category/index.html +++ b/json/category/index.html @@ -4,7 +4,7 @@ JSON Generators | Dynamic Asset Generator Docs - + @@ -15,7 +15,7 @@ containing a texture source would replace the texture for end stone. This sprite source takes the same types of texture sources as Texture Generation. If the texture source accesses other textures, the sprite source will attempt to generate animation metadata from those textures.

- + \ No newline at end of file diff --git a/json/dummy/index.html b/json/dummy/index.html index ab56bbe..218a12d 100644 --- a/json/dummy/index.html +++ b/json/dummy/index.html @@ -4,13 +4,13 @@ Dummy Generator | Dynamic Asset Generator Docs - +

Dummy Generator

Generator ID: dynamic_asset_generator:dummy

Format:

{
"type" : "dynamic_asset_generator:dummy"
}

This generator does nothing; it is meant primarily as a tool to remove generators added by other mods or resource packs.

- + \ No newline at end of file diff --git a/json/metadata/index.html b/json/metadata/index.html index 7b5321b..c905784 100644 --- a/json/metadata/index.html +++ b/json/metadata/index.html @@ -4,13 +4,13 @@ Texture Metadata Generation | Dynamic Asset Generator Docs - +

Texture Metadata Generation

Generator ID: dynamic_asset_generator:texture_meta

Format:

{
"type" : "dynamic_asset_generator:texture_meta",
"sources" : [
"namespace:texture_path1",
"namespace:texture_path2"
]
"output_location" : "namespace:texture_path",
"animation" : {
"frametime" : 300,
"interpolate" : true,
"width" : 16,
"height" : 16,
},
"villager" : {
"hat" : "partial"
},
"texture" : {
"blur" : true,
"clamp" : false
}
}

This generator generates a .png.mcmeta file for a texture at output_location based on a series of other textures specified in sources.

animation, villager, and texture, along with all their arguments, are optional; if not provided, they will either be excluded if appropriate of inherited from the source textures if present.

The arguments of villager, animation, and texture allow the corresponding arguments in the .png.mcmeta to be overridden instead of inherited.

- + \ No newline at end of file diff --git a/json/texsources/category/index.html b/json/texsources/category/index.html index c694aa5..f4cfe65 100644 --- a/json/texsources/category/index.html +++ b/json/texsources/category/index.html @@ -4,13 +4,13 @@ Texture Generation | Dynamic Asset Generator Docs - +

Texture Generation

Generator ID: dynamic_asset_generator:texture

Format:

{
"type" : "dynamic_asset_generator:texture",
"output_location" : "namespace:texture_path",
"input" : { }
}

The output_location is the location the output texture should be placed at. For instance, to override the default gold ingot texture, this would be minecraft:items/gold_ingot.

The input takes a texture source. These objects can take different forms, but all share the type field, which contains the id of the type of texture source described within.

Example

A very simple working example of a texture configuration that replaces the gold ingot texture with the apple texture:

{
"type" : "dynamic_asset_generator:texture",
"output_location" : "minecraft:item/gold_ingot",
"input" : {
"type" : "dynamic_asset_generator:texture",
"path" : "minecraft:item/apple"
}
}
- + \ No newline at end of file diff --git a/json/texsources/channel_route/index.html b/json/texsources/channel_route/index.html index 06aad29..f6edfe9 100644 --- a/json/texsources/channel_route/index.html +++ b/json/texsources/channel_route/index.html @@ -4,7 +4,7 @@ Channel Route Source | Dynamic Asset Generator Docs - + @@ -14,7 +14,7 @@ specify a channel (red, green, blue, alpha, cielab_lightness, cielab_a, cielab_b, hsl_hue, hsl_lightness, hsl_saturation, hsv_hue, hsv_value, or hsv_saturation) to use for the given channel; if a channel is not provided, it is assumed to always be 0 (red, green, or blue) or 255 (alpha).

- + \ No newline at end of file diff --git a/json/texsources/color/index.html b/json/texsources/color/index.html index e2f1350..61bba7a 100644 --- a/json/texsources/color/index.html +++ b/json/texsources/color/index.html @@ -4,13 +4,13 @@ Color Source | Dynamic Asset Generator Docs - +

Color Source

Source Type ID: dynamic_asset_generator:color

Format:

{
"type": "dynamic_asset_generator:color",
"color": [
"0xAAAAFF",
"0xFFAAAA"
],
"encoding": "RGB" // optional, defaults to ARGB
}

Forms a square image containing all the colors listed in color, encoded as the provided encoding. The colors may be provided as integers (11184895) or as strings ("0xAAAAFF"). The output texture will be square, with the width being the smallest power of two that can fit all the colors. The encoding may be one of RGB, ARGB, ABGR, or BGR; if RGB or BGR, the alpha channel is assumed to be opaque.

- + \ No newline at end of file diff --git a/json/texsources/crop/index.html b/json/texsources/crop/index.html index 20257b3..11163e8 100644 --- a/json/texsources/crop/index.html +++ b/json/texsources/crop/index.html @@ -4,13 +4,13 @@ Crop Source | Dynamic Asset Generator Docs - +

Crop Source

Source Type ID: dynamic_asset_generator:crop

Format:

{
"type": "dynamic_asset_generator:crop",
"input": { },
"total_size": 16,
"start_x": 0,
"start_y": 0,
"size_x": 8,
"size_y": 8
}
  • input a texture source used as an input.
  • total_size is the expected width of the entire original image. This is used for scaling, and consistency across different resolution resource packs.
  • start_x and start_y are the starting x and y pixels for the output image, counting from the top left. These can be negative.
  • size_x and size_y are the dimensions of the output image in the x and y directions.

All the start and size parameters are relative to the total_size. In other words, if the total_size is the same as the width of the input image, then the output will be size_x by size_y, starting at start_x and start_y; if the image is twice the total_size, then the output will be 2*size_x by 2_size_y, starting at 2*start_x and 2*start_y; etc.

- + \ No newline at end of file diff --git a/json/texsources/error/index.html b/json/texsources/error/index.html index ba24334..5e063d8 100644 --- a/json/texsources/error/index.html +++ b/json/texsources/error/index.html @@ -4,13 +4,13 @@ Error Source | Dynamic Asset Generator Docs - +

Error Source

Source Type ID: dynamic_asset_generator:palette_spread

Format:

{
"type": "dynamic_asset_generator:error",
"message": "Error message"
}

This source never works, and logs the given error message to the console. It is useful for debugging, or for more detailed error messages for specific sources with the help of fallback sources.

- + \ No newline at end of file diff --git a/json/texsources/fallback/index.html b/json/texsources/fallback/index.html index db02b72..17061d4 100644 --- a/json/texsources/fallback/index.html +++ b/json/texsources/fallback/index.html @@ -4,13 +4,13 @@ Fallback Source | Dynamic Asset Generator Docs - +

Fallback Source

Source Type ID: dynamic_asset_generator:fallback

Format:

{
"type": "dynamic_asset_generator:fallback",
"original": { },
"fallback": { }
}
  • original is a texture source to attempt to create
  • fallback is an alternative texture source that will be created and provided if the first one is not present or somehow fails.
- + \ No newline at end of file diff --git a/json/texsources/file/index.html b/json/texsources/file/index.html index 0e52949..eb89767 100644 --- a/json/texsources/file/index.html +++ b/json/texsources/file/index.html @@ -4,13 +4,13 @@ Texture File Source | Dynamic Asset Generator Docs - +
- + \ No newline at end of file diff --git a/json/texsources/foreground_transfer/index.html b/json/texsources/foreground_transfer/index.html index c540602..286b158 100644 --- a/json/texsources/foreground_transfer/index.html +++ b/json/texsources/foreground_transfer/index.html @@ -4,13 +4,13 @@ Foreground Transfer Source | Dynamic Asset Generator Docs - +

Foreground Transfer Source

Source Type ID: dynamic_asset_generator:foreground_transfer

Format:

{
"type": "dynamic_asset_generator:foreground_transfer",
"background": { },
"full": { },
"new_background": { },
"trim_trailing": true, // optional, default true
"force_neighbors": true, // optional, default true
"fill_holes": true, // optional, default true
"extend_palette_size": 0, // optional, default 6
"close_cutoff": 2 // optional, default 2
}

background, full, and new_background are texture sources. The Foreground Transfer Source is similar to the Combined Paletted Image Source. First, an overlay image and image storing palette changes are extracted from the background and full. Then, this same set of palette changes and overlay is applied to the new_background image. Several other parameters can be configured:

  • extend_palette_size extends the extracted palette to this size by adding colors.
  • trim_trailing removes transparent overlay pixels or palette change pixels not connected to a solid overlay pixel. Defaults to false.
  • force_neighbors records the palette state for any pixel next to a solid overlay pixel, regardless of whether it changes between the two textures. Defaults to false.
  • fill_holes attempts to fill holes in the texture, possibly with some success. Defaults to false.
  • close_cutoff determines where the line is drawn between pixels not in the palette and pixels that are formed by a semi-transparent overlay on a palette color. Increasing this value makes it more lenient. Defaults to 2, which is usually a good value.
- + \ No newline at end of file diff --git a/json/texsources/masks/add/index.html b/json/texsources/masks/add/index.html index 3d9350f..c3ff69e 100644 --- a/json/texsources/masks/add/index.html +++ b/json/texsources/masks/add/index.html @@ -4,13 +4,13 @@ Add Mask Source | Dynamic Asset Generator Docs - + - + \ No newline at end of file diff --git a/json/texsources/masks/category/index.html b/json/texsources/masks/category/index.html index 8503686..4f15e9b 100644 --- a/json/texsources/masks/category/index.html +++ b/json/texsources/masks/category/index.html @@ -4,13 +4,13 @@ Mask Sources | Dynamic Asset Generator Docs - +

Mask Sources

Source Type ID: dynamic_asset_generator:mask

Format:

{
"type": "dynamic_asset_generator:mask",
"mask": { },
"input": { }
}
  • mask is a texture source used for the mask texture.
  • input is a texture source used for the input texture.

The output texture will be identical to the input, with its alpha multiplied by that of the mask texture. Textures are scaled to fit the wider texture if necessary.

Generating Masks

DynamicAssetGenerator has a number of texture sources meant for generating masks. These operations are all in the dynamic_asset_generator:mask/ folder. These sources all do a given operation in the alpha channel, and make no guarantees about the content of other channels.

- + \ No newline at end of file diff --git a/json/texsources/masks/channel/index.html b/json/texsources/masks/channel/index.html index d50f962..cc3e0bd 100644 --- a/json/texsources/masks/channel/index.html +++ b/json/texsources/masks/channel/index.html @@ -4,13 +4,13 @@ Channel Mask Source | Dynamic Asset Generator Docs - +

Channel Mask Source

Source Type ID: dynamic_asset_generator:mask/channel

Format:

{
"type": "dynamic_asset_generator:mask/channel",
"source": { },
"channel": "cielab_a"
}

Generates a mask whose alpha channel is the specified channel of the source texture. The channel may be one of red, green, blue, alpha, cielab_lightness, cielab_a, cielab_b, hsl_hue, hsl_lightness, hsl_saturation, hsv_hue, hsv_value, or hsv_saturation.

- + \ No newline at end of file diff --git a/json/texsources/masks/cutoff/index.html b/json/texsources/masks/cutoff/index.html index 0bac120..c3bb2bd 100644 --- a/json/texsources/masks/cutoff/index.html +++ b/json/texsources/masks/cutoff/index.html @@ -4,13 +4,13 @@ Cutoff Mask Source | Dynamic Asset Generator Docs - +

Cutoff Mask Source

Source Type ID: dynamic_asset_generator:mask/cutoff

Format:

{
"type": "dynamic_asset_generator:mask/cutoff",
"source": { },
"cutoff": 128, // optional, defaults to 128
"channel": "alpha" // optional, defaults to "alpha"
}

Generates a mask which is solid everywhere the provided channel of the provided source is greater than the cutoff, and transparent otherwise. The channel may be one of red, green, blue, alpha, cielab_lightness, cielab_a, cielab_b, hsl_hue, hsl_lightness, hsl_saturation, hsv_hue, hsv_value, or hsv_saturation. The cutoff must be an integer between 0 and 255, inclusive.

- + \ No newline at end of file diff --git a/json/texsources/masks/edge/index.html b/json/texsources/masks/edge/index.html index 7e83a6c..96851e2 100644 --- a/json/texsources/masks/edge/index.html +++ b/json/texsources/masks/edge/index.html @@ -4,13 +4,13 @@ Edge Mask Source | Dynamic Asset Generator Docs - +

Edge Mask Source

Source Type ID: dynamic_asset_generator:mask/edge

Format:

{
"type": "dynamic_asset_generator:mask/edge",
"source": { },
"count_outside_frame": false, // optional, defaults to false
"edges": [
"north",
"northeast",
"east",
"southeast",
"south",
"southwest",
"west",
"northwest"
], // optional, defaults to all directions
"cutoff": 128, // optional, defaults to 128
}

Generates a mask which is solid everywhere the provided source has an edge, and transparent otherwise. The edges may be any subset of north, northeast, east, southeast, south, southwest, west, and northwest. The cutoff must be an integer between 0 and 255, inclusive. A pixel is considered to be an edge if it's alpha is greater than or equal to the cutoff and at least one of its neighbors, in the provided edges, is less than the cutoff. If count_outside_frame is true, then pixels outside the frame are considered to always be less than the cutoff.

- + \ No newline at end of file diff --git a/json/texsources/masks/grow/index.html b/json/texsources/masks/grow/index.html index aa60524..3392531 100644 --- a/json/texsources/masks/grow/index.html +++ b/json/texsources/masks/grow/index.html @@ -4,13 +4,13 @@ Grow Mask Source | Dynamic Asset Generator Docs - +

Grow Mask Source

Source Type ID: dynamic_asset_generator:mask/grow

Format:

{
"type": "dynamic_asset_generator:mask/grow",
"source": { },
"growth": 0.0625, // optional, defaults to 0.0625
"cutoff": 128 // optional, defaults to 128
}

Grows a mask with the provided growth factor, out of the total image width, as the size of a filter, while binning pixel values as either fully opaque or transparent based on whether they are more than or less than the provided cutoff.

- + \ No newline at end of file diff --git a/json/texsources/masks/invert/index.html b/json/texsources/masks/invert/index.html index e5aa9ef..b7822f9 100644 --- a/json/texsources/masks/invert/index.html +++ b/json/texsources/masks/invert/index.html @@ -4,13 +4,13 @@ Invert Mask Source | Dynamic Asset Generator Docs - + - + \ No newline at end of file diff --git a/json/texsources/masks/multiply/index.html b/json/texsources/masks/multiply/index.html index dc9b502..6233bc6 100644 --- a/json/texsources/masks/multiply/index.html +++ b/json/texsources/masks/multiply/index.html @@ -4,13 +4,13 @@ Multiply Mask Source | Dynamic Asset Generator Docs - + - + \ No newline at end of file diff --git a/json/texsources/overlay/index.html b/json/texsources/overlay/index.html index 8f78437..0768286 100644 --- a/json/texsources/overlay/index.html +++ b/json/texsources/overlay/index.html @@ -4,13 +4,13 @@ Overlay Source | Dynamic Asset Generator Docs - +

Overlay Source

Source Type ID: dynamic_asset_generator:overlay

Format:

{
"type": "dynamic_asset_generator:overlay",
"sources": [
{ },
{ }
]
}
  • inputs is a list of texture sources to overlay. These textures are layered one on top of another, with the first texture listed being placed at the back. The final texture will have the dimensions of the texture with the largest width, with textures being scaled up to fit.
- + \ No newline at end of file diff --git a/json/texsources/palette_combined/index.html b/json/texsources/palette_combined/index.html index a39a43b..02b49c8 100644 --- a/json/texsources/palette_combined/index.html +++ b/json/texsources/palette_combined/index.html @@ -4,13 +4,13 @@ Combined Paletted Source | Dynamic Asset Generator Docs - +

Combined Paletted Source

Source Type ID: dynamic_asset_generator:palette_combined

Format:

{
"type": "dynamic_asset_generator:palette_combined",
"overlay": { },
"background": { },
"paletted": { },
"include_background": true, // optional, defaults to true
"stretch_paletted": false, // optional, defaults to false
"extend_palette_size": 0 // optional, defaults to 6
}

overlay, paletted, and background are texture sources. The Combined Paletted Image Source leverages some of the more powerful abilities of Dynamic Asset Generator. First, a palette of colors is extracted from background. If this palette contains fewer colors than extend_palette_size, it is grown to the correct size by adding lighter and darker colors to the ends of the palette. The paletted image is then used as a sort of "map" for this palette, with the average RGB value being used to select a color from the palette. If stretch_paletted is true, the values of this image will be "stretched" to fill the lightest and darkest values of the palette. Then, the images are stacked; if include_background is true, then the background goes at the back. Either way, the image colored with the palette goes in the middle and the overlay goes on top.

- + \ No newline at end of file diff --git a/json/texsources/palette_spread/index.html b/json/texsources/palette_spread/index.html index e478d53..008c3bc 100644 --- a/json/texsources/palette_spread/index.html +++ b/json/texsources/palette_spread/index.html @@ -4,13 +4,13 @@ Palette Spread Source | Dynamic Asset Generator Docs - +

Palette Spread Source

Source Type ID: dynamic_asset_generator:palette_spread

Format:

{
"type": "dynamic_asset_generator:palette_spread",
"source": { },
"palette_cutoff": 3.5, // optional, defaults to 3.5
}

This source converts the provided source, source, to a greyscale image by evenly spreading out the individual colors in the images palette so that distances between colors are even. This is useful if you are going to use the image as a palette providing texture, as it will make the colors more evenly distributed. palette_cutoff configures how sensitive the palette used is, with colors falling within the given distance of each other being considered the same color. The default, 3.5, is usually a good value.

- + \ No newline at end of file diff --git a/json/texsources/shadowed/index.html b/json/texsources/shadowed/index.html index 3c90518..ed3f4df 100644 --- a/json/texsources/shadowed/index.html +++ b/json/texsources/shadowed/index.html @@ -4,13 +4,13 @@ Shadowed Source | Dynamic Asset Generator Docs - +

Shadowed Source

Source Type ID: dynamic_asset_generator:shadowed

Format:

{
"type": "dynamic_asset_generator:shadowed",
"background": { },
"foreground": { },
"extend_palette_size": 6, // optional, defaults to 6
"highlight_strength": 72, // optional, defaults to 72
"shadow_strength": 72, // optional, defaults to 72
"uniformity": 1.0, // optional, defaults to 1.0
}

This source overlays the foreground texture on top of the background texture, and creates a directional shadow behind and around the foreground texture. Several other parameters can be configured:

  • extend_palette_size extends the extracted palette to this size by adding colors.
  • highlight_strength determines how much the highlight is emphasized. A higher number results in a brighter highlight.
  • shadow_strength determines how much the shadow is emphasized. A higher number results in a darker shadow.
  • uniformity determines how uniform the shadow and highlights are relative to the original background. A higher number results in a more uniform shadow.
- + \ No newline at end of file diff --git a/json/texsources/splitter/index.html b/json/texsources/splitter/index.html index 01750cb..ccc3195 100644 --- a/json/texsources/splitter/index.html +++ b/json/texsources/splitter/index.html @@ -4,13 +4,13 @@ Animation Splitter | Dynamic Asset Generator Docs - +

Animation Splitter

Source Type ID: dynamic_asset_generator:animation_splitter and dynamic_asset_generator:frame_capture

Format:

{
"type" : "dynamic_asset_generator:animation_splitter",
"sources" : {
"name1" : { },
"name2" : { }
},
"generator" : {
...
{
"type" : "dynamic_asset_generator:frame_capture",
"capture" : "name1"
}
...
}
}

This source allows animation images to be split up and processed frame-by-frame. A list of sources is specified; each of these is broken up into square frames. The total length of the output animation will be the least common multiple of the lengths of the input animations. The generator is calculated for each frame of the output animation; inside of this texture source, any other texture source can be used, in addition to the special frame_capture source, which is given a source name and captures a single frame of that source at a time.

- + \ No newline at end of file diff --git a/json/texsources/spread/index.html b/json/texsources/spread/index.html index 3e541df..110f974 100644 --- a/json/texsources/spread/index.html +++ b/json/texsources/spread/index.html @@ -4,13 +4,13 @@ Spread Source | Dynamic Asset Generator Docs - +

Spread Source

Source Type ID: dynamic_asset_generator:spread

Format:

{
"type": "dynamic_asset_generator:spread",
"source": { },
"range": [
[0, 50],
[100, 255]
] // optional, defaults to [[0, 255]]
}

This source converts the provided source, source, to a greyscale image by spreading out or squishing the colors in an image to fit in a given range. The range configures the range of values to use for the output image; the members of the palette will correspond to evenly spaced values within this range.

- + \ No newline at end of file diff --git a/json/texsources/transform/index.html b/json/texsources/transform/index.html index 7992da1..a232bce 100644 --- a/json/texsources/transform/index.html +++ b/json/texsources/transform/index.html @@ -4,13 +4,13 @@ Transform Source | Dynamic Asset Generator Docs - +

Transform Source

Source Type ID: dynamic_asset_generator:transform

Format:

{
"type": "dynamic_asset_generator:transform",
"input": { },
"rotate": 0, // optional, default 0
"flip": false // optional, default false
}

input is a texture source to use as an input. The image will first be rotated clockwise by 90 degrees rotate times; then, if flip is true, it will be flipped horizontally.

- + \ No newline at end of file