UNPKG

@wdp-api/wim-api

Version:

51WORLD WIM Api is a JavaScript plugin for WdpApi, It provides a set of APIs for developers to integrate WIM into their own applications.

54 lines (38 loc) 1.6 kB
<h1 align="center"> <a href="http://wdpapi.51aes.com" target="_blank"><img src="https://wdpapi.51aes.com/doc-static/images/WIMApi-logo-black.svg" width="300" /></a> ![Static Badge](https://img.shields.io/badge/latest-v2.0.1-brightgreen) ![Static Badge](https://img.shields.io/badge/build-Aug_5_2025@PROD-orange) ![Static Badge](https://img.shields.io/badge/Author-Yamazakey-blue) </h1> ## Introduction This is a JavaScript plugin for WdpApi. It provides a set of APIs for developers to integrate WIM into their own applications. ## Features ## Documentation To check out and docs, visit [WdpApi Doc](http://wdpapi.51aes.com) #### Install ```bash $ npm i wdpapi $ npm i @wdp-api/wim-api ``` #### Import ```javascript import WdpApi from 'wdpapi'; import WimApi from '@wdp-api/wim-api'; ``` #### Init ```javascript const config = { id: 'player', //[required] Render scene container(DOM node id) url: 'http://127.0.0.1:8889/Renderers/Any/order', //[optional] Cloud rendering service address order: 'b96285A3', //[optional] Rendering order, obtained on the cloud rendering client resolution: [3840, 2160], //[optional] Set the cloud rendering output resolution[width, height] debugMode: 'normal', //[optional] none: does not print logs, normal: normal logs keyboard: { //[optional] keyboard event normal: false, //[optional] Keyboard event, exclude F1~F12 [default disabled] func: false, //[optional] Browser F1 ~ F12 function keys [default disabled] }, }; const App = new WdpApi(config); App.Plugin.Install(WimApi); ``` ## License Copyright (c) 2024-present, 51WORLD