🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

unity-webgl

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unity-webgl - npm Package Compare versions

Comparing version

to
3.4.1

dist/index.global.js

12

dist/index.d.ts

@@ -1,6 +0,6 @@

declare type CanvasElement = HTMLCanvasElement | string;
type CanvasElement = HTMLCanvasElement | string;
/**
* UnityWebgl configuration
*/
declare type IUnityConfig = Pick<IUnityArguments, 'dataUrl' | 'frameworkUrl' | 'codeUrl' | 'streamingAssetsUrl' | 'memoryUrl' | 'symbolsUrl' | 'companyName' | 'productName' | 'productVersion' | 'devicePixelRatio' | 'matchWebGLToCanvasSize' | 'webglContextAttributes'> & {
type IUnityConfig = Pick<IUnityArguments, 'dataUrl' | 'frameworkUrl' | 'codeUrl' | 'streamingAssetsUrl' | 'memoryUrl' | 'symbolsUrl' | 'companyName' | 'productName' | 'productVersion' | 'devicePixelRatio' | 'matchWebGLToCanvasSize' | 'webglContextAttributes'> & {
/**

@@ -171,3 +171,3 @@ * The url to the build json file generated by Unity. When using a relative url,

*/
declare type IWebGLContextAttributes = {
type IWebGLContextAttributes = {
/**

@@ -253,5 +253,5 @@ * If set to true, the context will have an alpha (transparency) channel.

declare type EventName = string | symbol;
declare type EventHandler = (...args: any[]) => any;
declare type EventMap = Record<EventName, EventHandler>;
type EventName = string | symbol;
type EventHandler = (...args: any[]) => any;
type EventMap = Record<EventName, EventHandler>;
declare class EventBus {

@@ -258,0 +258,0 @@ private _eventMap;

/*!
* unity-webgl.js v3.4.0
* unity-webgl.js v3.4.1
* (c) 2023 Mervin<mengqing723@gmail.com>

@@ -4,0 +4,0 @@ * Released under the MIT License.

/*!
* unity-webgl.js v3.4.0
* unity-webgl.js v3.4.1
* (c) 2023 Mervin<mengqing723@gmail.com>

@@ -4,0 +4,0 @@ * Released under the MIT License.

{
"name": "unity-webgl",
"version": "3.4.0",
"version": "3.4.1",
"description": "Unity-Webgl provides an easy solution for embedding Unity WebGL builds in your webApp or Vue.js project, with two-way communication between your webApp and Unity application with advanced API's.",
"keywords": [
"unity webgl",
"unity",
"webGL",
"unity player",
"vue unity",
"vue unity webgl"
],
"main": "dist/index.js",
"module": "dist/index.esm.js",
"unpkg": "dist/index.iife.js",
"jsdelivr": "dist/index.iife.js",
"unpkg": "dist/index.global.js",
"jsdelivr": "dist/index.global.js",
"types": "dist/index.d.ts",
"files": [
"dist",
"types",
"vue"
],
"exports": {

@@ -28,3 +15,3 @@ ".": {

"import": "./dist/index.esm.js",
"default": "./dist/index.iife.js"
"default": "./dist/index.global.js"
},

@@ -35,5 +22,24 @@ "./vue": {

"import": "./vue/index.esm.js",
"default": "./vue/index.iife.js"
}
"default": "./vue/index.global.js"
},
"./*": "./*"
},
"files": [
"dist",
"types",
"vue"
],
"scripts": {
"clean": "rimraf -rf ./dist && rimraf -rf ./vue",
"dev": "NODE_ENV=development rollup -c rollup.config.js -w",
"build": "npm run clean && NODE_ENV=production rollup -c rollup.config.mjs"
},
"keywords": [
"unity webgl",
"unity",
"webGL",
"unity player",
"vue unity",
"vue unity webgl"
],
"homepage": "https://github.com/Meqn/UnityWebGL.js",

@@ -49,7 +55,2 @@ "repository": {

},
"scripts": {
"clean": "rimraf -rf ./dist && rimraf -rf ./vue",
"dev": "NODE_ENV=development rollup -c rollup.config.js -w",
"build": "npm run clean && NODE_ENV=production rollup -c rollup.config.js"
},
"devDependencies": {

@@ -56,0 +57,0 @@ "@vue/composition-api": "^1.7.0",

# unity-webgl
[![version](https://img.shields.io/npm/v/unity-webgl?style=flat-square)](https://www.npmjs.com/package/unity-webgl)
[![download](https://img.shields.io/npm/dm/unity-webgl?style=flat-square)](https://www.npmjs.com/package/unity-webgl)
[![downloads](https://img.shields.io/npm/dm/unity-webgl?style=flat-square)](https://www.npmjs.com/package/unity-webgl)
[![size](https://img.shields.io/bundlephobia/minzip/unity-webgl?style=flat-square)](https://bundlephobia.com/package/unity-webgl)
[![languages](https://img.shields.io/github/languages/top/meqn/UnityWebGL.js?style=flat-square)](https://github.com/Meqn/UnityWebGL.js)

@@ -19,3 +20,3 @@ [![license](https://img.shields.io/npm/l/unity-webgl?style=flat-square)](https://github.com/Meqn/UnityWebGL.js)

- 📦 No framework restrictions, support any web project.
- 📬 two-way communication and interaction (`webApp`, `Unity`).
- 📬 two-way communication and interaction (`webApp` & `Unity`).
- 💌 Built-in event-listening mechanism.

@@ -34,6 +35,6 @@ - 🧲 On-demand import vue component. (Supports [Vue@2.x](https://stackblitz.com/edit/unity-webgl-vue2-demo?file=src%2FApp.vue) & [Vue@3.x](https://stackblitz.com/edit/unity-webgl-vue3-demo?file=src%2FApp.vue))

```bash
https://cdn.jsdelivr.net/npm/unity-webgl/dist/index.iife.js
https://cdn.jsdelivr.net/npm/unity-webgl/dist/index.global.js
# vue component
https://cdn.jsdelivr.net/npm/unity-webgl/vue/index.iife.js
https://cdn.jsdelivr.net/npm/unity-webgl/vue/index.global.js
```

@@ -210,5 +211,5 @@

⭐️ Sends a message to the UnityInstance to invoke a public method.
- `objectName`: Unity场景中对象的名称
- `methodName`: Unity脚本中方法的名称
- `params`: 传递的参数
- `objectName`: Where objectName is the name of an object in your scene.
- `methodName`: methodName is the name of a C-Sharp method in the script, currently attached to that object.
- `params`: Parameters can be any type of value or not defined at all.

@@ -284,3 +285,3 @@ #### `on(eventName: string, eventListener: Function)`

## Vue component
Vue组件,兼容 `vue2.x` 和 `vue3.x`
Vue components, compatible with `vue2.x` and `vue3.x`.

@@ -287,0 +288,0 @@ ### props

# unity-webgl
[![version](https://img.shields.io/npm/v/unity-webgl?style=flat-square)](https://www.npmjs.com/package/unity-webgl)
[![download](https://img.shields.io/npm/dm/unity-webgl?style=flat-square)](https://www.npmjs.com/package/unity-webgl)
[![downloads](https://img.shields.io/npm/dm/unity-webgl?style=flat-square)](https://www.npmjs.com/package/unity-webgl)
[![size](https://img.shields.io/bundlephobia/minzip/unity-webgl?style=flat-square)](https://bundlephobia.com/package/unity-webgl)
[![languages](https://img.shields.io/github/languages/top/meqn/UnityWebGL.js?style=flat-square)](https://github.com/Meqn/UnityWebGL.js)

@@ -20,6 +21,6 @@ [![license](https://img.shields.io/npm/l/unity-webgl?style=flat-square)](https://github.com/Meqn/UnityWebGL.js)

## Features
- 📦 无框架限制,支持任何web项目
- 📬 支持在`WebApp` 和 `Unity` 之间双向通信和交互
- 💌 使用事件监听机制,调用简单灵活
- 🧲 按需引入vue组件,兼容[Vue@2.x](https://stackblitz.com/edit/unity-webgl-vue2-demo?file=src%2FApp.vue) 和 [Vue@3.x](https://stackblitz.com/edit/unity-webgl-vue3-demo?file=src%2FApp.vue)
- 📦 无框架限制,支持任何web项目;
- 📬 支持在`WebApp` 和 `Unity` 之间双向通信和交互;
- 💌 使用事件监听机制,调用简单灵活;
- 🧲 按需引入vue组件,兼容[Vue@2.x](https://stackblitz.com/edit/unity-webgl-vue2-demo?file=src%2FApp.vue) 和 [Vue@3.x](https://stackblitz.com/edit/unity-webgl-vue3-demo?file=src%2FApp.vue)。

@@ -38,6 +39,6 @@

```bash
https://cdn.jsdelivr.net/npm/unity-webgl/dist/index.iife.js
https://cdn.jsdelivr.net/npm/unity-webgl/dist/index.global.js
# vue component
https://cdn.jsdelivr.net/npm/unity-webgl/vue/index.iife.js
https://cdn.jsdelivr.net/npm/unity-webgl/vue/index.global.js
```

@@ -44,0 +45,0 @@

@@ -6,8 +6,8 @@ {

"module": "./index.esm.js",
"unpkg": "./index.iife.js",
"jsdelivr": "./index.iife.js",
"unpkg": "./index.global.js",
"jsdelivr": "./index.global.js",
"types": "./index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rimraf -rf ./dist && NODE_ENV=production rollup -c rollup.config.js"
"build": "rimraf -rf ./dist && NODE_ENV=production rollup -c rollup.config.mjs"
},

@@ -14,0 +14,0 @@ "devDependencies": {