🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

pixi-sdf-text

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-sdf-text

SDF text rendering for Pixi.js

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

pixi-sdf-text

Signed distance fields text implementation for PixiJS

SDF is the most efficient way to draw text in WebGL. It uses special kind of raster atlases and GLSL shader to draw vector scalable text in a very performant way on GPU.

Demo

Installation

npm i pixi-sdf-text --save

Usage

var style = {
    fontSize: 24,
    fontWeight: 'bold',
    fill: 0x39FF14,
    align: 'left',
    wordWrapWidth: 400,
    lineHeight: 64,
    fontURL: 'assets/Lato-Regular-64.fnt',
    imageURL: 'assets/lato.png'
};

var sdfText = new PIXI.sdf.Text('Abc', style);
stage.addChild(sdfText);

How to generate font descriptors and SDF atlases?

Use this manual

Bugs

Feel free to submit issues to GitHub tracker

License

MIT: http://mit-license.org/

Copyright 2017 Denis Radin aka PixelsCommander

Keywords

webgl

FAQs

Package last updated on 22 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts