Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@drecom/pixi-fittext

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drecom/pixi-fittext

A module for PIXI.js that changes the scale depending on the length of the string.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
3
Created
Source

pixi-fittext

pixi-fittext is a module for PIXI.js that changes the scale depending on the length of the string. It is a premise used for game project using pixi.js.

Install

# install this module
npm install @drecom/pixi-fittext

Usage

const requiredWidth = 240;

// FitText extends PIXI.Text, The parameter same as PIXI.Text except for the requiredWidth.
const fitText = new FitText("Hello FitText!", requiredWidth, { fill: 0xFFFFFF });

// when set text property, FitText adjust x scale automaticaly.
fitText.text = "adjust x scale auto.";

fittext1
fittext2

FAQs

Package last updated on 26 Jun 2019

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