texture-manager

1.0.21 • Public • Published

texture-manager

Rearrange and store textures for use in WebGL

CodeQL

pages-build-deployment

Setup

Directly in web page

Include the scripts in html as follow:

<script src="https://unpkg.com/texture-manager/public/texture-manager.js"></script>

Through NPM

Add to package.json:

  "dependencies": {
  	...
    "texture-manager": "^1.0.0",
    ...
  }

Use Browserify to make classes available in browser

In package.json:

  "scripts": {
  	...
    "browserify": "browserify browserify/main.js -s dok-lib -o public/gen/compact.js",
    ...
  },

In browserify/main.js:

const { TextureManager, TextureUtils, SlotAllocator } = require('texture-manager');
module.exports = {
  TextureManager,
  TexureUtils,
  SlotAllocator
};

Components

TextureManager

Description

TextureManager packs textures in WebGL for use as sprite atlas.

Usage

Work in progress

Demo

demo

Readme

Keywords

none

Package Sidebar

Install

npm i texture-manager

Weekly Downloads

0

Version

1.0.21

License

MIT

Unpacked Size

119 kB

Total Files

21

Last publish

Collaborators

  • vincentlequang