Socket
Socket
Sign inDemoInstall

@pixi/text

Package Overview
Dependencies
Maintainers
2
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/text - npm Package Compare versions

Comparing version 7.1.2 to 7.2.0-beta

11

lib/const.d.ts
/**
* Constants that define the type of gradient on text.
* @static
* @name TEXT_GRADIENT
* @memberof PIXI
* @type {object}
* @property {number} LINEAR_VERTICAL Vertical gradient
* @property {number} LINEAR_HORIZONTAL Linear gradient
*/
export declare enum TEXT_GRADIENT {
/**
* Vertical gradient
* @default 0
*/
LINEAR_VERTICAL = 0,
/**
* Linear gradient
* @default 1
*/
LINEAR_HORIZONTAL = 1
}

@@ -90,6 +90,5 @@ 'use strict';

const dropShadowColor = style.dropShadowColor;
const rgb = core.utils.hex2rgb(typeof dropShadowColor === "number" ? dropShadowColor : core.utils.string2hex(dropShadowColor));
const dropShadowBlur = style.dropShadowBlur * this._resolution;
const dropShadowDistance = style.dropShadowDistance * this._resolution;
context.shadowColor = `rgba(${rgb[0] * 255},${rgb[1] * 255},${rgb[2] * 255},${style.dropShadowAlpha})`;
context.shadowColor = core.Color.shared.setValue(dropShadowColor).setAlpha(style.dropShadowAlpha).toRgbaString();
context.shadowBlur = dropShadowBlur;

@@ -96,0 +95,0 @@ context.shadowOffsetX = Math.cos(style.dropShadowAngle) * dropShadowDistance;

@@ -342,20 +342,8 @@ 'use strict';

};
function getSingleColor(color) {
if (typeof color === "number") {
return core.utils.hex2string(color);
} else if (typeof color === "string") {
if (color.startsWith("0x")) {
color = color.replace("0x", "#");
}
}
return color;
}
function getColor(color) {
const temp = core.Color.shared;
if (!Array.isArray(color)) {
return getSingleColor(color);
return temp.setValue(color).toHex();
} else {
for (let i = 0; i < color.length; ++i) {
color[i] = getSingleColor(color[i]);
}
return color;
return color.map((c) => temp.setValue(c).toHex());
}

@@ -362,0 +350,0 @@ }

{
"name": "@pixi/text",
"version": "7.1.2",
"version": "7.2.0-beta",
"main": "lib/index.js",

@@ -41,4 +41,3 @@ "module": "lib/index.mjs",

"@pixi/sprite"
],
"gitHead": "27e65c73bb36a06fd00d6da5bf460bbee9f6c984"
]
}

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

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

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