You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
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
1.1.2

dist/UnityWebgl.umd.js

11

package.json

@@ -11,3 +11,7 @@ {

],
"version": "1.0.0",
"version": "1.1.2",
"main": "dist/UnityWebgl.umd.js",
"module": "dist/UnityWebgl.esm.js",
"unpkg": "dist/UnityWebgl.min.js",
"jsdelivr": "dist/UnityWebgl.min.js",
"homepage": "https://github.com/Meqn/UnityWebGL.js",

@@ -64,6 +68,7 @@ "repository": {

"sass-loader": "^8.0.2",
"unity-webgl": "^1.0.0",
"vue": "^2.6.14",
"vue-template-compiler": "^2.6.11",
"vuepress": "^1.8.2",
"vue": "^2.6.14"
"vuepress": "^1.8.2"
}
}
# unity-webgl
Unity WebGL provides an easy solution for embedding Unity WebGL builds in your webApp, with two-way communication between your webApp and Unity application with advanced API's.
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.
base on [react-unity-webgl](https://github.com/jeffreylanters/react-unity-webgl)
based on [react-unity-webgl](https://github.com/jeffreylanters/react-unity-webgl)
## features
- Simple 、 flexible
- two-way communication (webApp, Unity)
- Built-in event handler
- Available for Vue.js
## Install

@@ -13,4 +19,8 @@ ```

## Usage
in example.html:
```html
<canvas id="canvas" style="width: 100%; height: 100%"></canvas>
<button onclick="onDestroy()">Destroy</button>

@@ -76,2 +86,40 @@ <button onclick="onLoad()">Reload</button>

### Vue
in example.vue
```html
<template>
<Unity :unity="unityContext" width="800px" heighht="600px" />
</template>
<script>
import UnityWebgl, { VueUnity } from 'unity-webgl'
const Unity = new UnityWebgl({
loaderUrl: 'Build/OUT_BIM.loader.js',
dataUrl: "Build/OUT_BIM.data",
frameworkUrl: "Build/OUT_BIM.framework.js",
codeUrl: "Build/OUT_BIM.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "DefaultCompany",
productName: "BIM",
productVersion: "0.1",
})
export default {
name: 'Unity',
component: {
Unity: VueUnity
},
data() {
return {
unityContext: Unity
}
}
}
</script>
```
## methods

@@ -78,0 +126,0 @@

Sorry, the diff of this file is not supported yet