npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

troila3d-ui

v0.1.69

Published

troila3d-ui

Readme

troila3d-ui

Getting Started

Install dependencies,

npm i troila3d-ui

使用:

import { ui } from 'troila3d-ui';
import 'troila3d-ui/dist/index.css';


// 场景 ID
{
  '卓朗': 'ZLScene'
  '4号楼':'FourScene'
  '首页':'Dashboard'
  '房间':'MachineRoom'
  '设备': 'Device'
  '楼层':'Floor'
  '绑定':'BindScene';
  '摄像头': 'Monitor'
}


/**
 * 公有方法 与 某个场景方法不能一起生效
*/

ui.on('common:deviceTreeSelect', (key) => {
  console.warn('key', key);
});

ui.on('common:spaceTreeSelect', (key) => {
  console.warn('key', key);
});

// 进入某个场景 spaceID 不是必传项, 传入内部会调用changeLocationNavigator 改变LOCATION
ui.entry('ZLScene', spaceID);


// 首页 点击“进入系统”
ui.on('Dashboard:onEnter', (key) => {
  console.warn('key', key);
});

// 卓朗 设备选择
ui.on('ZLScene:deviceTreeSelect', (key) => {
  console.warn('key', key);
});
// 环视
ui.on('ZLScene:around', (bool) => {
  console.warn('bool', bool);
});

// 卓朗 空间选择
ui.on('ZLScene:spaceTreeSelect', (key) => {
  console.warn('key', key);
  ui.entry('FourScene');
});
// 4号楼 设备选择
ui.on('FourScene:deviceTreeSelect', (key) => {
  console.warn('key', key);
});

// 4号楼 空间选择
ui.on('FourScene:spaceTreeSelect', (key) => {
  console.warn('key', key);
});

// 环视
ui.on('FourScene:around', (bool) => {
  console.warn('bool', bool);
});

// 合并 展开

ui.on('FourScene:open', (bool) => {
  console.warn('bool', bool);
});

// 楼层 设备选择
ui.on('Floor:deviceTreeSelect', (key) => {
  console.warn('key', key);
});

// 楼层 空间选择
ui.on('Floor:spaceTreeSelect', (key) => {
  console.warn('key', key);
});

// 楼层 点击最近告警
ui.on('Floor:lasterWarnClick', (key) => {
  console.warn('key', key);
});


// 楼层 切换楼层
ui.on('Floor:floorSelect', (key) => {
  console.warn('key', key);
});

// 楼层 切换房间
ui.on('Floor:roomSelect', (key) => {
  console.warn('key', key);
});

// 楼层 点击监控
ui.on('Floor:monitorSelect', (key) => {
  console.warn('key', key);
});

// 绑定点击行
ui.on('BindScene:bindRowSelect', (key) => {
  console.warn('key', key);
});


// 传入模型ID ,改变空间面包屑
ui.changeLocationNavigator('0_136');

// 点击模型 传入ID, 触发事件 clickModel
ui.clickModel('0_108');

// 点击摄像头 传入ID,显示弹框
ui.monitorClick('0_108');

// 点击异常设备模型 传入ID, 触发事件 clickWarnFlash
ui.clickWarnFlash('0_108');


// 房间 设备选择
ui.on('MachineRoom:deviceTreeSelect', (key) => {
  console.warn('key', key);
});

// 房间 空间树选择
ui.on('MachineRoom:spaceTreeSelect', (key) => {
  console.warn('key', key);
});

// 房间 点击最近告警
ui.on('MachineRoom:lasterWarnClick', (key) => {
  console.warn('key', key);
});

// 房间 切换房间
ui.on('MachineRoom:roomSelect', (key) => {
  console.warn('roomSelect', key);
});

// 房间 点击温度
ui.on('MachineRoom:temperatureSelect', (temperatures) => {
  console.warn('temperatureSelect', temperatures);
});


// 房间 鼠标移入线图
ui.on('MachineRoom:lineMouseEnter', (id) => {
  console.warn('id', id);
});

// 房间 鼠标移出线图
ui.on('MachineRoom:lineMouseLeave', (id) => {
  console.warn('id', id);
});


//设备 空间树选择
ui.on('Device:spaceTreeSelect', (key) => {
  console.warn('key', key);
});

//设备 左下角小地图房间切换
ui.on('Device:roomSelect', (key) => {
  console.warn('key', key);
});