bard-legends-framework 1.12.2 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/electron-main.js +1 -1
- package/dist/electron-main.mjs +1 -1
- package/dist/index.d.mts +69 -22
- package/dist/index.d.ts +69 -22
- package/dist/index.js +55 -6
- package/dist/index.mjs +55 -6
- package/package.json +15 -12
package/dist/electron-main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var electron=require('electron'),T=require('electron-squirrel-startup'),w=require('path'),child_process=require('child_process'),p=require('crypto'),y=require('fs/promises'),V=require('write-file-atomic'),helpersLib=require('helpers-lib');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var T__default=/*#__PURE__*/_interopDefault(T);var w__default=/*#__PURE__*/_interopDefault(w);var p__default=/*#__PURE__*/_interopDefault(p);var y__default=/*#__PURE__*/_interopDefault(y);var V__default=/*#__PURE__*/_interopDefault(V);var v=Object.defineProperty;var n=(d,e)=>v(d,"name",{value:e,configurable:true});var h=class{static{n(this,"SingleAsyncQueue");}constructor(){this.ƀ
|
|
1
|
+
'use strict';var electron=require('electron'),T=require('electron-squirrel-startup'),w=require('path'),child_process=require('child_process'),p=require('crypto'),y=require('fs/promises'),V=require('write-file-atomic'),helpersLib=require('helpers-lib');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var T__default=/*#__PURE__*/_interopDefault(T);var w__default=/*#__PURE__*/_interopDefault(w);var p__default=/*#__PURE__*/_interopDefault(p);var y__default=/*#__PURE__*/_interopDefault(y);var V__default=/*#__PURE__*/_interopDefault(V);var v=Object.defineProperty;var n=(d,e)=>v(d,"name",{value:e,configurable:true});var h=class{static{n(this,"SingleAsyncQueue");}constructor(){this.ƀli=false,this.ƀjs=new helpersLib.Queue;}async enqueue(e){let t=this.ƀjs.empty,a=new Promise((i,r)=>this.ƀjs.add({operation:e,resolve:i,reject:r}));return t&&this.ƀki(),a}ƀki(){if(!this.ƀli){let e=[];for(;this.ƀjs.notEmpty;){let t=this.ƀjs.pop();t&&e.push(t);}e.length>0&&this.ƀkj(e);}}ƀkj(e){let t=e.pop();if(!t)throw new Error("No executing entry found");this.ƀli=true,t.operation().then(()=>{e.forEach(a=>a.resolve()),t.resolve(),this.ƀli=false,this.ƀki();}).catch(a=>{t.reject(a),e.length>0?this.ƀkj(e):(this.ƀli=false,this.ƀki());});}};var g=w__default.default.join(electron.app.getPath("userData"),"saves"),_=1,f=p__default.default.scryptSync("gdfgmhur%+/&ty@ertbdf423-secret","ga!sgnwq6^/&(roofvafnl_salt",32),c=class{static{n(this,"MainSaveLoad");}static{this.ƀdu=new Map;}static ƀez(e){let t=this.ƀdu.get(e);return t||(t=new h,this.ƀdu.set(e,t)),t}static async save(e,t){return this.ƀez(t).enqueue(()=>this.ƀmg(e,t))}static async load(e){return this.ƀjw(e)}static async ƀmg(e,t){let a=this.ƀet(),i=w__default.default.join(g,t);if(await y__default.default.mkdir(g,{recursive:true}),!e)await y__default.default.rm(i,{force:true});else {let r=this.ƀdj(e,f),s=this.ƀdj(a,f),u={version:_,data:{initializationVector:r.initializationVector,encrypted:r.encrypted,authTag:r.authTag},machineId:{initializationVector:s.initializationVector,encrypted:s.encrypted,authTag:s.authTag}};await V__default.default(i,JSON.stringify(u),{encoding:"utf-8"});}}static async ƀjw(e){let t=w__default.default.join(g,e),a;try{a=await y__default.default.readFile(t,"utf-8");}catch{return}let i=JSON.parse(a),r={version:i.version,data:{initializationVector:Buffer.from(i.data.initializationVector),encrypted:Buffer.from(i.data.encrypted),authTag:Buffer.from(i.data.authTag)},machineId:{initializationVector:Buffer.from(i.machineId.initializationVector),encrypted:Buffer.from(i.machineId.encrypted),authTag:Buffer.from(i.machineId.authTag)}},s=this.ƀcx(r.data.encrypted,f,r.data.initializationVector,r.data.authTag);if(this.ƀcx(r.machineId.encrypted,f,r.machineId.initializationVector,r.machineId.authTag)===this.ƀet())return s}static ƀdj(e,t){let a=p__default.default.randomBytes(12),i=p__default.default.createCipheriv("aes-256-gcm",t,a),r=Buffer.concat([i.update(e,"utf8"),i.final()]),s=i.getAuthTag();return {initializationVector:a,encrypted:r,authTag:s}}static ƀcx(e,t,a,i){let r=p__default.default.createDecipheriv("aes-256-gcm",t,a);return r.setAuthTag(i),Buffer.concat([r.update(e),r.final()]).toString("utf8")}static ƀet(){return process.platform==="win32"?child_process.execSync("wmic csproduct get uuid /format:value",{encoding:"utf8"}).split("=")[1].trim():process.platform==="darwin"?child_process.execSync("ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/{print $3}'",{encoding:"utf8"}).trim().replace(/"/g,""):child_process.execSync("cat /sys/class/dmi/id/product_uuid",{encoding:"utf8"}).trim()}};var I=class{static{n(this,"ElectronApp");}static start(e){process.env.ELECTRON_DISABLE_SECURITY_WARNINGS="true",T__default.default&&electron.app.quit();let t=process.env.ENVIRONMENT==="dev",a=n(()=>{let i=new electron.BrowserWindow({width:e.defaultWindowSize.width,height:e.defaultWindowSize.height,webPreferences:{preload:w__default.default.join(__dirname,"preload.js")},backgroundColor:"#000",show:false,autoHideMenuBar:true});i.once("ready-to-show",()=>{i.show();}),i.setMenu(null),MAIN_WINDOW_VITE_DEV_SERVER_URL?i.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL):i.loadFile(w__default.default.join(__dirname,`../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`)),this.ƀlb(i,e,t),e.onWindowCreated?.(i),t&&(i.setSize(1616,1616),i.setPosition(-7,0),i.webContents.openDevTools());},"createWindow");electron.app.on("ready",a),electron.app.on("window-all-closed",()=>{process.platform!=="darwin"&&electron.app.quit();}),electron.app.on("activate",()=>{electron.BrowserWindow.getAllWindows().length===0&&a();});}static ƀlb(e,t,a){electron.ipcMain.handle("save",async(i,r,s)=>{await c.save(r,s);}),electron.ipcMain.handle("load",async(i,r)=>c.load(r)),electron.ipcMain.handle("getOptions",async()=>({devMode:a,maxScreenResolution:t.maxWindowSize})),Object.entries(t.ipcHandlers??{}).forEach(([i,r])=>{electron.ipcMain.handle(i,(s,...u)=>r(...u));}),e.on("focus",()=>{e.webContents.send("onWindowFocus",true);}),e.on("blur",()=>{e.webContents.send("onWindowFocus",false);}),electron.ipcMain.on("rendererReady",()=>{e.webContents.send("onWindowFocus",e.isFocused());}),electron.ipcMain.on("setFullScreen",(i,r)=>{r?(e.setResizable(false),e.setMaximumSize(0,0),e.setFullScreen(true),e.setMovable(false),e.setMaximizable(false),e.setMinimizable(false),e.setMenuBarVisibility(false)):(e.setFullScreen(false),e.setResizable(true),a||(e.setMaximumSize(t.maxWindowSize.width,t.maxWindowSize.height),e.setMinimumSize(t.minWindowSize.width,t.minWindowSize.height),e.setSize(t.defaultWindowSize.width,t.defaultWindowSize.height),e.center()),e.setMovable(true),e.setMaximizable(true),e.setMinimizable(true),e.setMenuBarVisibility(true));}),electron.ipcMain.on("quit",()=>{electron.app.quit();});}};exports.ElectronApp=I;
|
package/dist/electron-main.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {app,BrowserWindow,ipcMain}from'electron';import T from'electron-squirrel-startup';import w from'path';import {execSync}from'child_process';import p from'crypto';import y from'fs/promises';import V from'write-file-atomic';import {Queue}from'helpers-lib';var v=Object.defineProperty;var n=(d,e)=>v(d,"name",{value:e,configurable:true});var h=class{static{n(this,"SingleAsyncQueue");}constructor(){this.ƀ
|
|
1
|
+
import {app,BrowserWindow,ipcMain}from'electron';import T from'electron-squirrel-startup';import w from'path';import {execSync}from'child_process';import p from'crypto';import y from'fs/promises';import V from'write-file-atomic';import {Queue}from'helpers-lib';var v=Object.defineProperty;var n=(d,e)=>v(d,"name",{value:e,configurable:true});var h=class{static{n(this,"SingleAsyncQueue");}constructor(){this.ƀli=false,this.ƀjs=new Queue;}async enqueue(e){let t=this.ƀjs.empty,a=new Promise((i,r)=>this.ƀjs.add({operation:e,resolve:i,reject:r}));return t&&this.ƀki(),a}ƀki(){if(!this.ƀli){let e=[];for(;this.ƀjs.notEmpty;){let t=this.ƀjs.pop();t&&e.push(t);}e.length>0&&this.ƀkj(e);}}ƀkj(e){let t=e.pop();if(!t)throw new Error("No executing entry found");this.ƀli=true,t.operation().then(()=>{e.forEach(a=>a.resolve()),t.resolve(),this.ƀli=false,this.ƀki();}).catch(a=>{t.reject(a),e.length>0?this.ƀkj(e):(this.ƀli=false,this.ƀki());});}};var g=w.join(app.getPath("userData"),"saves"),_=1,f=p.scryptSync("gdfgmhur%+/&ty@ertbdf423-secret","ga!sgnwq6^/&(roofvafnl_salt",32),c=class{static{n(this,"MainSaveLoad");}static{this.ƀdu=new Map;}static ƀez(e){let t=this.ƀdu.get(e);return t||(t=new h,this.ƀdu.set(e,t)),t}static async save(e,t){return this.ƀez(t).enqueue(()=>this.ƀmg(e,t))}static async load(e){return this.ƀjw(e)}static async ƀmg(e,t){let a=this.ƀet(),i=w.join(g,t);if(await y.mkdir(g,{recursive:true}),!e)await y.rm(i,{force:true});else {let r=this.ƀdj(e,f),s=this.ƀdj(a,f),u={version:_,data:{initializationVector:r.initializationVector,encrypted:r.encrypted,authTag:r.authTag},machineId:{initializationVector:s.initializationVector,encrypted:s.encrypted,authTag:s.authTag}};await V(i,JSON.stringify(u),{encoding:"utf-8"});}}static async ƀjw(e){let t=w.join(g,e),a;try{a=await y.readFile(t,"utf-8");}catch{return}let i=JSON.parse(a),r={version:i.version,data:{initializationVector:Buffer.from(i.data.initializationVector),encrypted:Buffer.from(i.data.encrypted),authTag:Buffer.from(i.data.authTag)},machineId:{initializationVector:Buffer.from(i.machineId.initializationVector),encrypted:Buffer.from(i.machineId.encrypted),authTag:Buffer.from(i.machineId.authTag)}},s=this.ƀcx(r.data.encrypted,f,r.data.initializationVector,r.data.authTag);if(this.ƀcx(r.machineId.encrypted,f,r.machineId.initializationVector,r.machineId.authTag)===this.ƀet())return s}static ƀdj(e,t){let a=p.randomBytes(12),i=p.createCipheriv("aes-256-gcm",t,a),r=Buffer.concat([i.update(e,"utf8"),i.final()]),s=i.getAuthTag();return {initializationVector:a,encrypted:r,authTag:s}}static ƀcx(e,t,a,i){let r=p.createDecipheriv("aes-256-gcm",t,a);return r.setAuthTag(i),Buffer.concat([r.update(e),r.final()]).toString("utf8")}static ƀet(){return process.platform==="win32"?execSync("wmic csproduct get uuid /format:value",{encoding:"utf8"}).split("=")[1].trim():process.platform==="darwin"?execSync("ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/{print $3}'",{encoding:"utf8"}).trim().replace(/"/g,""):execSync("cat /sys/class/dmi/id/product_uuid",{encoding:"utf8"}).trim()}};var I=class{static{n(this,"ElectronApp");}static start(e){process.env.ELECTRON_DISABLE_SECURITY_WARNINGS="true",T&&app.quit();let t=process.env.ENVIRONMENT==="dev",a=n(()=>{let i=new BrowserWindow({width:e.defaultWindowSize.width,height:e.defaultWindowSize.height,webPreferences:{preload:w.join(__dirname,"preload.js")},backgroundColor:"#000",show:false,autoHideMenuBar:true});i.once("ready-to-show",()=>{i.show();}),i.setMenu(null),MAIN_WINDOW_VITE_DEV_SERVER_URL?i.loadURL(MAIN_WINDOW_VITE_DEV_SERVER_URL):i.loadFile(w.join(__dirname,`../renderer/${MAIN_WINDOW_VITE_NAME}/index.html`)),this.ƀlb(i,e,t),e.onWindowCreated?.(i),t&&(i.setSize(1616,1616),i.setPosition(-7,0),i.webContents.openDevTools());},"createWindow");app.on("ready",a),app.on("window-all-closed",()=>{process.platform!=="darwin"&&app.quit();}),app.on("activate",()=>{BrowserWindow.getAllWindows().length===0&&a();});}static ƀlb(e,t,a){ipcMain.handle("save",async(i,r,s)=>{await c.save(r,s);}),ipcMain.handle("load",async(i,r)=>c.load(r)),ipcMain.handle("getOptions",async()=>({devMode:a,maxScreenResolution:t.maxWindowSize})),Object.entries(t.ipcHandlers??{}).forEach(([i,r])=>{ipcMain.handle(i,(s,...u)=>r(...u));}),e.on("focus",()=>{e.webContents.send("onWindowFocus",true);}),e.on("blur",()=>{e.webContents.send("onWindowFocus",false);}),ipcMain.on("rendererReady",()=>{e.webContents.send("onWindowFocus",e.isFocused());}),ipcMain.on("setFullScreen",(i,r)=>{r?(e.setResizable(false),e.setMaximumSize(0,0),e.setFullScreen(true),e.setMovable(false),e.setMaximizable(false),e.setMinimizable(false),e.setMenuBarVisibility(false)):(e.setFullScreen(false),e.setResizable(true),a||(e.setMaximumSize(t.maxWindowSize.width,t.maxWindowSize.height),e.setMinimumSize(t.minWindowSize.width,t.minWindowSize.height),e.setSize(t.defaultWindowSize.width,t.defaultWindowSize.height),e.center()),e.setMovable(true),e.setMaximizable(true),e.setMinimizable(true),e.setMenuBarVisibility(true));}),ipcMain.on("quit",()=>{app.quit();});}};export{I as ElectronApp};
|
package/dist/index.d.mts
CHANGED
|
@@ -465,23 +465,6 @@ declare abstract class DisplayObjectAttributes extends IDAttachable {
|
|
|
465
465
|
set aspectRatio(value: number);
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
declare class Filters {
|
|
469
|
-
get red(): number;
|
|
470
|
-
set red(value: number);
|
|
471
|
-
get green(): number;
|
|
472
|
-
set green(value: number);
|
|
473
|
-
get blue(): number;
|
|
474
|
-
set blue(value: number);
|
|
475
|
-
get brightness(): number;
|
|
476
|
-
set brightness(value: number);
|
|
477
|
-
get contrast(): number;
|
|
478
|
-
set contrast(value: number);
|
|
479
|
-
get blur(): Vector | undefined;
|
|
480
|
-
set blur(value: Vector | number | undefined);
|
|
481
|
-
constructor(_container: Pixi.Container);
|
|
482
|
-
removeColorFilter(): void;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
468
|
interface SpriteOptions {
|
|
486
469
|
readonly textureSize?: Vector;
|
|
487
470
|
readonly texturePosition?: Vector;
|
|
@@ -525,6 +508,23 @@ declare class Sprite extends Container {
|
|
|
525
508
|
download(): this;
|
|
526
509
|
}
|
|
527
510
|
|
|
511
|
+
declare class Filters {
|
|
512
|
+
get red(): number;
|
|
513
|
+
set red(value: number);
|
|
514
|
+
get green(): number;
|
|
515
|
+
set green(value: number);
|
|
516
|
+
get blue(): number;
|
|
517
|
+
set blue(value: number);
|
|
518
|
+
get brightness(): number;
|
|
519
|
+
set brightness(value: number);
|
|
520
|
+
get contrast(): number;
|
|
521
|
+
set contrast(value: number);
|
|
522
|
+
get blur(): Vector | undefined;
|
|
523
|
+
set blur(value: Vector | number | undefined);
|
|
524
|
+
constructor(_container: Pixi.Container);
|
|
525
|
+
removeColorFilter(): void;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
528
|
type LayoutStyle = LayoutStyles;
|
|
529
529
|
declare enum ContainerEventType {
|
|
530
530
|
Click = "click",
|
|
@@ -562,10 +562,6 @@ declare class Container extends DisplayObjectAttributes {
|
|
|
562
562
|
protected static allContainers: Map<number, Container>;
|
|
563
563
|
readonly filters: Filters;
|
|
564
564
|
protected addChildTo: Container;
|
|
565
|
-
protected defaultChildOptions: {
|
|
566
|
-
addUnder: boolean;
|
|
567
|
-
cropOverflowingParts: boolean;
|
|
568
|
-
};
|
|
569
565
|
constructor(pixiContainer?: Pixi.Container);
|
|
570
566
|
destroy(): void;
|
|
571
567
|
protected _applyScale(x: number, y: number): void;
|
|
@@ -644,6 +640,56 @@ declare class Graphics extends Container {
|
|
|
644
640
|
toSprite(partialOptions?: Partial<ToSpriteOptions>): Sprite;
|
|
645
641
|
}
|
|
646
642
|
|
|
643
|
+
declare class ParticleFilters {
|
|
644
|
+
constructor(_pixiParticle: Pixi.Particle);
|
|
645
|
+
get red(): number;
|
|
646
|
+
set red(value: number);
|
|
647
|
+
get green(): number;
|
|
648
|
+
set green(value: number);
|
|
649
|
+
get blue(): number;
|
|
650
|
+
set blue(value: number);
|
|
651
|
+
/**
|
|
652
|
+
* Approximated multiplicatively; particles are batched and cannot apply the additive brightness of Filters
|
|
653
|
+
*/
|
|
654
|
+
get brightness(): number;
|
|
655
|
+
set brightness(value: number);
|
|
656
|
+
get contrast(): number;
|
|
657
|
+
set contrast(value: number);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
declare class Particle extends DisplayObjectAttributes {
|
|
661
|
+
readonly pixiParticle: Pixi.Particle;
|
|
662
|
+
readonly filters: ParticleFilters;
|
|
663
|
+
protected _applyScale(x: number, y: number): void;
|
|
664
|
+
protected _getHoldFromModifier(holdFrom: Vector): Vector;
|
|
665
|
+
destroy(): void;
|
|
666
|
+
setTint(value: RGBColor): this;
|
|
667
|
+
get tint(): RGBColor;
|
|
668
|
+
set tint(value: RGBColor);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
type ParticleContainerOptions = Pick<Pixi.ParticleContainerOptions, 'dynamicProperties' | 'roundPixels'> & {
|
|
672
|
+
glowEffect?: GlowEffectOptions | undefined;
|
|
673
|
+
};
|
|
674
|
+
declare class ParticleContainer extends DisplayObjectAttributes {
|
|
675
|
+
static createByName(spriteName: SpriteID, options?: ParticleContainerOptions): ParticleContainer;
|
|
676
|
+
readonly pixiParticleContainer: Pixi.ParticleContainer;
|
|
677
|
+
readonly filters: Filters;
|
|
678
|
+
constructor(spriteDefinition: SpriteDefinition, options?: ParticleContainerOptions);
|
|
679
|
+
destroy(): void;
|
|
680
|
+
generate(addUnder?: boolean): Particle;
|
|
681
|
+
protected _applyScale(x: number, y: number): void;
|
|
682
|
+
protected _getHoldFromModifier(): Vector;
|
|
683
|
+
displayParent(parent: Container | number, partialOptions?: Partial<SetParentOptions>): this;
|
|
684
|
+
setBlendMode(value: BlendMode): this;
|
|
685
|
+
get blendMode(): BlendMode;
|
|
686
|
+
set blendMode(value: BlendMode);
|
|
687
|
+
/**
|
|
688
|
+
* Must be called after changing a static (non-dynamic) property of a particle
|
|
689
|
+
*/
|
|
690
|
+
update(): this;
|
|
691
|
+
}
|
|
692
|
+
|
|
647
693
|
declare class Placeholder extends Container {
|
|
648
694
|
constructor(size: Vector);
|
|
649
695
|
destroy(): void;
|
|
@@ -1365,6 +1411,7 @@ declare abstract class MovableEntity extends Entity {
|
|
|
1365
1411
|
readonly velocity: Variable<Vector>;
|
|
1366
1412
|
readonly rotationalSpeed: Variable<number>;
|
|
1367
1413
|
constructor();
|
|
1414
|
+
destroy(): void;
|
|
1368
1415
|
}
|
|
1369
1416
|
|
|
1370
1417
|
declare abstract class MovablePhysicsEntity extends PhysicsEntity {
|
|
@@ -1398,4 +1445,4 @@ declare global {
|
|
|
1398
1445
|
}
|
|
1399
1446
|
}
|
|
1400
1447
|
|
|
1401
|
-
export { AdvancedSound, type AdvancedSoundOptions, AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, type AudioAppearTransitionType, BORDER_MATERIAL_NAME, BardLegendsTestingHelper, type BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, type ElectronAppOptions, type ElectronBridge, ElectronGame, Entity, EntityDecorator, type EntityID, type ExplosionHit, FadeInContent, type FadeInContentOptions, FocusingAnimation, Game, Gateway, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, type KeyboardKeyInfo, KeyboardService, LayoutContainer, type LayoutStyle, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, Music, MusicPlayer, type MusicPlayerOptions, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, type PhysicsWorldID, Placeholder, type PolygonDefinition, type PolygonShapeData, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SOUND_TRANSITION_DURATION, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sound, type SoundDefinition, type SoundID, type SoundIDRegistry, type SoundOptions, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, type StateAnimationState, Text, type TextAlignment, type TextOptions, ThroughEmptyStateAnimation, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
|
1448
|
+
export { AdvancedSound, type AdvancedSoundOptions, AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, type AudioAppearTransitionType, BORDER_MATERIAL_NAME, BardLegendsTestingHelper, type BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, type ElectronAppOptions, type ElectronBridge, ElectronGame, Entity, EntityDecorator, type EntityID, type ExplosionHit, FadeInContent, type FadeInContentOptions, FocusingAnimation, Game, Gateway, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, type KeyboardKeyInfo, KeyboardService, LayoutContainer, type LayoutStyle, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, Music, MusicPlayer, type MusicPlayerOptions, type PartialTextOptions, Particle, ParticleContainer, type ParticleContainerOptions, ParticleFilters, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, type PhysicsWorldID, Placeholder, type PolygonDefinition, type PolygonShapeData, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SOUND_TRANSITION_DURATION, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sound, type SoundDefinition, type SoundID, type SoundIDRegistry, type SoundOptions, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, type StateAnimationState, Text, type TextAlignment, type TextOptions, ThroughEmptyStateAnimation, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
package/dist/index.d.ts
CHANGED
|
@@ -465,23 +465,6 @@ declare abstract class DisplayObjectAttributes extends IDAttachable {
|
|
|
465
465
|
set aspectRatio(value: number);
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
declare class Filters {
|
|
469
|
-
get red(): number;
|
|
470
|
-
set red(value: number);
|
|
471
|
-
get green(): number;
|
|
472
|
-
set green(value: number);
|
|
473
|
-
get blue(): number;
|
|
474
|
-
set blue(value: number);
|
|
475
|
-
get brightness(): number;
|
|
476
|
-
set brightness(value: number);
|
|
477
|
-
get contrast(): number;
|
|
478
|
-
set contrast(value: number);
|
|
479
|
-
get blur(): Vector | undefined;
|
|
480
|
-
set blur(value: Vector | number | undefined);
|
|
481
|
-
constructor(_container: Pixi.Container);
|
|
482
|
-
removeColorFilter(): void;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
468
|
interface SpriteOptions {
|
|
486
469
|
readonly textureSize?: Vector;
|
|
487
470
|
readonly texturePosition?: Vector;
|
|
@@ -525,6 +508,23 @@ declare class Sprite extends Container {
|
|
|
525
508
|
download(): this;
|
|
526
509
|
}
|
|
527
510
|
|
|
511
|
+
declare class Filters {
|
|
512
|
+
get red(): number;
|
|
513
|
+
set red(value: number);
|
|
514
|
+
get green(): number;
|
|
515
|
+
set green(value: number);
|
|
516
|
+
get blue(): number;
|
|
517
|
+
set blue(value: number);
|
|
518
|
+
get brightness(): number;
|
|
519
|
+
set brightness(value: number);
|
|
520
|
+
get contrast(): number;
|
|
521
|
+
set contrast(value: number);
|
|
522
|
+
get blur(): Vector | undefined;
|
|
523
|
+
set blur(value: Vector | number | undefined);
|
|
524
|
+
constructor(_container: Pixi.Container);
|
|
525
|
+
removeColorFilter(): void;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
528
|
type LayoutStyle = LayoutStyles;
|
|
529
529
|
declare enum ContainerEventType {
|
|
530
530
|
Click = "click",
|
|
@@ -562,10 +562,6 @@ declare class Container extends DisplayObjectAttributes {
|
|
|
562
562
|
protected static allContainers: Map<number, Container>;
|
|
563
563
|
readonly filters: Filters;
|
|
564
564
|
protected addChildTo: Container;
|
|
565
|
-
protected defaultChildOptions: {
|
|
566
|
-
addUnder: boolean;
|
|
567
|
-
cropOverflowingParts: boolean;
|
|
568
|
-
};
|
|
569
565
|
constructor(pixiContainer?: Pixi.Container);
|
|
570
566
|
destroy(): void;
|
|
571
567
|
protected _applyScale(x: number, y: number): void;
|
|
@@ -644,6 +640,56 @@ declare class Graphics extends Container {
|
|
|
644
640
|
toSprite(partialOptions?: Partial<ToSpriteOptions>): Sprite;
|
|
645
641
|
}
|
|
646
642
|
|
|
643
|
+
declare class ParticleFilters {
|
|
644
|
+
constructor(_pixiParticle: Pixi.Particle);
|
|
645
|
+
get red(): number;
|
|
646
|
+
set red(value: number);
|
|
647
|
+
get green(): number;
|
|
648
|
+
set green(value: number);
|
|
649
|
+
get blue(): number;
|
|
650
|
+
set blue(value: number);
|
|
651
|
+
/**
|
|
652
|
+
* Approximated multiplicatively; particles are batched and cannot apply the additive brightness of Filters
|
|
653
|
+
*/
|
|
654
|
+
get brightness(): number;
|
|
655
|
+
set brightness(value: number);
|
|
656
|
+
get contrast(): number;
|
|
657
|
+
set contrast(value: number);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
declare class Particle extends DisplayObjectAttributes {
|
|
661
|
+
readonly pixiParticle: Pixi.Particle;
|
|
662
|
+
readonly filters: ParticleFilters;
|
|
663
|
+
protected _applyScale(x: number, y: number): void;
|
|
664
|
+
protected _getHoldFromModifier(holdFrom: Vector): Vector;
|
|
665
|
+
destroy(): void;
|
|
666
|
+
setTint(value: RGBColor): this;
|
|
667
|
+
get tint(): RGBColor;
|
|
668
|
+
set tint(value: RGBColor);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
type ParticleContainerOptions = Pick<Pixi.ParticleContainerOptions, 'dynamicProperties' | 'roundPixels'> & {
|
|
672
|
+
glowEffect?: GlowEffectOptions | undefined;
|
|
673
|
+
};
|
|
674
|
+
declare class ParticleContainer extends DisplayObjectAttributes {
|
|
675
|
+
static createByName(spriteName: SpriteID, options?: ParticleContainerOptions): ParticleContainer;
|
|
676
|
+
readonly pixiParticleContainer: Pixi.ParticleContainer;
|
|
677
|
+
readonly filters: Filters;
|
|
678
|
+
constructor(spriteDefinition: SpriteDefinition, options?: ParticleContainerOptions);
|
|
679
|
+
destroy(): void;
|
|
680
|
+
generate(addUnder?: boolean): Particle;
|
|
681
|
+
protected _applyScale(x: number, y: number): void;
|
|
682
|
+
protected _getHoldFromModifier(): Vector;
|
|
683
|
+
displayParent(parent: Container | number, partialOptions?: Partial<SetParentOptions>): this;
|
|
684
|
+
setBlendMode(value: BlendMode): this;
|
|
685
|
+
get blendMode(): BlendMode;
|
|
686
|
+
set blendMode(value: BlendMode);
|
|
687
|
+
/**
|
|
688
|
+
* Must be called after changing a static (non-dynamic) property of a particle
|
|
689
|
+
*/
|
|
690
|
+
update(): this;
|
|
691
|
+
}
|
|
692
|
+
|
|
647
693
|
declare class Placeholder extends Container {
|
|
648
694
|
constructor(size: Vector);
|
|
649
695
|
destroy(): void;
|
|
@@ -1365,6 +1411,7 @@ declare abstract class MovableEntity extends Entity {
|
|
|
1365
1411
|
readonly velocity: Variable<Vector>;
|
|
1366
1412
|
readonly rotationalSpeed: Variable<number>;
|
|
1367
1413
|
constructor();
|
|
1414
|
+
destroy(): void;
|
|
1368
1415
|
}
|
|
1369
1416
|
|
|
1370
1417
|
declare abstract class MovablePhysicsEntity extends PhysicsEntity {
|
|
@@ -1398,4 +1445,4 @@ declare global {
|
|
|
1398
1445
|
}
|
|
1399
1446
|
}
|
|
1400
1447
|
|
|
1401
|
-
export { AdvancedSound, type AdvancedSoundOptions, AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, type AudioAppearTransitionType, BORDER_MATERIAL_NAME, BardLegendsTestingHelper, type BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, type ElectronAppOptions, type ElectronBridge, ElectronGame, Entity, EntityDecorator, type EntityID, type ExplosionHit, FadeInContent, type FadeInContentOptions, FocusingAnimation, Game, Gateway, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, type KeyboardKeyInfo, KeyboardService, LayoutContainer, type LayoutStyle, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, Music, MusicPlayer, type MusicPlayerOptions, type PartialTextOptions, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, type PhysicsWorldID, Placeholder, type PolygonDefinition, type PolygonShapeData, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SOUND_TRANSITION_DURATION, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sound, type SoundDefinition, type SoundID, type SoundIDRegistry, type SoundOptions, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, type StateAnimationState, Text, type TextAlignment, type TextOptions, ThroughEmptyStateAnimation, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|
|
1448
|
+
export { AdvancedSound, type AdvancedSoundOptions, AnimationFlicker, AnimationInterpolationFunctions, type AnimationOptions, Animations, AnimationsCompletionHandlingType, Animator, type AnimatorAnimation, type AssetDefinition, type AudioAppearTransitionType, BORDER_MATERIAL_NAME, BardLegendsTestingHelper, type BlendMode, type BorderProperties, Camera, CameraGateway, type CircleShapeData, ClosestAvailableSpaceHelper, type CollisionDetails, type CollisionReport, Container, ContainerEventType, ControllerDecorator, type CreateDashedLineOptions, type CreatePhysicsWorldRequestDTO, Cursor, DEFAULT_SHADER_RESOLUTION, DeltaTime, DisplayObjectArray, type DisplayObjectArrayOptions, type DropShadowOptions, type ElectronAppOptions, type ElectronBridge, ElectronGame, Entity, EntityDecorator, type EntityID, type ExplosionHit, FadeInContent, type FadeInContentOptions, FocusingAnimation, Game, Gateway, type GlowEffectOptions, type GlowOptions, type GlowingShapeDefinition, Graphics, type HitTestOptions, ImmovablePhysicsEntity, type InteractingBodyGroups, type KeyboardKeyInfo, KeyboardService, LayoutContainer, type LayoutStyle, type MapSizeDTO, type MaterialContactDefinition, type MaterialDefinition, MenuEntity, type MenuOptions, MenuUI, MenuView, MouseService, MouseTargetFocusService, MovableEntity, MovablePhysicsEntity, Music, MusicPlayer, type MusicPlayerOptions, type PartialTextOptions, Particle, ParticleContainer, type ParticleContainerOptions, ParticleFilters, PathFinder, type PathFinderResult, type PhysicsBodyDTO, PhysicsEntity, type PhysicsEntityDefinition, type PhysicsExplosionOptions, PhysicsGateway, PhysicsShapeType, type PhysicsWorldID, Placeholder, type PolygonDefinition, type PolygonShapeData, ROTATIONAL_SPEED_LIMIT, type RayCast, type RayCastHit, ReAnimateHandlingType, type RectangleShapeData, RichText, type RichTextOptions, type RichTextRectangleCut, type RichTextStyles, SOUND_TRANSITION_DURATION, SPEED_LIMIT, Scene, SceneDecorator, ScrollAreaUI, ScrollDirection, type ScrollInContentOptions, ScrollMaskUI, Service, ServiceDecorator, type SetParentOptions, type ShapeDefinition, SingletonEntity, SlideInContent, SlideInContentByIndex, SlideStateAnimation, SlideStateAnimationState, Sound, type SoundDefinition, type SoundID, type SoundIDRegistry, type SoundOptions, Sprite, type SpriteDefinition, type SpriteID, type SpriteIDRegistry, StateAnimation, type StateAnimationOptions, type StateAnimationState, Text, type TextAlignment, type TextOptions, ThroughEmptyStateAnimation, UpdatableContainer, UpdateCycle, VectorFieldPathFinder, VectorSet, View, ViewDecorator, type ViewDecoratorMeta };
|