Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add assetpack 1.0 post #115

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/2024-03-05-pixi-v8-launches.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords: ['PixiJS', 'pixi.js', 'webGL', 'webGPU', 'performance', '2d rendering'

Get ready to push the boundaries of what's possible on the web! PixiJS v8 has landed, and it's a game-changer. Celebrating a decade of driving innovation, we've supercharged PixiJS with the latest technological advancements, making it faster, more robust, and ridiculously powerful. From the seamless integration of WebGPU to leveraging modern JavaScript for smoother development, PixiJS v8 is all about empowering you to create jaw-dropping web experiences with ease. It's not just an update; it's the future of 2D web graphics, today. Dive in and let PixiJS v8 elevate your projects to unseen heights. Let's make the web a more beautiful place, one pixi(el) at a time.

<!--truncated-->
<!--truncate-->

## 🚀 Revolutionizing Web Graphics: Welcome to PixiJS v8

Expand Down
4 changes: 2 additions & 2 deletions blog/2024-06-14-pixi-spine.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords: ['PixiJS', 'Spine', 'webGL', 'webGPU', '2D animation', 'JavaScript gra

We have exciting news for all animation enthusiasts and game developers! The Spine team has just smashed it out of the park with the release of [Spine 4.2](https://en.esotericsoftware.com/blog/Spine-4.2-The-physics-revolution), which includes some truly great new features. The best part for us PixiJS users? We can start leveraging these remarkable features today in both v7 and v8!

<!--truncated-->
<!--truncate-->

For those unfamiliar, Spine is the standard for creating stunning 2D animations. It offers an intuitive editor and a multitude of runtimes to ensure that your animations can be utilized across various platforms. PixiJS has supported Spine for almost as long as both have existed (around 10 years)! Personally, we have been shipping games with Spine for about that long as well.

Expand Down Expand Up @@ -54,7 +54,7 @@ We are proud to say that this is one of if not *the* fastest way to render Spine

We plan on handing this implementation back over to the Spine team once we have dotted all the i's and crossed the t's. The last missing feature is the dark-tint property, which is not currently taken into account when rendering in v8. Other than that, all other features are present. If you are not using dark-tint, then this version will work great on v8; we are already using it in production for our games!

We included all the examples in the repo for you to play with [here](https://github.com/pixijs/spine-v8/tree/main/examples).
We included all the examples in the repo for you to play with [here](https://github.com/pixijs/spine-v8/tree/main/examples).

You can also check out the live v8 examples [here](https://pixijs.io/spine-v8/examples/)

Expand Down
101 changes: 101 additions & 0 deletions blog/2024-07-12-assetpack-1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: AssetPack 1.0.0 Release!
description: AssetPack 1.0.0 is here! 🎉
slug: assetpack-1.0.0
authors:
- name: Zyie
title: PixiJS Co-owner
url: https://github.com/Zyie
image_url: https://github.com/Zyie.png
tags: [PixiJS, AssetPack, Web, Games, Spine, Optimisation, 'Asset Management']
hide_table_of_contents: true
keywords: ['PixiJS', 'Spine', 'JavaScript', 'game development', 'web development', 'asset management', 'loading']
---

Today we are very excited to announce [AssetPack](https://pixijs.io/assetpack) 1.0, an asset management and optimization tool for web developers.

In the world of web development, managing and optimizing assets often demands significant manual effort. Developers need to ensure that their images are compressed, their audio files are optimized, their fonts are loaded efficiently, and more. This process can be time-consuming and error-prone, especially when working on large projects with many assets. To address this challenge, AssetPack provides a configurable asset pipeline that automates many of these tasks, making it easier for developers to manage and deploy assets in their projects.

<!--truncate-->

## What is AssetPack?

AssetPack is a tool designed to streamline the management, optimization, and deployment of assets in web projects. It is framework-agnostic and can be used with any framework you like, such as PixiJS, Three.js, Phaser, and others. AssetPack employs a plugin-based system, allowing you to create your own plugins to customize asset processing according to your needs.

<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', paddingBottom: '24px' }}>
<img
src={'/images/blog/assetpack-screenshot.png'}
alt="AssetPack screenshot"
/>
</div>

AssetPack comes out of the box with the following plugins:

- **Cache Busting**: Automatically appends a unique hash to asset URLs to ensure that clients always load the latest version of the asset.
- **Compression**: Compresses images using sharp, allowing for the creation of webp/avif images and compressing png/jpg to reduce file sizes.
- **TexturePacker**: Automatically generates spritesheets from images.
- **Mipmap**: Generates mipmaps for textures to improve rendering performance e.g. 2x, 1x, 0.5x, etc.
- **Spine**: Optimizes Spine animations by creating mipmaps for `.atlas` files.
- **Audio/FFmpeg**: Converts audio files to the desired format and bitrate using FFmpeg.
- **JSON**: Minifies JSON files to reduce their size.
- **Webfont**: Converts all fonts files to WOFF2 format, and plugins for SDF and MSDF font generation
- **Manifest**: Generates a manifest file containing all asset URLs for easy loading. This can be used with PixiJS's `Assets` loader

The above plugins are just a few examples of what AssetPack can do. You can create your own plugins to extend AssetPack's functionality further.

## How to use AssetPack

### Installation

To install AssetPack, you need to install the `@assetpack/core` package.

```bash
npm install --save-dev @assetpack/core
```

:::info COMPATIBILITY NOTE
AssetPack requires [Node.js](https://nodejs.org/en/) version 20+, please upgrade if your package manager warns about it.
:::

### Setup

To set up AssetPack, you need to create a configuration file that defines what assets you want to optimise and how you want to optimise them.

First create a `.assetpack.js` file in the root of your project. This file should export an object with the following properties:

```js
// .assetpack.js
import { pixiPipes } from '@assetpack/core';

export default {
entry: './raw-assets',
output: './public/assets',
pipes: [
/* If you are using AssetPack with PixiJS, you can use the `pixiPipes` function
* to add a pre-configured set of plugins, with an opinionated
* set of defaults for PixiJS.
*/
...pixiPipes()
],
};
```

To see the full list of configuration options, see the [API Reference](https://pixijs.io/assetpack/docs/guide/configuration/) page.

Then to run AssetPack, you can use the CLI, run programmatically, or use a build tool like Vite.

- [CLI](https://pixijs.io/assetpack/docs/guide/getting-started/cli)
- [Programmatic](https://pixijs.io/assetpack/docs/guide/getting-started/programmatic)
- [Vite](https://pixijs.io/assetpack/docs/guide/getting-started/vite)

AssetPack has a number of built-in plugins for you to use, to see the full list of plugins, see the [Plugins](https://pixijs.io/assetpack/docs/guide/pipes/overview) page.

## Conclusion

AssetPack is a powerful tool that can help you manage and optimize assets in your web projects. By automating many of the tasks involved in asset management, AssetPack can save you time and effort, allowing you to focus on building great web experiences. We hope you find AssetPack useful in your projects, and we look forward to seeing what you create with it!

We are committed to continuously improving AssetPack, and your feedback is invaluable to us. If you encounter any issues or have suggestions for new features, please reach out on our discord or open an issue on our GitHub repository.

## 🌐 Stay Connected

Follow [Zyie](https://twitter.com/_Zyie_) and [PixiJS](https://twitter.com/PixiJS) on social media for the latest updates. Join our vibrant community on [Discord](https://discord.gg/nrnDP9wtyX) for real-time discussions and support.
Binary file added static/images/blog/assetpack-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading