npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@daniil_sv/xcoder

v1.0.4

Published

<h1 align="center">XCoder</h>

Downloads

2

Readme

Installing:

Create a folder in any place convenient for you. Then open a terminal inside it and run the command:

npm install @daniil_sv/xcoder -g

After the first launch, you will go through a small configuration process during which working folders will be created.

How to run:

Run command:

xcoder

After that you will see options menu

Available features:

Textures

Compressing

Textures

This version has some changes compared to "original" python one. The main goal is to provide maximum flexibility by removing dumb restrictions.. Because of this, here all information about textures is contained in readable json and not in binary .xcod files. Json is composed of a list of textures that can be changed or added to. Below is a table with a description of each parameter of such a texture. Each parameter can be optional

| Name | Type | Description | Possible values | |:-----------:|:----------------:|:-------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------:| | pixelFormat | string OR number | Texture pixel type | GL_RGBA8, GL_RGBA4, GL_RGB5_A1, GL_RGB565, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE8 or index of these values | | linear | boolean | If enabled, writes a pixel linearly. Otherwise, it uses a special pixel blocking system. | true, false | | downscaling | boolean | Allows you to use mipmaps on texture. | true, false | | magFilter | string OR number | Mag filter | GL_LINEAR, GL_NEAREST, GL_LINEAR_MIPMAP_NEAREST or index of these values | | minFilter | string OR number | Min filter | GL_LINEAR, GL_NEAREST, GL_LINEAR_MIPMAP_NEAREST or index of these values | | width | number | Texture width. If it does not match the size of the actual texture, it will be prompted to change it or ignore it. | Any positive number to 8096 | | height | number | Texture height. If it does not match the size of the actual texture, it will be prompted to change it or ignore it. | Any positive number to 8096 |

Decoding .sc to .png

To decode sc to png you need to copy your files to Sc-Textures/In-SC-Textures/ and run the operation in XCoder, after that get folders with output in Sc-Textures/Out-Textures/. Folders contain textures and a "json" file with information about them.

Terminal access:

To decode file, run following command:

sc2tex

Command arguments:

-i, --input : Required parameter. Path to folder with files or path to file. If a folder is specified and no output is specified, creates a new folder with "_textures" prefix that will contain processed files.

-o, --output : Optional parameter. Name of output folder.

Examples:

sc2tex -i sc/ui_highres_tex.sc -o sc/ui_textures

OR

sc2tex -i sc/

output will automatically be "sc_textures/".

Encoding from .png to .sc

You have 2 ways:

  1. "Decode" and modify existing files and add them to Sc-Textures/In-Textures/.
  2. You can create textures from scratch. Create a folder in Sc-Textures/In-Textures/ with name of texture and put png there. Json file is optional.

After that, you can get files in Sc-Textures/Out-SC-Textures/.

Terminal access:

To encode textures, run following command:

tex2sc

Command arguments:

-i, --input : Required parameter. Path to folder with .png textures.

-o, --output : Optional parameter. Name of output folder.

Example:

tex2sc -i ui_highres_tex -o ui_highres_tex.sc

Comressing

There are also changes here. In Python version, compressor could only decompress csv files. This one supports compression of all files. Be careful if you want to compress or decompress a .sc file, make sure its name ends in ".sc".

File decompressing

Place your files in Compressing/In-Compressed-files/, start decompression operation and take files in Compressing/Out-files.

Terminal access:

To decompress file, run following command:

sc-decompress

Command arguments:

-i, --input : Required parameter. Path to folder with files or path to file. If a folder is specified and no output is specified, creates a new folder with "_decompressed" prefix that will contain processed files.

-o, --output : Optional parameter. Name of output file. If not specified and if input is a file then it will be overwritten.

Examples:

sc-decompress -i sc/ui.sc -o sc/ui_decompressed.sc

OR

sc-decompress -i sc/

output will automatically be "sc_decompressed/".

File compressing

Place your files in Compressing/In-files/, start compression operation and take files in Compressing/Out-compressed-files/. Uses compression method currently selected in XCoder.

Terminal access:

To compress file, run following command:

sc-compress

Command arguments:

-i, --input : Required parameter. Path to folder with files or path to file. If a folder is specified and no output is specified, creates a new folder with "_compressed" prefix that will contain processed files.

-o, --output : Optional parameter. Name of output file. If not specified and if input is a file then it will be overwritten.

Examples:

sc-compress -i sc/ui_decompressed.sc -o  sc/ui.sc

OR

sc-decompress -i sc/

output will automatically be "sc_compressed/".

Authors:

TODO:

  • Sprite decoding feature
  • Decoding to JSON