@tomorrowevening/hermes 0.0.22 → 0.0.24

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.
@@ -120,6 +120,7 @@ export default class RemoteTheatre extends BaseRemote {
120
120
  event: 'updateSheetObject',
121
121
  target: 'app',
122
122
  data: {
123
+ sheet: sheetName,
123
124
  sheetObject: objName,
124
125
  values: values,
125
126
  },
@@ -187,6 +188,10 @@ export function HandleAppRemoteTheatre(app: Application, msg: BroadcastData) {
187
188
  }
188
189
  break;
189
190
  case 'updateSheetObject':
191
+ // @ts-ignore
192
+ value = theatre.sheets.get(msg.data.sheet); // pause current animation
193
+ // @ts-ignore
194
+ if (value !== undefined) value.sequence.pause();
190
195
  // @ts-ignore
191
196
  value = theatre.sheetObjectCBs.get(msg.data.sheetObject);
192
197
  // @ts-ignore
@@ -10,6 +10,7 @@ export default class RemoteThree extends BaseRemote {
10
10
  scene?: Scene = undefined;
11
11
 
12
12
  getObject(uuid: string) {
13
+ if (!this.app.debugEnabled) return;
13
14
  this.app.send({
14
15
  event: 'getObject',
15
16
  target: 'app',
@@ -65,6 +66,8 @@ export default class RemoteThree extends BaseRemote {
65
66
  setScene(value: Scene) {
66
67
  if (value === undefined) return;
67
68
  this.scene = value;
69
+
70
+ if (!this.app.debugEnabled) return;
68
71
  resetThreeObjects();
69
72
  hierarchyUUID(this.scene);
70
73
  const stripped = stripScene(this.scene);
@@ -76,6 +79,7 @@ export default class RemoteThree extends BaseRemote {
76
79
  }
77
80
 
78
81
  addCamera(camera: Camera) {
82
+ if (!this.app.debugEnabled) return;
79
83
  const stripped = stripObject(camera);
80
84
  this.app.send({
81
85
  event: 'addCamera',
@@ -85,6 +89,7 @@ export default class RemoteThree extends BaseRemote {
85
89
  }
86
90
 
87
91
  removeCamera(camera: Camera) {
92
+ if (!this.app.debugEnabled) return;
88
93
  const stripped = stripObject(camera);
89
94
  this.app.send({
90
95
  event: 'removeCamera',
@@ -1,14 +1,23 @@
1
1
  import BaseRemote from './remote/BaseRemote';
2
2
  import type { ApplicationMode, BroadcastCallback, BroadcastData } from './types';
3
3
  export default class Application {
4
- channel?: BroadcastChannel | undefined;
5
4
  components: Map<string, any>;
5
+ listen?: BroadcastCallback;
6
+ protected _debugEnabled: boolean;
7
+ protected broadcastChannel?: BroadcastChannel | undefined;
8
+ protected webSocket?: WebSocket | undefined;
6
9
  protected _mode: ApplicationMode;
7
- constructor(name: string, debugEnabled: boolean, editorHashtag?: string);
10
+ protected _connected: boolean;
11
+ protected useBC: boolean;
12
+ constructor(id: string, debugEnabled: boolean, useBC?: boolean, editorHashtag?: string);
8
13
  addComponent(name: string, component: BaseRemote): void;
9
14
  dispose(): void;
10
15
  send(data: BroadcastData): void;
11
- listen(callback: BroadcastCallback): void;
16
+ private messageHandler;
17
+ private openHandler;
18
+ private closeHandler;
19
+ get connected(): boolean;
20
+ get debugEnabled(): boolean;
12
21
  get mode(): ApplicationMode;
13
22
  get isApp(): boolean;
14
23
  get editor(): boolean;