Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/text-bitmap

Package Overview
Dependencies
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/text-bitmap - npm Package Compare versions

Comparing version 7.2.0-beta to 7.2.0-beta.2

12

lib/BitmapText.d.ts

@@ -1,6 +0,6 @@

import { ObservablePoint } from '@pixi/core';
import { Color, ObservablePoint } from '@pixi/core';
import { Container } from '@pixi/display';
import { Mesh } from '@pixi/mesh';
import { BitmapFont } from './BitmapFont';
import type { Rectangle, Renderer } from '@pixi/core';
import type { ColorSource, Rectangle, Renderer } from '@pixi/core';
import type { IDestroyOptions } from '@pixi/display';

@@ -128,3 +128,3 @@ import type { TextStyleAlign } from '@pixi/text';

*/
protected _tint: number;
protected _tintColor: Color;
/**

@@ -145,3 +145,3 @@ * If true PixiJS will Math.floor() x/y values when rendering.

* does not affect single line text.
* @param {number} [style.tint=0xFFFFFF] - The tint color.
* @param {PIXI.ColorSource} [style.tint=0xFFFFFF] - The tint color.
* @param {number} [style.letterSpacing=0] - The amount of spacing between letters.

@@ -169,4 +169,4 @@ * @param {number} [style.maxWidth=0] - The max width of the text before line wrapping.

*/
get tint(): number;
set tint(value: number);
get tint(): ColorSource;
set tint(value: ColorSource);
/**

@@ -173,0 +173,0 @@ * The alignment of the BitmapText object.

@@ -21,3 +21,2 @@ 'use strict';

super();
this._tint = 16777215;
const { align, tint, maxWidth, letterSpacing, fontName, fontSize } = Object.assign({}, _BitmapText.styleDefaults, style);

@@ -31,3 +30,3 @@ if (!BitmapFont.BitmapFont.available[fontName]) {

this._align = align;
this._tint = tint;
this._tintColor = new core.Color(tint);
this._font = void 0;

@@ -194,3 +193,3 @@ this._fontName = fontName;

pageMeshData.mesh.texture = _textureCache[baseTextureUid];
pageMeshData.mesh.tint = this._tint;
pageMeshData.mesh.tint = this._tintColor.value;
newPagesMeshData.push(pageMeshData);

@@ -340,8 +339,8 @@ pagesMeshData[baseTextureUid] = pageMeshData;

get tint() {
return this._tint;
return this._tintColor.value;
}
set tint(value) {
if (this._tint === value)
if (this.tint === value)
return;
this._tint = value;
this._tintColor.setValue(value);
for (let i = 0; i < this._activePagesMeshData.length; i++) {

@@ -471,2 +470,3 @@ this._activePagesMeshData[i].mesh.tint = value;

this._font = null;
this._tintColor = null;
this._textureCache = null;

@@ -473,0 +473,0 @@ super.destroy(options);

@@ -0,1 +1,2 @@

import type { ColorSource } from '@pixi/core';
import type { TextStyleAlign } from '@pixi/text';

@@ -5,3 +6,3 @@ export interface IBitmapTextStyle {

fontSize: number;
tint: number;
tint: ColorSource;
align: TextStyleAlign;

@@ -8,0 +9,0 @@ letterSpacing: number;

import { BitmapFont } from './BitmapFont';
import type { LoaderParser } from '@pixi/assets';
/** simple loader plugin for loading in bitmap fonts! */
export declare const loadBitmapFont: LoaderParser<string | BitmapFont, any>;
export declare const loadBitmapFont: LoaderParser<string | BitmapFont, any, Record<string, any>>;
{
"name": "@pixi/text-bitmap",
"version": "7.2.0-beta",
"version": "7.2.0-beta.2",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "module": "lib/index.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc