New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-unity-webgl

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-unity-webgl - npm Package Compare versions

Comparing version 9.0.3 to 9.0.4

16

distribution/hooks/use-unity-context.js

@@ -96,7 +96,7 @@ "use strict";

/**
* @param type Defines the type of screenshot to take.
* @param dataType Defines the type of screenshot to take.
* @param quality Defines the quality of the screenshot.
* @returns A base 64 encoded string of the screenshot.
*/
function (type, quality) {
function (dataType, quality) {
if (unityInstance === null ||

@@ -109,4 +109,4 @@ typeof unityInstance.Module.canvas === "undefined") {

// Takes a screenshot by converting Canvas's render-context's buffer into
// a Data URL of the specified type and quality.
return unityInstance.Module.canvas.toDataURL(type, quality);
// a Data URL of the specified data type and quality.
return unityInstance.Module.canvas.toDataURL(dataType, quality);
}, [unityInstance]);

@@ -117,7 +117,11 @@ /**

*/
var unload = (0, react_1.useCallback)(function () {
var unload = (0, react_1.useCallback)(
/**
* @returns A promise that resolves when the UnityInstance has been unloaded.
*/
function () {
if (unityInstance === null) {
// Guarding the Unity Instance.
console.warn(error_messages_1.errorMessages.quitNoUnityInstance);
return;
return Promise.reject();
}

@@ -124,0 +128,0 @@ return unityInstance.Quit();

@@ -46,3 +46,3 @@ import { IUnityProvider } from "../interfaces/unity-provider";

*/
readonly takeScreenshot: (type: string, quality?: number) => string | undefined;
readonly takeScreenshot: (dataType?: string, quality?: number) => string | undefined;
/**

@@ -58,6 +58,7 @@ * Lets you asynchronously ask for the pointer to be locked on the given Unity

* unmounted from the DOM.
* @returns A promise that resolves when the UnityInstance has been unloaded.
*/
readonly unload: () => Promise<void> | undefined;
readonly unload: () => Promise<void>;
}
export type { IUnityContextHook };
//# sourceMappingURL=unity-context-hook.d.ts.map
{
"name": "react-unity-webgl",
"version": "9.0.3",
"version": "9.0.4",
"description": "React Unity WebGL provides a modern solution for embedding Unity WebGL builds in your React Application while providing advanced APIs for two way communication and interaction between Unity and React.",

@@ -27,4 +27,4 @@ "keywords": [

{
"type": "paypal",
"url": "https://paypal.me/jeffreylanters"
"type": "website",
"url": "https://react-unity-webgl.dev/support"
}

@@ -31,0 +31,0 @@ ],

@@ -13,7 +13,7 @@ <div align="center">

[![sponsors](https://img.shields.io/github/sponsors/jeffreylanters?color=E12C9A&style=for-the-badge)](https://github.com/sponsors/jeffreylanters)
[![donate](https://img.shields.io/badge/donate-paypal-F23150?style=for-the-badge)](https://paypal.me/jeffreylanters)
[![support](https://img.shields.io/badge/support-donate-F23150?style=for-the-badge)](https://react-unity-webgl.dev/support)
[**Documentation**](https://react-unity-webgl.dev/) &middot;
[**Example Templates**](https://github.com/jeffreylanters/react-unity-webgl-templates/) &middot;
[**Sponsor the Project**](https://github.com/sponsors/jeffreylanters) &middot;
[**Example Templates**](https://github.com/jeffreylanters/react-unity-webgl-template/) &middot;
[**Support the project**](https://react-unity-webgl.dev/support) &middot;
[**Discussion Board**](https://github.com/jeffreylanters/react-unity-webgl/discussions)

@@ -29,3 +29,3 @@

Hi there! I would like to say one more thing before you start bringing your awesome games to the web. My name is Jeffrey, I'm a Unity and Web developer with a passion for Open Source. The project you're looking at right now is one of my hobby projects. Maintaining and building this project is something I do in my spare time, and I have been doing so since 2017. React-Unity-WebGL will always remain free, but maining it and keeping up-to-date with Unity's updates takes a lot of work and tine. If you are able to, I would appreciate it greatly if you would consider [sending a donation](https://paypal.me/jeffreylanters) or [becoming a sponsor](https://github.com/sponsors/jeffreylanters) to help me keep this project going.
Hi there! I would like to say one more thing before you start bringing your awesome games to the web. My name is Jeffrey Lanters, I'm a Unity and Web developer with a passion for Open Source. The project you're looking at right now is one of my hobby projects. Maintaining and building this project is something **I do in my spare time**, and I have been doing so since 2017. React-Unity-WebGL will **always remain free**, but adding new features, maintaining it and keeping up-to-date with Unity's updates takes a lot of work and time. If you are able to, I would appreciate it greatly if you would consider [sending a donation or becoming a sponsor](https://react-unity-webgl.dev/support) to help me keep this project going.

@@ -32,0 +32,0 @@ Thanks for your time, happy coding!

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc