@dcl/playground-assets 7.0.6-4195735563.commit-275390b → 7.0.6-4195929129.commit-862da77

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function (exports, communicationsController, EthereumController, EngineApi) {
1
+ (function (exports, EngineApi, communicationsController, EthereumController) {
2
2
  'use strict';
3
3
 
4
4
  function _interopNamespaceDefault(e) {
@@ -42538,7 +42538,7 @@
42538
42538
  }
42539
42539
  }
42540
42540
 
42541
- let subscribeFunction = async () => ({});
42541
+ let subscribeFunction = EngineApi.subscribe;
42542
42542
  function createSubscriber(eventName) {
42543
42543
  return () => {
42544
42544
  subscribeFunction({ eventId: eventName }).catch(console.error);
@@ -42607,6 +42607,10 @@
42607
42607
  onPlayerClickedObservable.notifyObservers(data);
42608
42608
  break;
42609
42609
  }
42610
+ case 'comms': {
42611
+ onCommsMessage.notifyObservers(data);
42612
+ break;
42613
+ }
42610
42614
  }
42611
42615
  }
42612
42616
  }
@@ -42632,10 +42636,6 @@
42632
42636
  emit(message, payload) {
42633
42637
  const messageToSend = JSON.stringify({ message, payload });
42634
42638
  this.sendRaw(messageToSend);
42635
- onCommsMessage.notifyObservers({
42636
- message: messageToSend,
42637
- sender: 'self'
42638
- });
42639
42639
  }
42640
42640
  flush() {
42641
42641
  if (this.messageQueue.length === 0)
@@ -42720,7 +42720,6 @@
42720
42720
 
42721
42721
  const rendererTransport = createRendererTransport({ crdtSendToRenderer: EngineApi.crdtSendToRenderer });
42722
42722
  engine.addTransport(rendererTransport);
42723
- setSubscribeFunction(EngineApi.subscribe);
42724
42723
  async function onUpdate(deltaTime) {
42725
42724
  await engine.update(deltaTime);
42726
42725
  await pollEvents(EngineApi.sendBatch);
@@ -42869,4 +42868,4 @@
42869
42868
  exports.pollEvents = pollEvents;
42870
42869
  exports.setSubscribeFunction = setSubscribeFunction;
42871
42870
 
42872
- })(this.globalThis = this.globalThis || {}, communicationsController, EthereumController, EngineApi);
42871
+ })(this.globalThis = this.globalThis || {}, EngineApi, communicationsController, EthereumController);