Compare commits

..

No commits in common. "master" and "v0.1.14" have entirely different histories.

17 changed files with 377 additions and 428 deletions

View File

@ -3,12 +3,6 @@
图形应用基础框架,基于 pixi.js([官网](https://pixijs.com/), [API Docs](https://pixijs.download/release/docs/index.html))
viewport 使用的 github 开源的 pixi-viewport[pixi-viewport](https://github.com/davidfig/pixi-viewport)
# 发布版本说明
测试好可以发布时执行yarn run build进行构建然后再提交push后在gitea.joylink.club中进行版本发布
```
yarn run build
```
# 路线图
- ~~图形的位置、旋转属性使用 pixijs 的 transform 变换(完成)~~

View File

@ -355,10 +355,6 @@ export interface IGraphicScene extends EventEmitter<GraphicAppEvents> {
* websocket订阅
*/
unsubscribe(destination: string): void;
/**
* websocket消息
*/
publishMessage(destination: string, message: Uint8Array): void;
}
declare abstract class GraphicSceneBase extends EventEmitter<GraphicAppEvents> implements IGraphicScene {
private graphicStore;
@ -493,10 +489,6 @@ declare abstract class GraphicSceneBase extends EventEmitter<GraphicAppEvents> i
* websocket订阅
*/
unsubscribe(destination: string): void;
/**
* websocket消息
*/
publishMessage(destination: string, message: Uint8Array): void;
/**
*
* @param graphicStates

View File

@ -52,7 +52,6 @@ export interface GraphicQueryStore {
* @param type
*/
queryByCodeAndTypeAmbiguous<T extends JlGraphic>(code: string, type: string): T[];
checkIdExist(v: number): boolean;
}
/**
*
@ -88,5 +87,4 @@ export declare class GraphicStore implements GraphicQueryStore {
*
*/
clear(): void;
checkIdExist(id: number): boolean;
}

2
lib/index.d.ts vendored
View File

@ -1,4 +1,4 @@
/// <reference path="../global.d.ts" />
/// <reference types="global" />
export * as GraphicsExtras from '@pixi/graphics-extras';
export * from './app';
export * from './core';

View File

@ -4446,9 +4446,6 @@ class GraphicStore {
this.relationManage.clear();
this.store.clear();
}
checkIdExist(id) {
return this.store.has(id);
}
}
//基础图形对象扩展
@ -5282,10 +5279,6 @@ class MessageClient extends EventEmitter {
removeSubscription(destination, handle) {
this.getOrNewSubClient(destination).removeHandler(handle);
}
publishMessage(destination, message) {
const cli = this.getOrNewSubClient(destination);
cli.publishMessage(destination, message);
}
}
class SubscriptionClient {
mc;
@ -5328,11 +5321,6 @@ class SubscriptionClient {
unsubscribe() {
this.mc.unsubscribe(this.destination);
}
publishMessage(destination, message) {
if (this.mc.connected) {
this.mc.publishMessage(destination, message);
}
}
handleMessage(data) {
if (this.protocol === 'json') {
console.debug('收到消息:', data);
@ -5415,9 +5403,6 @@ class StompMessagingClient extends MessageClient {
unsubscribe0(destination) {
this.cli.unsubscribe(destination);
}
publishMessage(destination, message) {
console.debug('MQTT发布消息:未实现');
}
close() {
this.cli.deactivate();
}
@ -5537,15 +5522,6 @@ class MqttMsgClient extends MessageClient {
console.warn('MQTT 消息客户端关闭失败', error);
}
}
publishMessage(destination, message) {
console.debug('MQTT发布消息');
if (this.connected) {
this.cli.publish(destination, message);
}
else {
console.warn('MQTT 未连接,消息发布失败');
}
}
}
var ClientEngine;
@ -5625,9 +5601,6 @@ class WsMsgCli {
static registerAppMsgBroker(broker) {
WsMsgCli.appMsgBroker.push(broker);
}
static publishMessage(destination, message) {
WsMsgCli.client.publishMessage(destination, message);
}
static removeAppMsgBroker(broker) {
const index = WsMsgCli.appMsgBroker.findIndex((mb) => mb == broker);
if (index >= 0) {
@ -5701,9 +5674,6 @@ class AppWsMsgBroker {
WsMsgCli.registerSubscription(destination, handler);
});
}
publishMessage(destination, message) {
WsMsgCli.publishMessage(destination, message);
}
/**
* 取消所有订阅从通用Stomp客户端移除此消息代理
*/
@ -7160,13 +7130,6 @@ class GraphicSceneBase extends EventEmitter {
this.checkWsMsgCli();
this.wsMsgBroker.unsbuscribe(destination);
}
/**
* 发布websocket消息
*/
publishMessage(destination, message) {
this.checkWsMsgCli();
this.wsMsgBroker.publishMessage(destination, message);
}
/**
* 处理图形状态
* @param graphicStates

View File

@ -33,7 +33,6 @@ export declare abstract class MessageClient extends EventEmitter<MessageClientEv
getOrNewSubClient(destination: string): SubscriptionClient;
addSubscription(destination: string, handler: IMessageHandler): void;
removeSubscription(destination: string, handle: IMessageHandler): void;
publishMessage(destination: string, message: Uint8Array): void;
abstract get connected(): boolean;
abstract close(): void;
}
@ -48,7 +47,6 @@ export declare class SubscriptionClient {
removeHandler(handler: IMessageHandler): void;
trySubscribe(): void;
unsubscribe(): void;
publishMessage(destination: string, message: Uint8Array): void;
handleMessage(data: any): void;
onDisconnect(): void;
}

View File

@ -64,12 +64,6 @@ export interface IMessageClient extends EventEmitter<MessageClientEvents> {
* @param handler
*/
removeSubscription(destination: string, handler: IMessageHandler): void;
/**
*
* @param destination
* @param message
*/
publishMessage(destination: string, message: Uint8Array): void;
/**
*
*/
@ -90,7 +84,6 @@ export declare class WsMsgCli {
static registerSubscription(destination: string, handler: IMessageHandler): void;
static unregisterSubscription(destination: string, handler: IMessageHandler): void;
static registerAppMsgBroker(broker: AppWsMsgBroker): void;
static publishMessage(destination: string, message: Uint8Array): void;
static removeAppMsgBroker(broker: AppWsMsgBroker): void;
static hasAppMsgBroker(): boolean;
/**
@ -145,7 +138,6 @@ export declare class AppWsMsgBroker {
unsbuscribe(destination: string): void;
unsubscribeAll(): void;
resubscribeAll(): void;
publishMessage(destination: string, message: Uint8Array): void;
/**
* Stomp客户端移除此消息代理
*/

View File

@ -10,5 +10,4 @@ export declare class MqttMsgClient extends MessageClient {
unsubscribe0(destination: string): void;
get connected(): boolean;
close(): void;
publishMessage(destination: string, message: Uint8Array): void;
}

View File

@ -7,6 +7,5 @@ export declare class StompMessagingClient extends MessageClient {
get connected(): boolean;
subscribe(destination: string, handle: HandleMessage): boolean;
unsubscribe0(destination: string): void;
publishMessage(destination: string, message: Uint8Array): void;
close(): void;
}

View File

@ -1,6 +1,6 @@
{
"name": "graphic-pixi",
"version": "0.1.18",
"version": "0.1.14",
"description": "基于pixijs的图形应用、绘制应用框架",
"productName": "Graphic-pixi",
"author": "walker <shengxuqiang@joylink.club>",

View File

@ -612,10 +612,6 @@ export interface IGraphicScene extends EventEmitter<GraphicAppEvents> {
* websocket订阅
*/
unsubscribe(destination: string): void;
/**
* websocket消息
*/
publishMessage(destination: string, message: Uint8Array): void;
}
abstract class GraphicSceneBase
@ -1162,13 +1158,6 @@ abstract class GraphicSceneBase
this.checkWsMsgCli();
this.wsMsgBroker.unsbuscribe(destination);
}
/**
* websocket消息
*/
publishMessage(destination: string, message: Uint8Array) {
this.checkWsMsgCli();
this.wsMsgBroker.publishMessage(destination, message);
}
/**
*
* @param graphicStates

View File

@ -60,8 +60,6 @@ export interface GraphicQueryStore {
code: string,
type: string
): T[];
checkIdExist(v: number): boolean;
}
/**
@ -210,8 +208,4 @@ export class GraphicStore implements GraphicQueryStore {
this.relationManage.clear();
this.store.clear();
}
checkIdExist(id: number) {
return this.store.has(id)
}
}

View File

@ -70,11 +70,6 @@ export abstract class MessageClient
this.getOrNewSubClient(destination).removeHandler(handle);
}
publishMessage(destination: string, message: Uint8Array): void {
const cli = this.getOrNewSubClient(destination);
cli.publishMessage(destination, message);
}
abstract get connected(): boolean;
abstract close(): void;
@ -130,12 +125,6 @@ export class SubscriptionClient {
this.mc.unsubscribe(this.destination);
}
publishMessage(destination: string, message: Uint8Array): void {
if (this.mc.connected) {
this.mc.publishMessage(destination, message);
}
}
handleMessage(data: any) {
if (this.protocol === 'json') {
console.debug('收到消息:', data);

View File

@ -83,12 +83,7 @@ export interface IMessageClient extends EventEmitter<MessageClientEvents> {
* @param handler
*/
removeSubscription(destination: string, handler: IMessageHandler): void;
/**
*
* @param destination
* @param message
*/
publishMessage(destination: string, message: Uint8Array): void;
/**
*
*/
@ -168,10 +163,6 @@ export class WsMsgCli {
WsMsgCli.appMsgBroker.push(broker);
}
static publishMessage(destination: string, message: Uint8Array) {
WsMsgCli.client.publishMessage(destination, message);
}
static removeAppMsgBroker(broker: AppWsMsgBroker) {
const index = WsMsgCli.appMsgBroker.findIndex((mb) => mb == broker);
if (index >= 0) {
@ -304,10 +295,6 @@ export class AppWsMsgBroker {
});
}
publishMessage(destination: string, message: Uint8Array) {
WsMsgCli.publishMessage(destination, message);
}
/**
* Stomp客户端移除此消息代理
*/

View File

@ -112,13 +112,4 @@ export class MqttMsgClient extends MessageClient {
console.warn('MQTT 消息客户端关闭失败', error);
}
}
publishMessage(destination: string, message: Uint8Array): void {
console.debug('MQTT发布消息');
if(this.connected) {
this.cli.publish(destination, message as Buffer);
}else {
console.warn('MQTT 未连接,消息发布失败');
}
}
}

View File

@ -77,10 +77,6 @@ export class StompMessagingClient extends MessageClient {
this.cli.unsubscribe(destination);
}
publishMessage(destination: string, message: Uint8Array): void {
console.debug('MQTT发布消息:未实现');
}
close(): void {
this.cli.deactivate();
}

680
yarn.lock

File diff suppressed because it is too large Load Diff