🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@eva/renderer-adapter

Package Overview
Dependencies
Maintainers
6
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eva/renderer-adapter - npm Package Compare versions

Comparing version
2.0.2
to
2.1.0-beta.1
+4
-2
dist/EVA.rendererAdapter.js

@@ -55,3 +55,3 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }

class NinePatch extends pixi_js.NineSliceSprite {
constructor(img, leftWidth, topHeight, rightWidth, bottomHeight) {
constructor(img, leftWidth, topHeight, rightWidth, bottomHeight, width, height) {
let texture;

@@ -68,3 +68,5 @@ if (img instanceof pixi_js.Texture) {

rightWidth,
bottomHeight
bottomHeight,
width,
height
});

@@ -71,0 +73,0 @@ }

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

function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends.apply(null,arguments)}globalThis.EVA=globalThis.EVA||{};var _EVA_IIFE_rendererAdapter=function(e,t){"use strict";class r extends t.BitmapText{constructor(e,t){const r=_extends({},t);if(r.strokeThickness){const e=r.stroke;r.stroke={color:e,width:r.strokeThickness},delete r.strokeThickness}if(r.dropShadow){const e={};null!=r.dropShadowColor&&(e.color=r.dropShadowColor),null!=r.dropShadowDistance&&(e.distance=r.dropShadowDistance),null!=r.dropShadowAngle&&(e.angle=r.dropShadowAngle),null!=r.dropShadowAlpha&&(e.alpha=r.dropShadowAlpha),null!=r.dropShadowBlur&&(e.blur=r.dropShadowBlur),r.dropShadow=e,delete r.dropShadowColor,delete r.dropShadowDistance,delete r.dropShadowAngle,delete r.dropShadowAlpha,delete r.dropShadowBlur}Array.isArray(r.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),r.fill=r.fill[0]),super({text:e,style:r})}}class i extends t.Container{}class o extends t.Graphics{}class n extends t.HTMLText{constructor(e){super("string"==typeof e?{text:e}:e||{})}}class a extends t.NineSliceSprite{constructor(e,r,i,o,n){let a;a=e instanceof t.Texture?e:t.Texture.from(e),super({texture:a,leftWidth:r,topHeight:i,rightWidth:o,bottomHeight:n})}}class s extends t.Text{constructor(e,r){if(r.strokeThickness){const e=r.stroke;r.stroke={color:e,width:r.strokeThickness},delete r.strokeThickness}if(r.dropShadow){const e={};null!=r.dropShadowColor&&(e.color=r.dropShadowColor),null!=r.dropShadowDistance&&(e.distance=r.dropShadowDistance),null!=r.dropShadowAngle&&(e.angle=r.dropShadowAngle),null!=r.dropShadowAlpha&&(e.alpha=r.dropShadowAlpha),null!=r.dropShadowBlur&&(e.blur=r.dropShadowBlur),r.dropShadow=e,delete r.dropShadowColor,delete r.dropShadowDistance,delete r.dropShadowAngle,delete r.dropShadowAlpha,delete r.dropShadowBlur}if(Array.isArray(r.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),r.fill=r.fill[0]),Array.isArray(r.fillGradientStops)){let e;null==r.fontSize?r.fontSize=t.TextStyle.defaultTextStyle.fontSize:e="string"==typeof r.fontSize?parseInt(r.fontSize,10):r.fontSize;const i=new t.FillGradient(0,0,0,1.7*e),o=r.fillGradientStops.map(e=>t.Color.shared.setValue(e).toNumber());o.forEach((e,t)=>{const r=t/(o.length-1);i.addColorStop(r,e)}),r.fill={fill:i},delete r.fillGradientStops}super({text:e,style:r})}}return e.Application=t.Application,e.BitmapText=r,e.Container=i,e.Graphics=o,e.HTMLText=n,e.NinePatch=a,e.Sprite=class{constructor(e){this._image=null,this._image=e,e?"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.sprite=t.Sprite.from(e):e instanceof t.Texture&&(this.sprite=new t.Sprite(e)):this.sprite=new t.Sprite}set image(e){this._image!==e&&("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(this.sprite.texture&&this.sprite.texture.destroy(!1),this.sprite.texture=t.Texture.from(e)):e instanceof t.Texture&&(this.sprite.texture=e),this._image=e)}get image(){return this._image}},e.SpriteAnimation=class{constructor({frames:e}){this.animatedSprite=new t.AnimatedSprite(e)}play(){this.animatedSprite.play()}stop(){this.animatedSprite.stop()}gotoAndPlay(e){this.animatedSprite.gotoAndPlay(e)}gotoAndStop(e){this.animatedSprite.gotoAndStop(e)}set speed(e){this.animatedSprite.animationSpeed=e}get speed(){return this.animatedSprite.animationSpeed}},e.Text=s,e.TilingSprite=class{constructor(e){this._image=null,this._image=e,e?"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.tilingSprite=new t.TilingSprite(t.Texture.from(e)):e instanceof t.Texture&&(this.tilingSprite=new t.TilingSprite(e)):this.tilingSprite=new t.TilingSprite(t.Texture.EMPTY)}set image(e){this._image!==e&&("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.tilingSprite.texture=t.Texture.from(e):e instanceof t.Texture&&(this.tilingSprite.texture=e),this._image=e)}get image(){return this._image}},Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI);globalThis.EVA.rendererAdapter=globalThis.EVA.rendererAdapter||_EVA_IIFE_rendererAdapter;
function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},_extends.apply(null,arguments)}globalThis.EVA=globalThis.EVA||{};var _EVA_IIFE_rendererAdapter=function(e,t){"use strict";class r extends t.BitmapText{constructor(e,t){const r=_extends({},t);if(r.strokeThickness){const e=r.stroke;r.stroke={color:e,width:r.strokeThickness},delete r.strokeThickness}if(r.dropShadow){const e={};null!=r.dropShadowColor&&(e.color=r.dropShadowColor),null!=r.dropShadowDistance&&(e.distance=r.dropShadowDistance),null!=r.dropShadowAngle&&(e.angle=r.dropShadowAngle),null!=r.dropShadowAlpha&&(e.alpha=r.dropShadowAlpha),null!=r.dropShadowBlur&&(e.blur=r.dropShadowBlur),r.dropShadow=e,delete r.dropShadowColor,delete r.dropShadowDistance,delete r.dropShadowAngle,delete r.dropShadowAlpha,delete r.dropShadowBlur}Array.isArray(r.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),r.fill=r.fill[0]),super({text:e,style:r})}}class i extends t.Container{}class o extends t.Graphics{}class n extends t.HTMLText{constructor(e){super("string"==typeof e?{text:e}:e||{})}}class a extends t.NineSliceSprite{constructor(e,r,i,o,n,a,s){let l;l=e instanceof t.Texture?e:t.Texture.from(e),super({texture:l,leftWidth:r,topHeight:i,rightWidth:o,bottomHeight:n,width:a,height:s})}}class s extends t.Text{constructor(e,r){if(r.strokeThickness){const e=r.stroke;r.stroke={color:e,width:r.strokeThickness},delete r.strokeThickness}if(r.dropShadow){const e={};null!=r.dropShadowColor&&(e.color=r.dropShadowColor),null!=r.dropShadowDistance&&(e.distance=r.dropShadowDistance),null!=r.dropShadowAngle&&(e.angle=r.dropShadowAngle),null!=r.dropShadowAlpha&&(e.alpha=r.dropShadowAlpha),null!=r.dropShadowBlur&&(e.blur=r.dropShadowBlur),r.dropShadow=e,delete r.dropShadowColor,delete r.dropShadowDistance,delete r.dropShadowAngle,delete r.dropShadowAlpha,delete r.dropShadowBlur}if(Array.isArray(r.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),r.fill=r.fill[0]),Array.isArray(r.fillGradientStops)){let e;null==r.fontSize?r.fontSize=t.TextStyle.defaultTextStyle.fontSize:e="string"==typeof r.fontSize?parseInt(r.fontSize,10):r.fontSize;const i=new t.FillGradient(0,0,0,1.7*e),o=r.fillGradientStops.map(e=>t.Color.shared.setValue(e).toNumber());o.forEach((e,t)=>{const r=t/(o.length-1);i.addColorStop(r,e)}),r.fill={fill:i},delete r.fillGradientStops}super({text:e,style:r})}}return e.Application=t.Application,e.BitmapText=r,e.Container=i,e.Graphics=o,e.HTMLText=n,e.NinePatch=a,e.Sprite=class{constructor(e){this._image=null,this._image=e,e?"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.sprite=t.Sprite.from(e):e instanceof t.Texture&&(this.sprite=new t.Sprite(e)):this.sprite=new t.Sprite}set image(e){this._image!==e&&("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(this.sprite.texture&&this.sprite.texture.destroy(!1),this.sprite.texture=t.Texture.from(e)):e instanceof t.Texture&&(this.sprite.texture=e),this._image=e)}get image(){return this._image}},e.SpriteAnimation=class{constructor({frames:e}){this.animatedSprite=new t.AnimatedSprite(e)}play(){this.animatedSprite.play()}stop(){this.animatedSprite.stop()}gotoAndPlay(e){this.animatedSprite.gotoAndPlay(e)}gotoAndStop(e){this.animatedSprite.gotoAndStop(e)}set speed(e){this.animatedSprite.animationSpeed=e}get speed(){return this.animatedSprite.animationSpeed}},e.Text=s,e.TilingSprite=class{constructor(e){this._image=null,this._image=e,e?"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.tilingSprite=new t.TilingSprite(t.Texture.from(e)):e instanceof t.Texture&&(this.tilingSprite=new t.TilingSprite(e)):this.tilingSprite=new t.TilingSprite(t.Texture.EMPTY)}set image(e){this._image!==e&&("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.tilingSprite.texture=t.Texture.from(e):e instanceof t.Texture&&(this.tilingSprite.texture=e),this._image=e)}get image(){return this._image}},Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI);globalThis.EVA.rendererAdapter=globalThis.EVA.rendererAdapter||_EVA_IIFE_rendererAdapter;

@@ -78,3 +78,3 @@ 'use strict';

class NinePatch extends pixi_js.NineSliceSprite {
constructor(img, leftWidth, topHeight, rightWidth, bottomHeight) {
constructor(img, leftWidth, topHeight, rightWidth, bottomHeight, width, height) {
let texture;

@@ -93,2 +93,4 @@ if (img instanceof pixi_js.Texture) {

bottomHeight,
width,
height,
});

@@ -95,0 +97,0 @@ }

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pixi.js");class t extends e.BitmapText{constructor(e,t){const o=Object.assign({},t);if(o.strokeThickness){const e=o.stroke;o.stroke={color:e,width:o.strokeThickness},delete o.strokeThickness}if(o.dropShadow){const e={};null!=o.dropShadowColor&&(e.color=o.dropShadowColor),null!=o.dropShadowDistance&&(e.distance=o.dropShadowDistance),null!=o.dropShadowAngle&&(e.angle=o.dropShadowAngle),null!=o.dropShadowAlpha&&(e.alpha=o.dropShadowAlpha),null!=o.dropShadowBlur&&(e.blur=o.dropShadowBlur),o.dropShadow=e,delete o.dropShadowColor,delete o.dropShadowDistance,delete o.dropShadowAngle,delete o.dropShadowAlpha,delete o.dropShadowBlur}Array.isArray(o.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),o.fill=o.fill[0]),super({text:e,style:o})}}class o extends e.Container{}class i extends e.Graphics{}class r extends e.HTMLText{constructor(e){super("string"==typeof e?{text:e}:e||{})}}class s extends e.NineSliceSprite{constructor(t,o,i,r,s){let n;n=t instanceof e.Texture?t:e.Texture.from(t),super({texture:n,leftWidth:o,topHeight:i,rightWidth:r,bottomHeight:s})}}class n extends e.Text{constructor(t,o){if(o.strokeThickness){const e=o.stroke;o.stroke={color:e,width:o.strokeThickness},delete o.strokeThickness}if(o.dropShadow){const e={};null!=o.dropShadowColor&&(e.color=o.dropShadowColor),null!=o.dropShadowDistance&&(e.distance=o.dropShadowDistance),null!=o.dropShadowAngle&&(e.angle=o.dropShadowAngle),null!=o.dropShadowAlpha&&(e.alpha=o.dropShadowAlpha),null!=o.dropShadowBlur&&(e.blur=o.dropShadowBlur),o.dropShadow=e,delete o.dropShadowColor,delete o.dropShadowDistance,delete o.dropShadowAngle,delete o.dropShadowAlpha,delete o.dropShadowBlur}if(Array.isArray(o.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),o.fill=o.fill[0]),Array.isArray(o.fillGradientStops)){let t;null==o.fontSize?o.fontSize=e.TextStyle.defaultTextStyle.fontSize:t="string"==typeof o.fontSize?parseInt(o.fontSize,10):o.fontSize;const i=new e.FillGradient(0,0,0,1.7*t),r=o.fillGradientStops.map(t=>e.Color.shared.setValue(t).toNumber());r.forEach((e,t)=>{const o=t/(r.length-1);i.addColorStop(o,e)}),o.fill={fill:i},delete o.fillGradientStops}super({text:t,style:o})}}exports.Application=e.Application,exports.BitmapText=t,exports.Container=o,exports.Graphics=i,exports.HTMLText=r,exports.NinePatch=s,exports.Sprite=class{constructor(t){this._image=null,this._image=t,t?"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?this.sprite=e.Sprite.from(t):t instanceof e.Texture&&(this.sprite=new e.Sprite(t)):this.sprite=new e.Sprite}set image(t){this._image!==t&&("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?(this.sprite.texture&&this.sprite.texture.destroy(!1),this.sprite.texture=e.Texture.from(t)):t instanceof e.Texture&&(this.sprite.texture=t),this._image=t)}get image(){return this._image}},exports.SpriteAnimation=class{constructor({frames:t}){this.animatedSprite=new e.AnimatedSprite(t)}play(){this.animatedSprite.play()}stop(){this.animatedSprite.stop()}gotoAndPlay(e){this.animatedSprite.gotoAndPlay(e)}gotoAndStop(e){this.animatedSprite.gotoAndStop(e)}set speed(e){this.animatedSprite.animationSpeed=e}get speed(){return this.animatedSprite.animationSpeed}},exports.Text=n,exports.TilingSprite=class{constructor(t){this._image=null,this._image=t,t?"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?this.tilingSprite=new e.TilingSprite(e.Texture.from(t)):t instanceof e.Texture&&(this.tilingSprite=new e.TilingSprite(t)):this.tilingSprite=new e.TilingSprite(e.Texture.EMPTY)}set image(t){this._image!==t&&("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?this.tilingSprite.texture=e.Texture.from(t):t instanceof e.Texture&&(this.tilingSprite.texture=t),this._image=t)}get image(){return this._image}};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("pixi.js");class t extends e.BitmapText{constructor(e,t){const i=Object.assign({},t);if(i.strokeThickness){const e=i.stroke;i.stroke={color:e,width:i.strokeThickness},delete i.strokeThickness}if(i.dropShadow){const e={};null!=i.dropShadowColor&&(e.color=i.dropShadowColor),null!=i.dropShadowDistance&&(e.distance=i.dropShadowDistance),null!=i.dropShadowAngle&&(e.angle=i.dropShadowAngle),null!=i.dropShadowAlpha&&(e.alpha=i.dropShadowAlpha),null!=i.dropShadowBlur&&(e.blur=i.dropShadowBlur),i.dropShadow=e,delete i.dropShadowColor,delete i.dropShadowDistance,delete i.dropShadowAngle,delete i.dropShadowAlpha,delete i.dropShadowBlur}Array.isArray(i.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),i.fill=i.fill[0]),super({text:e,style:i})}}class i extends e.Container{}class o extends e.Graphics{}class r extends e.HTMLText{constructor(e){super("string"==typeof e?{text:e}:e||{})}}class s extends e.NineSliceSprite{constructor(t,i,o,r,s,n,a){let l;l=t instanceof e.Texture?t:e.Texture.from(t),super({texture:l,leftWidth:i,topHeight:o,rightWidth:r,bottomHeight:s,width:n,height:a})}}class n extends e.Text{constructor(t,i){if(i.strokeThickness){const e=i.stroke;i.stroke={color:e,width:i.strokeThickness},delete i.strokeThickness}if(i.dropShadow){const e={};null!=i.dropShadowColor&&(e.color=i.dropShadowColor),null!=i.dropShadowDistance&&(e.distance=i.dropShadowDistance),null!=i.dropShadowAngle&&(e.angle=i.dropShadowAngle),null!=i.dropShadowAlpha&&(e.alpha=i.dropShadowAlpha),null!=i.dropShadowBlur&&(e.blur=i.dropShadowBlur),i.dropShadow=e,delete i.dropShadowColor,delete i.dropShadowDistance,delete i.dropShadowAngle,delete i.dropShadowAlpha,delete i.dropShadowBlur}if(Array.isArray(i.fill)&&(console.warn("Eva.js Deprecation Warning: fill array is not supported in Eva.js v2."),i.fill=i.fill[0]),Array.isArray(i.fillGradientStops)){let t;null==i.fontSize?i.fontSize=e.TextStyle.defaultTextStyle.fontSize:t="string"==typeof i.fontSize?parseInt(i.fontSize,10):i.fontSize;const o=new e.FillGradient(0,0,0,1.7*t),r=i.fillGradientStops.map(t=>e.Color.shared.setValue(t).toNumber());r.forEach((e,t)=>{const i=t/(r.length-1);o.addColorStop(i,e)}),i.fill={fill:o},delete i.fillGradientStops}super({text:t,style:i})}}exports.Application=e.Application,exports.BitmapText=t,exports.Container=i,exports.Graphics=o,exports.HTMLText=r,exports.NinePatch=s,exports.Sprite=class{constructor(t){this._image=null,this._image=t,t?"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?this.sprite=e.Sprite.from(t):t instanceof e.Texture&&(this.sprite=new e.Sprite(t)):this.sprite=new e.Sprite}set image(t){this._image!==t&&("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?(this.sprite.texture&&this.sprite.texture.destroy(!1),this.sprite.texture=e.Texture.from(t)):t instanceof e.Texture&&(this.sprite.texture=t),this._image=t)}get image(){return this._image}},exports.SpriteAnimation=class{constructor({frames:t}){this.animatedSprite=new e.AnimatedSprite(t)}play(){this.animatedSprite.play()}stop(){this.animatedSprite.stop()}gotoAndPlay(e){this.animatedSprite.gotoAndPlay(e)}gotoAndStop(e){this.animatedSprite.gotoAndStop(e)}set speed(e){this.animatedSprite.animationSpeed=e}get speed(){return this.animatedSprite.animationSpeed}},exports.Text=n,exports.TilingSprite=class{constructor(t){this._image=null,this._image=t,t?"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?this.tilingSprite=new e.TilingSprite(e.Texture.from(t)):t instanceof e.Texture&&(this.tilingSprite=new e.TilingSprite(t)):this.tilingSprite=new e.TilingSprite(e.Texture.EMPTY)}set image(t){this._image!==t&&("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?this.tilingSprite.texture=e.Texture.from(t):t instanceof e.Texture&&(this.tilingSprite.texture=t),this._image=t)}get image(){return this._image}};

@@ -36,3 +36,3 @@ import { AnimatedSprite } from 'pixi.js';

export declare class NinePatch extends NineSliceSprite {
constructor(img: any, leftWidth: any, topHeight: any, rightWidth: any, bottomHeight: any);
constructor(img: any, leftWidth: any, topHeight: any, rightWidth: any, bottomHeight: any, width?: any, height?: any);
}

@@ -39,0 +39,0 @@

@@ -75,3 +75,3 @@ import { BitmapText as BitmapText$1, Container as Container$1, Graphics as Graphics$1, HTMLText as HTMLText$1, NineSliceSprite, Texture, Sprite as Sprite$1, AnimatedSprite, Text as Text$1, TextStyle, FillGradient, Color, TilingSprite as TilingSprite$1 } from 'pixi.js';

class NinePatch extends NineSliceSprite {
constructor(img, leftWidth, topHeight, rightWidth, bottomHeight) {
constructor(img, leftWidth, topHeight, rightWidth, bottomHeight, width, height) {
let texture;

@@ -90,2 +90,4 @@ if (img instanceof Texture) {

bottomHeight,
width,
height,
});

@@ -92,0 +94,0 @@ }

{
"name": "@eva/renderer-adapter",
"version": "2.0.2",
"version": "2.1.0-beta.1",
"description": "@eva/renderer-adapter",

@@ -5,0 +5,0 @@ "main": "index.js",