-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
feat: Adds gl2D file format support #11628
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
base: dev
Are you sure you want to change the base?
Conversation
Implements initial support for the gl2D file format, enabling the serialization of PixiJS scenes into a JSON-based structure. - Introduces core gl2D file structure, including assets, scenes, nodes, and resources. - Adds extension capabilities for custom metadata. - Enables serialization of containers, sprites, textures, and sources. - Adds documentation for the gl2D file format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your PR title doesn't match the required format. The title should be in this format:
chore: update Text docs
fix: text not rendering
feat: add new feature to Text
breaking: remove Text#resolution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your PR title doesn't match the required format. The title should be in this format:
chore: update Text docs
fix: text not rendering
feat: add new feature to Text
breaking: remove Text#resolution
pixi.js-base • pixi.js-bunny-mark
commit: |
I'm SUPER excited about the opportunities and tooling this will enable for working with Pixi. Remind me a lot of the best of working with Flash where it was so much easier to decouple the view and logic. |
Moves gl2D serialization to a class for better organization and future extensibility. It also renames a utility function to more accurately reflect its purpose and updates relevant references.
Summary
This PR introduces initial support for the gl2D file format, which enables serialization of PixiJS scenes into a JSON-based structure. The goal is to provide a standardized way to save, load, and share any 2D scenes, while ensuring resources can be efficiently reused across nodes and scenes.
Design
A scene is represented as two main components:
For textures specifically:
Additionally, all nodes and resources can be extended via extensions, allowing custom metadata and features to be attached.
Example API
gl2D Spec
gl2D Spec & Example
Example JSON
NOTE
This is the first of several PR that will add all the different resources and node types, along with the deserialisation methods. Just splitting everything up to be more manageable.