@rpgjs/client 4.0.0-beta.3 → 4.0.0-beta.4
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/lib/Components/AbstractComponent.d.ts +2 -2
- package/lib/Components/BarComponent.d.ts +1 -1
- package/lib/Components/BarComponent.js +1 -1
- package/lib/Components/Component.d.ts +2 -2
- package/lib/Components/Component.js +8 -8
- package/lib/Components/DebugComponent.d.ts +1 -1
- package/lib/Components/DebugComponent.js +1 -1
- package/lib/Components/ImageComponent.d.ts +1 -1
- package/lib/Components/ImageComponent.js +1 -1
- package/lib/Components/ShapeComponent.d.ts +1 -1
- package/lib/Components/ShapeComponent.js +1 -1
- package/lib/Components/TextComponent.d.ts +1 -1
- package/lib/Components/TextComponent.js +1 -1
- package/lib/Components/TileComponent.d.ts +1 -1
- package/lib/Components/TileComponent.js +3 -3
- package/lib/Effects/Animation.d.ts +2 -2
- package/lib/Effects/Animation.js +4 -4
- package/lib/Effects/Spinner.d.ts +1 -1
- package/lib/Effects/Timeline.d.ts +1 -1
- package/lib/Effects/TransitionScene.d.ts +1 -1
- package/lib/Effects/TransitionScene.js +1 -1
- package/lib/GameEngine.d.ts +2 -2
- package/lib/Interfaces/Character.d.ts +1 -1
- package/lib/KeyboardControls.d.ts +1 -1
- package/lib/Presets/AnimationSpritesheet.js +1 -1
- package/lib/Renderer.d.ts +1 -1
- package/lib/Renderer.js +5 -5
- package/lib/Resources.d.ts +1 -1
- package/lib/RpgClient.d.ts +3 -3
- package/lib/RpgClientEngine.d.ts +4 -4
- package/lib/RpgClientEngine.js +9 -9
- package/lib/RpgGui.js +3 -3
- package/lib/Scene/Map.d.ts +4 -4
- package/lib/Scene/Map.js +6 -6
- package/lib/Scene/Scene.d.ts +4 -4
- package/lib/Scene/Scene.js +2 -2
- package/lib/Sound/RpgSound.js +2 -2
- package/lib/Sound/Sounds.js +1 -1
- package/lib/Sprite/Character.d.ts +2 -2
- package/lib/Sprite/Character.js +3 -3
- package/lib/Sprite/Player.d.ts +1 -1
- package/lib/Sprite/Player.js +1 -1
- package/lib/Sprite/Spritesheets.d.ts +1 -1
- package/lib/Sprite/Spritesheets.js +1 -1
- package/lib/Tilemap/CommonLayer.d.ts +1 -1
- package/lib/Tilemap/ImageLayer.d.ts +1 -1
- package/lib/Tilemap/ImageLayer.js +1 -1
- package/lib/Tilemap/Tile.d.ts +1 -1
- package/lib/Tilemap/TileLayer.d.ts +3 -3
- package/lib/Tilemap/TileLayer.js +2 -2
- package/lib/Tilemap/TileSet.js +2 -2
- package/lib/Tilemap/index.d.ts +4 -4
- package/lib/Tilemap/index.js +4 -4
- package/lib/clientEntryPoint.d.ts +1 -1
- package/lib/clientEntryPoint.js +2 -2
- package/lib/index.d.ts +16 -16
- package/lib/index.js +16 -16
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentObject } from "@rpgjs/types";
|
|
2
|
-
import { RpgComponent } from "./Component";
|
|
3
|
-
import { GameEngineClient } from "../GameEngine";
|
|
2
|
+
import { RpgComponent } from "./Component.js";
|
|
3
|
+
import { GameEngineClient } from "../GameEngine.js";
|
|
4
4
|
import { Container, Graphics, Sprite } from "pixi.js";
|
|
5
5
|
export type CellInfo = {
|
|
6
6
|
x?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BarComponentObject } from "@rpgjs/types";
|
|
2
|
-
import { AbstractComponent, CellInfo } from "./AbstractComponent";
|
|
2
|
+
import { AbstractComponent, CellInfo } from "./AbstractComponent.js";
|
|
3
3
|
import { Container } from "pixi.js";
|
|
4
4
|
export declare class BarComponent extends AbstractComponent<BarComponentObject, Container> {
|
|
5
5
|
static readonly id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Utils, transitionColor } from "@rpgjs/common";
|
|
2
|
-
import { AbstractComponent } from "./AbstractComponent";
|
|
2
|
+
import { AbstractComponent } from "./AbstractComponent.js";
|
|
3
3
|
import get from 'lodash.get';
|
|
4
4
|
import { Subject, takeUntil } from "rxjs";
|
|
5
5
|
import { Graphics, Text } from "pixi.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Direction, RpgCommonPlayer, RpgShape } from "@rpgjs/common";
|
|
2
2
|
import { LayoutPositionEnum, PositionXY } from "@rpgjs/types";
|
|
3
|
-
import { Scene } from "../Scene/Scene";
|
|
3
|
+
import { Scene } from "../Scene/Scene.js";
|
|
4
4
|
import { Container } from "pixi.js";
|
|
5
5
|
export interface IComponent {
|
|
6
6
|
id: string;
|
|
@@ -24,7 +24,7 @@ export declare class RpgComponent<T = any> extends Container {
|
|
|
24
24
|
private layoutNotifierClear;
|
|
25
25
|
private registerComponents;
|
|
26
26
|
private dragMode?;
|
|
27
|
-
readonly game: import("../GameEngine").GameEngineClient;
|
|
27
|
+
readonly game: import("../GameEngine.js").GameEngineClient;
|
|
28
28
|
readonly id: string;
|
|
29
29
|
constructor(data: RpgCommonPlayer | RpgShape, scene: Scene);
|
|
30
30
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { HookClient, RpgPlugin, RpgShape, Utils } from "@rpgjs/common";
|
|
2
2
|
import { PlayerType } from "@rpgjs/types";
|
|
3
3
|
import { Subject, map, filter, tap, distinctUntilChanged, takeUntil, finalize } from "rxjs";
|
|
4
|
-
import { log } from "../Logger";
|
|
5
|
-
import { RpgSprite } from "../Sprite/Player";
|
|
6
|
-
import { BarComponent } from "./BarComponent";
|
|
7
|
-
import { ShapeComponent } from "./ShapeComponent";
|
|
8
|
-
import { DebugComponent } from "./DebugComponent";
|
|
9
|
-
import { ImageComponent } from "./ImageComponent";
|
|
10
|
-
import { TextComponent } from "./TextComponent";
|
|
11
|
-
import { TileComponent } from "./TileComponent";
|
|
4
|
+
import { log } from "../Logger.js";
|
|
5
|
+
import { RpgSprite } from "../Sprite/Player.js";
|
|
6
|
+
import { BarComponent } from "./BarComponent.js";
|
|
7
|
+
import { ShapeComponent } from "./ShapeComponent.js";
|
|
8
|
+
import { DebugComponent } from "./DebugComponent.js";
|
|
9
|
+
import { ImageComponent } from "./ImageComponent.js";
|
|
10
|
+
import { TextComponent } from "./TextComponent.js";
|
|
11
|
+
import { TileComponent } from "./TileComponent.js";
|
|
12
12
|
import { Container, Sprite } from "pixi.js";
|
|
13
13
|
const layoutObject = {
|
|
14
14
|
lines: []
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractComponent, CellInfo } from "./AbstractComponent";
|
|
1
|
+
import { AbstractComponent, CellInfo } from "./AbstractComponent.js";
|
|
2
2
|
import { DebugComponentObject } from "@rpgjs/types";
|
|
3
3
|
import { Graphics } from "pixi.js";
|
|
4
4
|
export declare class DebugComponent extends AbstractComponent<DebugComponentObject, Graphics> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Container } from "pixi.js";
|
|
2
2
|
import { ImageComponentObject } from "@rpgjs/types";
|
|
3
|
-
import { AbstractComponent, CellInfo } from "./AbstractComponent";
|
|
3
|
+
import { AbstractComponent, CellInfo } from "./AbstractComponent.js";
|
|
4
4
|
export declare class ImageComponent extends AbstractComponent<ImageComponentObject, Container> {
|
|
5
5
|
static readonly id: string;
|
|
6
6
|
cacheParams: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractComponent, CellInfo } from "./AbstractComponent";
|
|
1
|
+
import { AbstractComponent, CellInfo } from "./AbstractComponent.js";
|
|
2
2
|
import { ShapeComponentObject } from "@rpgjs/types";
|
|
3
3
|
import { Graphics } from "pixi.js";
|
|
4
4
|
export declare class ShapeComponent extends AbstractComponent<ShapeComponentObject, Graphics> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextComponentObject } from "@rpgjs/types";
|
|
2
2
|
import { Graphics, Text } from "pixi.js";
|
|
3
|
-
import { AbstractComponent } from "./AbstractComponent";
|
|
3
|
+
import { AbstractComponent } from "./AbstractComponent.js";
|
|
4
4
|
export declare class TextComponent extends AbstractComponent<TextComponentObject, Text> {
|
|
5
5
|
static readonly id: string;
|
|
6
6
|
cacheParams: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TileComponentObject } from "@rpgjs/types";
|
|
2
|
-
import { AbstractComponent, CellInfo } from "./AbstractComponent";
|
|
2
|
+
import { AbstractComponent, CellInfo } from "./AbstractComponent.js";
|
|
3
3
|
import { Container } from "pixi.js";
|
|
4
4
|
export declare class TileComponent extends AbstractComponent<TileComponentObject, Container> {
|
|
5
5
|
static readonly id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Tile from "../Tilemap/Tile";
|
|
2
|
-
import TileLayer from "../Tilemap/TileLayer";
|
|
3
|
-
import { AbstractComponent } from "./AbstractComponent";
|
|
1
|
+
import Tile from "../Tilemap/Tile.js";
|
|
2
|
+
import TileLayer from "../Tilemap/TileLayer.js";
|
|
3
|
+
import { AbstractComponent } from "./AbstractComponent.js";
|
|
4
4
|
class TileComponent extends AbstractComponent {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SpritesheetOptions, TextureOptions, AnimationFrames, FrameOptions, TransformOptions } from '../Sprite/Spritesheet';
|
|
2
|
-
import { RpgComponent } from '../Components/Component';
|
|
1
|
+
import { SpritesheetOptions, TextureOptions, AnimationFrames, FrameOptions, TransformOptions } from '../Sprite/Spritesheet.js';
|
|
2
|
+
import { RpgComponent } from '../Components/Component.js';
|
|
3
3
|
import { Sprite, Container, Texture } from 'pixi.js';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
type Image = {
|
package/lib/Effects/Animation.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Utils } from '@rpgjs/common';
|
|
2
|
-
import { spritesheets } from '../Sprite/Spritesheets';
|
|
3
|
-
import { log } from '../Logger';
|
|
4
|
-
import { RpgSound } from '../Sound/RpgSound';
|
|
2
|
+
import { spritesheets } from '../Sprite/Spritesheets.js';
|
|
3
|
+
import { log } from '../Logger.js';
|
|
4
|
+
import { RpgSound } from '../Sound/RpgSound.js';
|
|
5
5
|
import { Sprite, Container, Texture, Rectangle } from 'pixi.js';
|
|
6
|
-
import { Animation as AnimationEnum } from './AnimationCharacter';
|
|
6
|
+
import { Animation as AnimationEnum } from './AnimationCharacter.js';
|
|
7
7
|
import { BehaviorSubject } from 'rxjs';
|
|
8
8
|
const { isFunction, arrayEquals } = Utils;
|
|
9
9
|
export class Animation extends Sprite {
|
package/lib/Effects/Spinner.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformOptions, FrameOptions } from '../Sprite/Spritesheet';
|
|
1
|
+
import { TransformOptions, FrameOptions } from '../Sprite/Spritesheet.js';
|
|
2
2
|
export declare const Ease: {
|
|
3
3
|
linear(t: number, b: number, c: number, d: number): number;
|
|
4
4
|
easeInQuad(t: number, b: number, c: number, d: number): number;
|
package/lib/GameEngine.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RpgCommonGame, RpgCommonPlayer, RpgShape } from "@rpgjs/common";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
|
-
import { RpgRenderer } from "./Renderer";
|
|
4
|
-
import { RpgClientEngine } from "./RpgClientEngine";
|
|
3
|
+
import { RpgRenderer } from "./Renderer.js";
|
|
4
|
+
import { RpgClientEngine } from "./RpgClientEngine.js";
|
|
5
5
|
import { ObjectFixture } from "@rpgjs/types";
|
|
6
6
|
export declare class GameEngineClient extends RpgCommonGame {
|
|
7
7
|
playerId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Direction } from '@rpgjs/common';
|
|
2
|
-
import { Animation } from '../Effects/AnimationCharacter';
|
|
2
|
+
import { Animation } from '../Effects/AnimationCharacter.js';
|
|
3
3
|
export const RMSpritesheet = (framesWidth, framesHeight, frameStand = 1) => {
|
|
4
4
|
const frameY = direction => {
|
|
5
5
|
return {
|
package/lib/Renderer.d.ts
CHANGED
package/lib/Renderer.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RpgPlugin, HookClient } from '@rpgjs/common';
|
|
2
|
-
import { SceneMap } from './Scene/Map';
|
|
3
|
-
import { Scene as PresetScene } from './Presets/Scene';
|
|
4
|
-
import { RpgGui } from './RpgGui';
|
|
5
|
-
import { TransitionScene } from './Effects/TransitionScene';
|
|
2
|
+
import { SceneMap } from './Scene/Map.js';
|
|
3
|
+
import { Scene as PresetScene } from './Presets/Scene.js';
|
|
4
|
+
import { RpgGui } from './RpgGui.js';
|
|
5
|
+
import { TransitionScene } from './Effects/TransitionScene.js';
|
|
6
6
|
import { Subject, forkJoin } from 'rxjs';
|
|
7
|
-
import { SpinnerGraphic } from './Effects/Spinner';
|
|
7
|
+
import { SpinnerGraphic } from './Effects/Spinner.js';
|
|
8
8
|
import { autoDetectRenderer, Container, Graphics } from 'pixi.js';
|
|
9
9
|
export var TransitionMode;
|
|
10
10
|
(function (TransitionMode) {
|
package/lib/Resources.d.ts
CHANGED
package/lib/RpgClient.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModuleType } from '@rpgjs/common';
|
|
2
|
-
import { SceneMap } from './Scene/Map';
|
|
3
|
-
import { RpgClientEngine } from './RpgClientEngine';
|
|
4
|
-
import { RpgComponent } from './Components/Component';
|
|
2
|
+
import { SceneMap } from './Scene/Map.js';
|
|
3
|
+
import { RpgClientEngine } from './RpgClientEngine.js';
|
|
4
|
+
import { RpgComponent } from './Components/Component.js';
|
|
5
5
|
import { Loader } from 'pixi.js';
|
|
6
6
|
type RpgClass<T = any> = new (...args: any[]) => T;
|
|
7
7
|
export interface RpgClientEngineHooks {
|
package/lib/RpgClientEngine.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { KeyboardControls } from './KeyboardControls';
|
|
2
|
-
import { RpgRenderer } from './Renderer';
|
|
1
|
+
import { KeyboardControls } from './KeyboardControls.js';
|
|
2
|
+
import { RpgRenderer } from './Renderer.js';
|
|
3
3
|
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { RpgCommonPlayer, Control } from '@rpgjs/common';
|
|
5
|
-
import { GameEngineClient } from './GameEngine';
|
|
6
|
-
import { Scene } from './Scene/Scene';
|
|
5
|
+
import { GameEngineClient } from './GameEngine.js';
|
|
6
|
+
import { Scene } from './Scene/Scene.js';
|
|
7
7
|
import { constructor, ObjectFixtureList, Tick } from '@rpgjs/types';
|
|
8
8
|
import * as PIXI from 'pixi.js';
|
|
9
9
|
export declare class RpgClientEngine {
|
package/lib/RpgClientEngine.js
CHANGED
|
@@ -4,19 +4,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { KeyboardControls } from './KeyboardControls';
|
|
8
|
-
import { RpgRenderer } from './Renderer';
|
|
9
|
-
import { _initSpritesheet, spritesheets } from './Sprite/Spritesheets';
|
|
10
|
-
import { _initSound, sounds } from './Sound/Sounds';
|
|
7
|
+
import { KeyboardControls } from './KeyboardControls.js';
|
|
8
|
+
import { RpgRenderer } from './Renderer.js';
|
|
9
|
+
import { _initSpritesheet, spritesheets } from './Sprite/Spritesheets.js';
|
|
10
|
+
import { _initSound, sounds } from './Sound/Sounds.js';
|
|
11
11
|
import { World } from 'simple-room-client';
|
|
12
12
|
import { BehaviorSubject, Subject, lastValueFrom } from 'rxjs';
|
|
13
13
|
import { ajax } from 'rxjs/ajax';
|
|
14
|
-
import { RpgGui } from './RpgGui';
|
|
14
|
+
import { RpgGui } from './RpgGui.js';
|
|
15
15
|
import { PrebuiltGui, Utils, RpgPlugin, HookClient, RpgCommonMap, Scheduler, } from '@rpgjs/common';
|
|
16
|
-
import { RpgSound } from './Sound/RpgSound';
|
|
17
|
-
import { Spritesheet } from './Sprite/Spritesheet';
|
|
18
|
-
import { log } from './Logger';
|
|
19
|
-
import { Sound } from './Sound/Sound';
|
|
16
|
+
import { RpgSound } from './Sound/RpgSound.js';
|
|
17
|
+
import { Spritesheet } from './Sprite/Spritesheet.js';
|
|
18
|
+
import { log } from './Logger.js';
|
|
19
|
+
import { Sound } from './Sound/Sound.js';
|
|
20
20
|
import { PlayerType, SocketEvents, SocketMethods } from '@rpgjs/types';
|
|
21
21
|
import { Assets, utils } from 'pixi.js';
|
|
22
22
|
import * as PIXI from 'pixi.js';
|
package/lib/RpgGui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import RpgGuiCompiled from './RpgGuiCompiled';
|
|
1
|
+
import RpgGuiCompiled from './RpgGuiCompiled.js';
|
|
2
2
|
import { createApp } from 'vue';
|
|
3
3
|
import { map } from 'rxjs';
|
|
4
|
-
import { RpgSound } from './Sound/RpgSound';
|
|
5
|
-
import { RpgResource } from './index';
|
|
4
|
+
import { RpgSound } from './Sound/RpgSound.js';
|
|
5
|
+
import { RpgResource } from './index.js';
|
|
6
6
|
class Gui {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.gui = {};
|
package/lib/Scene/Map.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RpgShape, RpgCommonPlayer } from '@rpgjs/common';
|
|
2
|
-
import TileMap from '../Tilemap';
|
|
2
|
+
import TileMap from '../Tilemap/index.js';
|
|
3
3
|
import { Viewport } from 'pixi-viewport';
|
|
4
|
-
import { Scene, SceneSpriteLogic } from './Scene';
|
|
5
|
-
import { GameEngineClient } from '../GameEngine';
|
|
4
|
+
import { Scene, SceneSpriteLogic } from './Scene.js';
|
|
5
|
+
import { GameEngineClient } from '../GameEngine.js';
|
|
6
6
|
import { TiledMap } from '@rpgjs/tiled';
|
|
7
|
-
import { RpgComponent } from '../Components/Component';
|
|
7
|
+
import { RpgComponent } from '../Components/Component.js';
|
|
8
8
|
import { CameraOptions } from '@rpgjs/types';
|
|
9
9
|
import { Container, IRenderer, DisplayObjectEvents } from 'pixi.js';
|
|
10
10
|
interface MapObject extends TiledMap {
|
package/lib/Scene/Map.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { RpgCommonMap, RpgPlugin, HookClient, Utils, RpgCommonPlayer } from '@rpgjs/common';
|
|
2
|
-
import TileMap from '../Tilemap';
|
|
2
|
+
import TileMap from '../Tilemap/index.js';
|
|
3
3
|
import { Viewport } from 'pixi-viewport';
|
|
4
|
-
import { Scene } from './Scene';
|
|
5
|
-
import { spritesheets } from '../Sprite/Spritesheets';
|
|
6
|
-
import { RpgSound } from '../Sound/RpgSound';
|
|
4
|
+
import { Scene } from './Scene.js';
|
|
5
|
+
import { spritesheets } from '../Sprite/Spritesheets.js';
|
|
6
|
+
import { RpgSound } from '../Sound/RpgSound.js';
|
|
7
7
|
import { TiledLayerType } from '@rpgjs/tiled';
|
|
8
|
-
import { RpgComponent } from '../Components/Component';
|
|
8
|
+
import { RpgComponent } from '../Components/Component.js';
|
|
9
9
|
import { Assets, Container, Point } from 'pixi.js';
|
|
10
|
-
import { EventLayer } from './EventLayer';
|
|
10
|
+
import { EventLayer } from './EventLayer.js';
|
|
11
11
|
class SceneMap extends Scene {
|
|
12
12
|
constructor(game, renderer, options = {}) {
|
|
13
13
|
super(game);
|
package/lib/Scene/Scene.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import RpgSprite from '../Sprite/Character';
|
|
2
|
-
import { Animation } from '../Effects/Animation';
|
|
1
|
+
import RpgSprite from '../Sprite/Character.js';
|
|
2
|
+
import { Animation } from '../Effects/Animation.js';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { GameEngineClient } from '../GameEngine';
|
|
5
|
-
import { RpgComponent } from '../Components/Component';
|
|
4
|
+
import { GameEngineClient } from '../GameEngine.js';
|
|
5
|
+
import { RpgComponent } from '../Components/Component.js';
|
|
6
6
|
import { Controls } from '@rpgjs/types';
|
|
7
7
|
import { Container } from 'pixi.js';
|
|
8
8
|
export type SceneObservableData = {
|
package/lib/Scene/Scene.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RpgPlugin, HookClient, DefaultInput } from '@rpgjs/common';
|
|
2
|
-
import { Animation } from '../Effects/Animation';
|
|
2
|
+
import { Animation } from '../Effects/Animation.js';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { RpgGui } from '../RpgGui';
|
|
4
|
+
import { RpgGui } from '../RpgGui.js';
|
|
5
5
|
import { Container } from 'pixi.js';
|
|
6
6
|
export class Scene {
|
|
7
7
|
constructor(game) {
|
package/lib/Sound/RpgSound.js
CHANGED
package/lib/Sound/Sounds.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Animation } from '../Effects/Animation';
|
|
2
|
-
import { RpgComponent } from '../Components/Component';
|
|
1
|
+
import { Animation } from '../Effects/Animation.js';
|
|
2
|
+
import { RpgComponent } from '../Components/Component.js';
|
|
3
3
|
import { Sprite } from 'pixi.js';
|
|
4
4
|
export default class Character extends Sprite {
|
|
5
5
|
private component;
|
package/lib/Sprite/Character.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Utils, RpgPlugin, HookClient } from '@rpgjs/common';
|
|
2
|
-
import { spritesheets } from './Spritesheets';
|
|
3
|
-
import { Animation } from '../Effects/Animation';
|
|
4
|
-
import { Animation as AnimationEnum } from '../Effects/AnimationCharacter';
|
|
2
|
+
import { spritesheets } from './Spritesheets.js';
|
|
3
|
+
import { Animation } from '../Effects/Animation.js';
|
|
4
|
+
import { Animation as AnimationEnum } from '../Effects/AnimationCharacter.js';
|
|
5
5
|
import { Sprite } from 'pixi.js';
|
|
6
6
|
const { capitalize } = Utils;
|
|
7
7
|
class Character extends Sprite {
|
package/lib/Sprite/Player.d.ts
CHANGED
package/lib/Sprite/Player.js
CHANGED
package/lib/Tilemap/Tile.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Texture, AnimatedSprite } from "pixi.js";
|
|
2
|
-
import TileSet from "./TileSet";
|
|
2
|
+
import TileSet from "./TileSet.js";
|
|
3
3
|
import { Tile as TiledTileClass } from '@rpgjs/tiled';
|
|
4
4
|
import { CompositeTilemap } from "@pixi/tilemap";
|
|
5
5
|
export default class Tile extends AnimatedSprite {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Layer, Tile as TileClass } from '@rpgjs/tiled';
|
|
2
|
-
import TileSet from './TileSet';
|
|
3
|
-
import TileMap from '.';
|
|
4
|
-
import { CommonLayer } from './CommonLayer';
|
|
2
|
+
import TileSet from './TileSet.js';
|
|
3
|
+
import TileMap from './index.js';
|
|
4
|
+
import { CommonLayer } from './CommonLayer.js';
|
|
5
5
|
export default class TileLayer extends CommonLayer {
|
|
6
6
|
private tileSets;
|
|
7
7
|
private tilemap;
|
package/lib/Tilemap/TileLayer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Tile from './Tile';
|
|
1
|
+
import Tile from './Tile.js';
|
|
2
2
|
import { CompositeTilemap, settings, POINT_STRUCT_SIZE } from '@pixi/tilemap';
|
|
3
|
-
import { CommonLayer } from './CommonLayer';
|
|
3
|
+
import { CommonLayer } from './CommonLayer.js';
|
|
4
4
|
settings.use32bitIndex = true;
|
|
5
5
|
export default class TileLayer extends CommonLayer {
|
|
6
6
|
static findTileSet(gid, tileSets) {
|
package/lib/Tilemap/TileSet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { spritesheets } from '../Sprite/Spritesheets';
|
|
1
|
+
import { spritesheets } from '../Sprite/Spritesheets.js';
|
|
2
2
|
import { Tileset as TiledTilesetClass } from '@rpgjs/tiled';
|
|
3
|
-
import { log } from '../Logger';
|
|
3
|
+
import { log } from '../Logger.js';
|
|
4
4
|
import { Texture, Rectangle } from 'pixi.js';
|
|
5
5
|
export default class TileSet extends TiledTilesetClass {
|
|
6
6
|
constructor(tileSet) {
|
package/lib/Tilemap/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ImageLayer from './ImageLayer';
|
|
2
|
-
import TileLayer from './TileLayer';
|
|
3
|
-
import TileSet from './TileSet';
|
|
1
|
+
import ImageLayer from './ImageLayer.js';
|
|
2
|
+
import TileLayer from './TileLayer.js';
|
|
3
|
+
import TileSet from './TileSet.js';
|
|
4
4
|
import { TiledMap, Layer } from '@rpgjs/tiled';
|
|
5
|
-
import { RpgRenderer } from '../Renderer';
|
|
5
|
+
import { RpgRenderer } from '../Renderer.js';
|
|
6
6
|
import { Container, Graphics } from 'pixi.js';
|
|
7
7
|
export interface MapInfo extends TiledMap {
|
|
8
8
|
layers: Layer[];
|
package/lib/Tilemap/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Utils } from '@rpgjs/common';
|
|
2
|
-
import ImageLayer from './ImageLayer';
|
|
3
|
-
import TileLayer from './TileLayer';
|
|
4
|
-
import TileSet from './TileSet';
|
|
5
|
-
import { log } from '../Logger';
|
|
2
|
+
import ImageLayer from './ImageLayer.js';
|
|
3
|
+
import TileLayer from './TileLayer.js';
|
|
4
|
+
import TileSet from './TileSet.js';
|
|
5
|
+
import { log } from '../Logger.js';
|
|
6
6
|
import { TiledLayerType } from '@rpgjs/tiled';
|
|
7
7
|
import { Container, Graphics } from 'pixi.js';
|
|
8
8
|
const { intersection } = Utils;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleType } from '@rpgjs/common';
|
|
2
|
-
import { RpgClientEngine } from './RpgClientEngine';
|
|
2
|
+
import { RpgClientEngine } from './RpgClientEngine.js';
|
|
3
3
|
interface RpgClientEntryPointOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Represents socket io client but you can put something else (which is the same schema as socket io)
|
package/lib/clientEntryPoint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HookClient, loadModules } from '@rpgjs/common';
|
|
2
|
-
import { GameEngineClient } from './GameEngine';
|
|
3
|
-
import { RpgClientEngine } from './RpgClientEngine';
|
|
2
|
+
import { GameEngineClient } from './GameEngine.js';
|
|
3
|
+
import { RpgClientEngine } from './RpgClientEngine.js';
|
|
4
4
|
export default (modules, options) => {
|
|
5
5
|
if (!options.globalConfig)
|
|
6
6
|
options.globalConfig = {};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export { Direction, Control, Input, PrebuiltGui, HookServer, HookClient, RpgPlugin, RpgModule, RpgCommonPlayer as RpgSpriteLogic } from '@rpgjs/common';
|
|
2
|
-
export { default as entryPoint } from './clientEntryPoint';
|
|
3
|
-
export { RpgClient, RpgSceneHooks, RpgSceneMapHooks, RpgSpriteHooks, RpgClientEngineHooks } from './RpgClient';
|
|
4
|
-
export { Scene as RpgScene } from './Scene/Scene';
|
|
5
|
-
export { RpgClientEngine } from './RpgClientEngine';
|
|
6
|
-
export { Spritesheet } from './Sprite/Spritesheet';
|
|
7
|
-
export { Sound } from './Sound/Sound';
|
|
2
|
+
export { default as entryPoint } from './clientEntryPoint.js';
|
|
3
|
+
export { RpgClient, RpgSceneHooks, RpgSceneMapHooks, RpgSpriteHooks, RpgClientEngineHooks } from './RpgClient.js';
|
|
4
|
+
export { Scene as RpgScene } from './Scene/Scene.js';
|
|
5
|
+
export { RpgClientEngine } from './RpgClientEngine.js';
|
|
6
|
+
export { Spritesheet } from './Sprite/Spritesheet.js';
|
|
7
|
+
export { Sound } from './Sound/Sound.js';
|
|
8
8
|
export { Howler as RpgGlobalSound } from 'howler';
|
|
9
|
-
export { RpgSound } from './Sound/RpgSound';
|
|
10
|
-
export * as Presets from './Presets/AnimationSpritesheet';
|
|
11
|
-
export { Animation } from './Effects/AnimationCharacter';
|
|
12
|
-
export { Animation as AnimationClass } from './Effects/Animation';
|
|
13
|
-
export { ISpriteCharacter } from './Interfaces/Character';
|
|
14
|
-
export { SceneData } from './Scene/SceneData';
|
|
15
|
-
export { SceneMap as RpgSceneMap } from './Scene/Map';
|
|
16
|
-
export { RpgGui } from './RpgGui';
|
|
17
|
-
export { Timeline, Ease } from './Effects/Timeline';
|
|
18
|
-
export { RpgComponent, RpgComponent as RpgSprite } from './Components/Component';
|
|
9
|
+
export { RpgSound } from './Sound/RpgSound.js';
|
|
10
|
+
export * as Presets from './Presets/AnimationSpritesheet.js';
|
|
11
|
+
export { Animation } from './Effects/AnimationCharacter.js';
|
|
12
|
+
export { Animation as AnimationClass } from './Effects/Animation.js';
|
|
13
|
+
export { ISpriteCharacter } from './Interfaces/Character.js';
|
|
14
|
+
export { SceneData } from './Scene/SceneData.js';
|
|
15
|
+
export { SceneMap as RpgSceneMap } from './Scene/Map.js';
|
|
16
|
+
export { RpgGui } from './RpgGui.js';
|
|
17
|
+
export { Timeline, Ease } from './Effects/Timeline.js';
|
|
18
|
+
export { RpgComponent, RpgComponent as RpgSprite } from './Components/Component.js';
|
|
19
19
|
export declare const RpgResource: {
|
|
20
20
|
spritesheets: Map<string, any>;
|
|
21
21
|
sounds: Map<any, any>;
|
package/lib/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export { Direction, Control, Input, PrebuiltGui, HookServer, HookClient, RpgPlugin, RpgModule, RpgCommonPlayer as RpgSpriteLogic } from '@rpgjs/common';
|
|
2
|
-
export { default as entryPoint } from './clientEntryPoint';
|
|
3
|
-
export { Scene as RpgScene } from './Scene/Scene';
|
|
4
|
-
export { RpgClientEngine } from './RpgClientEngine';
|
|
5
|
-
export { Spritesheet } from './Sprite/Spritesheet';
|
|
6
|
-
export { Sound } from './Sound/Sound';
|
|
2
|
+
export { default as entryPoint } from './clientEntryPoint.js';
|
|
3
|
+
export { Scene as RpgScene } from './Scene/Scene.js';
|
|
4
|
+
export { RpgClientEngine } from './RpgClientEngine.js';
|
|
5
|
+
export { Spritesheet } from './Sprite/Spritesheet.js';
|
|
6
|
+
export { Sound } from './Sound/Sound.js';
|
|
7
7
|
export { Howler as RpgGlobalSound } from 'howler';
|
|
8
|
-
export { RpgSound } from './Sound/RpgSound';
|
|
9
|
-
export * as Presets from './Presets/AnimationSpritesheet';
|
|
10
|
-
export { Animation } from './Effects/AnimationCharacter';
|
|
11
|
-
export { Animation as AnimationClass } from './Effects/Animation';
|
|
12
|
-
export { SceneData } from './Scene/SceneData';
|
|
13
|
-
export { SceneMap as RpgSceneMap } from './Scene/Map';
|
|
14
|
-
export { RpgGui } from './RpgGui';
|
|
15
|
-
export { Timeline, Ease } from './Effects/Timeline';
|
|
16
|
-
export { RpgComponent, RpgComponent as RpgSprite } from './Components/Component';
|
|
17
|
-
import { spritesheets } from './Sprite/Spritesheets';
|
|
18
|
-
import { sounds } from './Sound/Sounds';
|
|
8
|
+
export { RpgSound } from './Sound/RpgSound.js';
|
|
9
|
+
export * as Presets from './Presets/AnimationSpritesheet.js';
|
|
10
|
+
export { Animation } from './Effects/AnimationCharacter.js';
|
|
11
|
+
export { Animation as AnimationClass } from './Effects/Animation.js';
|
|
12
|
+
export { SceneData } from './Scene/SceneData.js';
|
|
13
|
+
export { SceneMap as RpgSceneMap } from './Scene/Map.js';
|
|
14
|
+
export { RpgGui } from './RpgGui.js';
|
|
15
|
+
export { Timeline, Ease } from './Effects/Timeline.js';
|
|
16
|
+
export { RpgComponent, RpgComponent as RpgSprite } from './Components/Component.js';
|
|
17
|
+
import { spritesheets } from './Sprite/Spritesheets.js';
|
|
18
|
+
import { sounds } from './Sound/Sounds.js';
|
|
19
19
|
export const RpgResource = {
|
|
20
20
|
spritesheets,
|
|
21
21
|
sounds
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpgjs/client",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@pixi/tilemap": "^4.0.0",
|
|
19
|
-
"@rpgjs/common": "^4.0.0-beta.
|
|
20
|
-
"@rpgjs/tiled": "^4.0.0-beta.
|
|
21
|
-
"@rpgjs/types": "^4.0.0-beta.
|
|
19
|
+
"@rpgjs/common": "^4.0.0-beta.4",
|
|
20
|
+
"@rpgjs/tiled": "^4.0.0-beta.4",
|
|
21
|
+
"@rpgjs/types": "^4.0.0-beta.4",
|
|
22
22
|
"@types/howler": "2.2.7",
|
|
23
23
|
"howler": "2.2.3",
|
|
24
24
|
"lodash.get": "^4.4.2",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"simple-room-client": "^2.0.3",
|
|
30
30
|
"vue": "^3.2.47"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "20c8697cc462bf2a1811bc0ff288dc421f8234f3",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/css-font-loading-module": "^0.0.8",
|
|
35
35
|
"@types/node": "^18.16.0",
|