{"id":17004885,"url":"https://github.com/clickermonkey/azzet","last_synced_at":"2025-04-12T06:31:42.195Z","repository":{"id":6745610,"uuid":"7991927","full_name":"ClickerMonkey/Azzet","owner":"ClickerMonkey","description":"An Asset Loading Library in Java. Load assets from any source (classpath, file system, web, database, etc) in many formats (XML, JSON, audio, images, etc) either directly or in a background process.","archived":false,"fork":false,"pushed_at":"2013-11-15T20:38:19.000Z","size":5560,"stargazers_count":31,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T01:51:13.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"osl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClickerMonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-03T15:04:36.000Z","updated_at":"2024-04-02T17:41:13.000Z","dependencies_parsed_at":"2022-08-26T06:10:43.017Z","dependency_job_id":null,"html_url":"https://github.com/ClickerMonkey/Azzet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FAzzet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FAzzet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FAzzet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClickerMonkey%2FAzzet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClickerMonkey","download_url":"https://codeload.github.com/ClickerMonkey/Azzet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529662,"owners_count":21119555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T04:44:42.841Z","updated_at":"2025-04-12T06:31:37.123Z","avatar_url":"https://github.com/ClickerMonkey.png","language":"Java","readme":"\u003ch1\u003eAzzet\u003c/h1\u003e\n\n![Stable](http://i4.photobucket.com/albums/y123/Freaklotr4/stage_stable.png)\n\nAzzet is a simple Java library for loading assets from various sources\n\n```java\nBufferedImage img = Assets.load(\"http://www.google.com/logos/classicplus.png\"); // loaded from website\nFont fnt = Assets.load(\"myfont.ttf\", new FontInfo(32.0f)); // loaded from classpath\nClip snd = Assets.load(\"C:\\UserData\\MyMusic.wav\"); // loaded from file-system\nBufferedImage gif = Assets.loadFrom(\"mygif.gif\", BufferedImage.class); // you can request the return type\nBufferedImage[] animatedGif = Assets.loadFrom(\"mygif.gif\", \"db\"); // loads from DatabaseSource saved as \"db\"\nProperties props = Assets.loadFrom(\"app.properties\", \"tcp\"); // loads from TcpSource saved as \"tcp\"\n```\n\n\u003cb\u003eFormats (and equivalent java objects):\u003c/b\u003e\n- \u003cb\u003eJSON\u003c/b\u003e ([org.magnos.asset.json.JsonValue](Formats/org/magnos/asset/json/JsonValue.java))\n- \u003cb\u003eXML\u003c/b\u003e (org.w3c.dom.Document)\n- \u003cb\u003ePROPERTIES/XML/CONFIG\u003c/b\u003e (java.util.Properties, [org.magnos.asset.props.Config](Formats/org/magnos/asset/props/Config.java))\n- \u003cb\u003eGIF\u003c/b\u003e (java.awt.image.BufferedImage[])\n- \u003cb\u003ePNG/BMP/WBMP/JPEG/JPG\u003c/b\u003e (java.awt.image.BufferedImage)\n- \u003cb\u003eMID/MIDI\u003c/b\u003e (javax.sound.midi.Sequence)\n- \u003cb\u003eWAV/AU/AIFF/SND\u003c/b\u003e (javax.sound.sampled.Clip)\n- \u003cb\u003eTTF\u003c/b\u003e (java.awt.Font)\n- \u003cb\u003eCSV\u003c/b\u003e ([org.magnos.asset.csv.Table](Formats/org/magnos/asset/csv/Table.java))\n- \u003cb\u003eCLASS/CLAZZ\u003c/b\u003e (java.lang.Class)\n- \u003cb\u003eJAR\u003c/b\u003e ([org.magnos.asset.java.Jar](Formats/org/magnos/asset/java/Jar.java))\n- \u003cb\u003eZIP\u003c/b\u003e ([org.magnos.asset.zip.Zip](Formats/org/magnos/asset/zip/Zip.java))\n- \u003cb\u003eGZ\u003c/b\u003e ([org.magnos.asset.AssetInfo](Source/org/magnos/asset/AssetInfo.java))\n- \u003cb\u003eDAT\u003c/b\u003e (byte[], java.io.InputStream, java.nio.ByteBuffer, java.io.ByteArrayOutputStream)\n- \u003cb\u003eTXT\u003c/b\u003e (java.lang.String, char[], java.nio.CharBuffer, java.lang.StringBuffer, java.lang.StringBuilder)\n\n\u003cb\u003eSources:\u003c/b\u003e\n- Classpath\n- File-System\n- Database\n- JAR\n- FTP\n- HTTP/HTTPS\n- UDP\n- TCP\n- SSL\n- UDP Multicast \n\nYou can also load assets in the background:\n\n```java\nFutureAsset\u003cBufferedImage\u003e future = Assets.loadFuture(\"mypic.png\");\nBufferedImage mypic = null;\n\nwhile (running) {\n  // do stuff\n  if ( future.getStatus() == FutureAssetStatus.Loaded ) {\n     future.loaded(); // mark the future as loaded\n     mypic = future.get();  // get the loaded asset\n  }\n  // do other stuff\n}\n```\n\nThis type of deferred/lazy loading is especially useful for applications like games with loading screens. You can bundle all of the FutureAssets up to easily manage several assets loading in the background:\n\n```java\nFutureAssetBundle bundle = new FutureAssetBundle();\nbundle.add( Assets.loadFuture(\"image.gif\", BufferedImage.class) );\nbundle.add( Assets.loadFuture(\"sound.wav\", Clip.class) );\n\nBufferedImage image = null;\nClip sound = null;\n\n// game loop\nwhile (running) {\n   // do stuff\n   // this occurs during the loading screen....\n   if (bundle.isComplete()) {\n       bundle.loaded(); // notify all FutureAsset implementations the asset has been accepted.\n       image = bundle.getAsset(\"image.gif\");\n       sound = bundle.getAsset(\"sound.wav\");\n       // move from loading to play screen\n   } else {\n       display bundle.percentComplete();     \n   }\n   // do other stuff\n}\n```\n\n\u003cb\u003eLinks\u003c/b\u003e:\n- [Documentation](http://gh.magnos.org/?r=http://clickermonkey.github.com/Azzet/) \n- [Builds](build)\n- [Examples] (Test/org/magnos/asset)\n\nThe Formats and Sources are registered with the Assets class. The Assets class determines the format and source to use for a given request based on extension, requested asset type, the default source, and any registered sources and completes the request. \n\nThe Asset class also caches assets to avoid re-retrieving and parsing an asset.\n\nThe library can be extended further by adding your own AssetFormat and AssetSource implementations.\n\nCheckout the Test source folder for examples on how to load and use assets created by Azzet.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickermonkey%2Fazzet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclickermonkey%2Fazzet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclickermonkey%2Fazzet/lists"}