@reactunity/renderer 0.15.1 → 0.15.2
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/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.15.
|
|
1
|
+
export declare const version = "0.15.2";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '0.15.
|
|
1
|
+
export var version = '0.15.2';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UnityConfig } from "react-unity-webgl";
|
|
2
2
|
import { UnityContextHook } from "react-unity-webgl/distribution/types/unity-context-hook";
|
|
3
3
|
import { UnityInstance } from "react-unity-webgl/typings/unity-instance";
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
4
|
+
export type ReactUnityEventParameter = string | number | boolean | null | undefined | void;
|
|
5
|
+
export type EventCallback = (...parameters: any[]) => ReactUnityEventParameter;
|
|
6
6
|
export type EventSystemHook = {
|
|
7
7
|
readonly on: (eventName: string, callback: EventCallback) => void;
|
|
8
8
|
readonly addEventListener: (eventName: string, callback: EventCallback) => void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { UnityConfig } from "react-unity-webgl";
|
|
2
2
|
import { UnityProvider } from "react-unity-webgl/distribution/types/unity-provider";
|
|
3
3
|
import type { UnityInstance } from "react-unity-webgl/typings/unity-instance";
|
|
4
|
-
import { ReactUnityEventParameter, UnityContextType } from "./types";
|
|
4
|
+
import { EventCallback, ReactUnityEventParameter, UnityContextType } from "./types";
|
|
5
5
|
export declare const useUnityContext: (unityConfig: UnityConfig) => UnityContextType;
|
|
6
6
|
export declare class UnityContext implements UnityContextType {
|
|
7
7
|
constructor(unityConfig: UnityConfig);
|
|
8
|
-
addEventListener: ((eventName: string, callback: (...parameters: ReactUnityEventParameter[]) => ReactUnityEventParameter) => void) & ((eventName: string, callback:
|
|
9
|
-
removeEventListener: ((eventName: string, callback: (...parameters: ReactUnityEventParameter[]) => ReactUnityEventParameter) => void) & ((eventName: string, callback?:
|
|
8
|
+
addEventListener: ((eventName: string, callback: (...parameters: ReactUnityEventParameter[]) => ReactUnityEventParameter) => void) & ((eventName: string, callback: EventCallback) => void);
|
|
9
|
+
removeEventListener: ((eventName: string, callback: (...parameters: ReactUnityEventParameter[]) => ReactUnityEventParameter) => void) & ((eventName: string, callback?: EventCallback) => void);
|
|
10
10
|
unityProvider: UnityProvider;
|
|
11
11
|
loadingProgression: number;
|
|
12
12
|
isLoaded: boolean;
|
|
@@ -18,14 +18,14 @@ export declare class UnityContext implements UnityContextType {
|
|
|
18
18
|
requestPointerLock: () => void;
|
|
19
19
|
unload: () => Promise<void>;
|
|
20
20
|
UNSAFE__detachAndUnloadImmediate: () => Promise<void>;
|
|
21
|
-
on: (eventName: string, callback:
|
|
21
|
+
on: (eventName: string, callback: EventCallback) => void;
|
|
22
22
|
removeAllEventListeners: () => void;
|
|
23
23
|
dispatchEvent: (eventName: string, ...parameters: any) => void;
|
|
24
|
+
onMount: () => () => void;
|
|
24
25
|
unityConfig: UnityConfig;
|
|
25
26
|
unityInstance: UnityInstance;
|
|
26
27
|
htmlCanvasElement: any;
|
|
27
28
|
send: (gameObjectName: string, methodName: string, parameter?: ReactUnityEventParameter) => void;
|
|
28
29
|
setFullscreen: (enabled: boolean) => void;
|
|
29
30
|
quitUnityInstance: () => Promise<void>;
|
|
30
|
-
onMount: () => () => void;
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactunity/renderer",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "React renderer for Unity3D",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react": "^18.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@reactunity/scripts": "^0.15.
|
|
68
|
+
"@reactunity/scripts": "^0.15.1",
|
|
69
69
|
"@types/react-reconciler": "^0.28.2",
|
|
70
70
|
"react-unity-webgl": "^9.4.0",
|
|
71
71
|
"rimraf": "^4.1.2",
|