unreal-toolkit 0.1.6 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/unreal.toolkit.d.ts +2 -3
- package/dist/unreal.toolkit.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -4,7 +4,7 @@ with your hosted Unreal Engine streaming web application.
|
|
4
4
|
|
5
5
|
<a href="https://www.npmjs.com/package/unreal-toolkit-next">Next Edition (ES6)</a>
|
6
6
|
<br/>
|
7
|
-
<a href="https://github.com/
|
7
|
+
<a href="https://github.com/MackeyK24/UnrealToolkit/tree/master/Runtime">Browser Edition (CDN)</a>
|
8
8
|
|
9
9
|
|
10
10
|
## Default Installation (UMD)
|
package/dist/index.d.ts
CHANGED
@@ -24,8 +24,7 @@ export declare class UnrealToolkit {
|
|
24
24
|
* @class UnrealMessageBus - All rights reserved (c) 2024 Mackey Kinard
|
25
25
|
*/
|
26
26
|
export declare class UnrealMessageBus {
|
27
|
-
|
28
|
-
static ApiKey: string;
|
27
|
+
RequiredOrigin: string;
|
29
28
|
constructor();
|
30
29
|
/** Handle event bus message
|
31
30
|
* @param message The message to handle
|
@@ -40,7 +39,7 @@ export declare class UnrealMessageBus {
|
|
40
39
|
* @param transfer The transfer to post
|
41
40
|
* @returns void
|
42
41
|
*/
|
43
|
-
PostMessage(message: string, data?: string): void;
|
42
|
+
PostMessage(message: string, data?: string, targetOrigin?: string): void;
|
44
43
|
/** Remove event bus message handler
|
45
44
|
* @param message The message to remove
|
46
45
|
* @param handler The handler to remove
|
package/dist/unreal.toolkit.d.ts
CHANGED
@@ -24,8 +24,7 @@ export declare class UnrealToolkit {
|
|
24
24
|
* @class UnrealMessageBus - All rights reserved (c) 2024 Mackey Kinard
|
25
25
|
*/
|
26
26
|
export declare class UnrealMessageBus {
|
27
|
-
|
28
|
-
static ApiKey: string;
|
27
|
+
RequiredOrigin: string;
|
29
28
|
constructor();
|
30
29
|
/** Handle event bus message
|
31
30
|
* @param message The message to handle
|
@@ -40,7 +39,7 @@ export declare class UnrealMessageBus {
|
|
40
39
|
* @param transfer The transfer to post
|
41
40
|
* @returns void
|
42
41
|
*/
|
43
|
-
PostMessage(message: string, data?: string): void;
|
42
|
+
PostMessage(message: string, data?: string, targetOrigin?: string): void;
|
44
43
|
/** Remove event bus message handler
|
45
44
|
* @param message The message to remove
|
46
45
|
* @param handler The handler to remove
|
package/dist/unreal.toolkit.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.UnrealToolkit=n():e.UnrealToolkit=n()}(this,(()=>(()=>{"use strict";var e={d:(n,t)=>{for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};e.d(n,{default:()=>o});var t=function(){function e(){}return Object.defineProperty(e,"EventBus",{get:function(){return null==e._EventBus&&(e._EventBus=new i),e._EventBus},enumerable:!1,configurable:!0}),e._EventBus=null,e}(),i=function(){function e(){this.RequiredOrigin="*",this.ListenerDictionary={},window&&window.top?(this.HandleWindowMessage=this.HandleWindowMessage.bind(this),window.top.addEventListener("message",this.HandleWindowMessage)):console.warn("UnrealMessageBus: No Top Window Available")}return e.prototype.OnMessage=function(e,n){var t;null==this.ListenerDictionary[e]?(t=[],this.ListenerDictionary[e]=t):t=this.ListenerDictionary[e],t.findIndex((function(e){return n==e}))<0&&t.push(n)},e.prototype.PostMessage=function(e,n,t){void 0===t&&(t="*"),window&&window.top?window.top.postMessage({source:"unrealmessagebus",message:e,data:n},t):console.warn("UnrealMessageBus: No Top Window Available")},e.prototype.RemoveHandler=function(e,n){var t=this.ListenerDictionary[e];if(null!=t){var i=t.findIndex((function(e){return n==e}));i>=0&&t.splice(i,1)}},e.prototype.ResetHandlers=function(){this.ListenerDictionary={}},e.prototype.Dispose=function(){this.ResetHandlers(),window&&window.top&&window.top.removeEventListener("message",this.HandleWindowMessage)},e.prototype.HandleWindowMessage=function(e){null!=e&&null!=e.data&&(!0==(null!=this.RequiredOrigin&&""!==this.RequiredOrigin&&"*"!==this.RequiredOrigin)&&e.origin!==this.RequiredOrigin||null!=e.data.message&&null!=e.data.source&&"unrealmessagebus"==e.data.source&&this.OnDispatchMessage(e.data.message,null!=e.data.data?e.data.data:null))},e.prototype.OnDispatchMessage=function(e,n){void 0===n&&(n=null);var t=this.ListenerDictionary[e];null!=t&&t.forEach((function(e){try{e&&e(n)}catch(e){console.warn(e)}}))},e}();console.log("Unreal Toolkit Runtime - Version 0.1.8");const o=t;return n.default})()));
|