@wdp-api/cim-api
v2.3.0
Published
51WORLD cim-api is a JavaScript plugin designed for WdpApi, offering a comprehensive set of APIs that empower developers to seamlessly integrate cim-api into their applications.
Downloads
442
Readme
Introduction
CimApi is a set of cloud rendering and front-end display application programming interfaces (API) developed by JavaScript. On the basis of the 51world rendering platform, the client 3D scene is embedded in the web page in the form of video stream. Users can overlay their own data components and interact with the scene in both directions. CimApi is compatible with current mainstream JavaScript front-end frameworks, providing fast and convenient development interfaces for front-end developers.
Documentation
Get started with CimApi, learn the fundamentals and explore advanced topics on our documentation website.
Install
$ npm i wdpapi
$ npm i @wdp-api/cim-apiImportant
import WdpApi from 'wdpapi';
import CimApi from '@wdp-api/cim-api';Instantiation
const wdpConfig = {
id: 'player', //Render scene container(DOM node id)
url: 'http://172.31.10.93:8889/Renderers/Any/order', //Cloud rendering service address
order: 'b96285A3', //Rendering order, obtained on the cloud rendering client
resolution: [3840, 2160], //Set the cloud rendering output resolution[width, height]
debugMode: 'normal', //none, normal, high
keyboard: {
//[optional] keyboard event
normal: false, //Keyboard event, exclude F1~F12 [default disabled]
func: false, //Browser F1 ~ F12 function keys [default disabled]
},
};
const App = new WdpApi(wdpConfig);
await App.Plugin.Install(CimApi);Methods
const entityObj = new App.HeightLimitAnalysis({
heightLimit: 100,
limitColor: 'f0ffc8',
points: ['121.49988626,31.22528011,61', '121.49533521,31.22995262,67', '121.50232976,31.22913331,95'],
isAllRegion: true,
});
await App.Scene.Add(entityObj);
await entityObj.Get();
await entityObj.Delete();License
Copyright (c) 2023-present, 51WORLD
