
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
dragv-cli-service-3d
Advanced tools
如果模型id是 model-uLve0o9pKn
model,//远程模型
heatingArea,//热力区
signModel,//标识
flyLine,//单条飞线
rflyLine,//辐射飞线
cflyLine,//连续飞线
routPoint,//路径点
fproutPoint,//第一人称路径点
circleZone,//圆形区域
squareZone,//长方形区域
polygonZone,//多边形区域
方法:ChangeEnvironment(string data)
场景还可以新增preview参数,preview:true 场景事件/操作正常、preview:flase 场景事件/无法操作。 push到 gui场景配置数组 中,gui场景配置数组.push({name:"preview", value: false})。
unityProvider.send('ReceiveFrontManager', 'ChangeEnvironment', JSON.stringify(gui场景配置数组))
方法:SetResolution(string size)
unityProvider.send('ReceiveFrontManager', 'SetResolution', '1920x1080');
方法:CreateObject(string json)
回调:ClickCreateObject(string json)
// 新增
unityProvider.send('ReceiveFrontManager', 'CreateObject', JSON.stringify({
components:{"模型id":"模型配置对象"}, //只传输创建的这个模型对象,非所有
layout:[{当前模型层}] //只传输创建的这个模型层,非所有
}));
// 返回物体信息 回调下载模型后,新增的这个模型参数
unityProvider.on("ClickCreateObject",(string json)=>{
json为上面传输的数据再返回过来,回来后,再调用 CreateAllObject(string json)//生成全部物体
})
方法:SetShowHide(string json: {string[] ids,int type})
ids:["model-1213213"]
type:1显示 2隐藏 3显隐切换
time:1 //渐隐渐显时间
unityProvider.send('ReceiveFrontManager', 'SetShowHide', JSON.stringify({
ids:["model-1213213"],
type:1,
time:1
}));
方法:SetCamera(int type)
type:1上帝视角 2第一人称
unityProvider.send('ReceiveFrontManager', 'SetCamera', 1);
方法:SetLookTartget(string id)
unityProvider.send('ReceiveFrontManager', 'SetLookTartget', '"model-1213213"');
方法:FrontSelectObject(string id)
回调:SelectObject(string id)
// 二维界面选中某个模型
unityProvider.send('ReceiveFrontManager', 'FrontSelectObject', 'model-1213213');
// 三维界面选中某个模型
unityProvider.on("SelectObject",(string id))=>{
返回的选中id
})
方法:UpdateObjectInfo(string data)
unityProvider.send('ReceiveFrontManager', 'UpdateObjectInfo', JSON.stringify({
components:{"模型id":"模型配置对象"}, //只传输创建的这个模型对象,非所有
layout:[{当前模型层}] //只传输创建的这个模型层,非所有,可以为空数组
}));
回调:UpdateObject(string json)
unityProvider.on("UpdateObject",(string json)=>{
json为上面传输的数据一样
})
回调:EventTrigger(string data)
目前事件有 onclick 、 ondblclick、onmouseover、onmouseout
unityProvider.on("EventTrigger ,(string data)=>{
id 是当前事件触发的模型id
eventname 事件名称
})
回调:EventCallBack(string data)
目前事件有 onclick 、 ondblclick、onmouseover、onmouseout
unityProvider.on("EventCallBack ,(string data)=>{
id 是当前事件触发的模型id
eventname 事件名称
})
方法:CreateAllObject(string data)
unityProvider.send('ReceiveFrontManager', 'CreateAllObject', JSON.stringify({
components:{"模型id":"模型配置对象",...}, //所有模型对象
layout:[{当前模型层},...] //所有模型层
}));
方法:GetInputKey(string key)
key参数为 KeyboardEvent 中的 e.key
unityProvider.send('ReceiveFrontManager', 'GetInputKey', e.key)
回调:UnityInit()
unityProvider.on("UnityInit",()=>{
// 这里面才能执行unity定义的方法
})
方法:SetTransformGizo(int type)
type : 类型1移动2旋转3缩放
unityProvider.send('ReceiveFrontManager', 'SetTransformGizo', 1)
方法:ObjectText(string data)
data : { id:string, text:string }
unityProvider.send('ReceiveFrontManager', 'ObjectText', JSON.stringify({
id:string,
text:string
}))
回调:UpdateProcess(float value)
value:0.25
unityProvider.on("UpdateProcess" ,(value)=>{
value //数字进度
})
回调:ObjCreateComplete(string str)
value:0.25
unityProvider.on("ObjCreateComplete" ,(str)=>{
str //id
})
方法:FlyLineCreate(string data)
unityProvider.send('ReceiveFrontManager', 'FlyLineCreate', JSON.stringify({
components:{"模型id":"模型配置对象",...}, //所有模型对象
layout:[{当前模型层},...] //所有模型层
}));
方法:CreateScene(string name) TestScene Build ChengDuScene
unityProvider.send('ReceiveFrontManager', 'CreateScene', 'TestScene');
方法:SetCameraDistance(string dis)
unityProvider.on("SetCameraDistance" ,(dis)=>{
str //数字
})
方法:SetDebug(string on)
unityProvider.send('ReceiveFrontManager', 'SetDebug', 'false');
方法:GISPos(string data)
unityProvider.send('ReceiveFrontManager', 'GISPos', JSON.stringify({
id:"模型id", //模型id
data:[{},...] //当前模型gis数据
}));
FAQs
The npm package dragv-cli-service-3d receives a total of 17 weekly downloads. As such, dragv-cli-service-3d popularity was classified as not popular.
We found that dragv-cli-service-3d demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.