Giter Site home page Giter Site logo

ourcade / vscode-texture-packer Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 9 KB

This repository is mainly used as an issue tracker for the Texture Packer for VS Code extension

Home Page: https://marketplace.visualstudio.com/items?itemName=Ourcade.vscode-texture-packer

spritesheet-packer spritesheets texture-atlas texture-packer vscode vscode-extension

vscode-texture-packer's Introduction

Texture Packer for VS Code

Easily create texture atlases for Phaser, Pixi, and more by grouping images into a folder!

Get it on the VS Code Marketplace here.

*This repository is mainly used as an issue tracker.

How it works

Right click on a folder with images and then select Create Texture Atlas to pack them into 1 or more atlases.

create-gif

The atlas.config.json created in that folder is used for configuration options. The atlas format is automatically detected based on your project. (Currently works with Phaser 3 or Pixi projects.)

If prettier is installed then the JSON files will be formatted like everything else in your project!

Requirements

This extension only works on desktop versions of VS Code and cannot be run in the browser.

Atlas Configuration Options

name: string

default: atlas

The file name of the generated texture atlases.


format: 'phaser3' | 'pixi' | 'phaser-hash' | 'json-hash'

default: json-hash

This value is automatically detected for Phaser 3 or Pixi projects.


maxWidth: number

default: 2048

The maximum width of an atlas.


maxHeight: number

default: 2048

The maximum height of an atlas.


fixedSize: boolean

default: false

Will make atlas maxWidth x maxHeight when set to true.


pot: boolean

default: false

Force atlases to be power of two.


padding: number

default: 0


extrude: number

default: 0


allowRotation: boolean

default: true

Allow textures to be rotated in the atlas.


shareIdentical: boolean

default: true

Textures that are the same but have different filenames will only be packed once to optimize atlas size.


allowTrim: boolean

default: true

Trim empty whitespace to optimize atlas size.


trimMode: 'trim' | 'crop'

default: 'trim'


keepExtensions: boolean

default: false

Keep file extensions in texture frame keys otherwise only the filename will be used.


textureFormat: 'png' | 'jpg'

default: png


algorithm: 'max-rects' | 'max-rects-bin' | 'optimal'

default: max-rects-bin


maxRectsMethod: 'smart' | 'square' | 'smart-square' | 'smart-area' | 'square-area' | 'smart-square-area'

default: smart


maxRectsBinMethod: 'best-short-side-fit' | 'best-long-side-fit' | 'best-area-fit' | 'bottom-left-rule' | 'contact-point-rule'

default: best-short-side-fit


deep: boolean

default: false

Include textures in nested folders when deep is set to true. Nested folders that have an atlas.config.json are automatically ignored.


outDir: string

default: ./

Relative path from atlas.config.json where generated atlas image and JSON files should be saved to.

For example, saving to the the parent folder would be: "ourDir": "..".

Got an issue?

This extension is very new and not yet tested in a wide variety of projects or workflows so let us know if something's not working or if there's a use-case that you'd love to see!

Reach out on Twitter @iamsupertommy or @ourcadehq

Join the Ourcade Discord: https://discord.gg/p3vfese

Release Notes

v0.0.6

November 3rd, 2022

Add JSON Schema for atlas.config.json files to provide autocompletion when modifying them.

vscode-texture-packer's People

Contributors

supertommy avatar

Watchers

 avatar  avatar  avatar

vscode-texture-packer's Issues

Set output folder in atlas.config.json

It would be nice to have an outDir parameter in the atlas.config.json file. Merging the input images with the output atlas images is not always the desired workflow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.