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 🙏

© 2024 – Pkg Stats / Ryan Hefner

zzq-ue

v0.0.6

Published

网页-ue/像素流-H5交互封装

Downloads

390

Readme

zzq-cli

Npm 版本

📖 简介

用于前端项目与ue项目交互(包括ue引擎嵌套前端项目,或前端嵌套ue像素流两种方式)

🔩 安装

npm install zzq-ue

📚 使用

由于ue引擎嵌套前端项目、前端嵌套ue像素流是两种不同的接入方式,所以也就导致交互方式也是不同

使用ueSend、ueRegister发送和接收事件是会在内部通过判断当钱环境来决定使用哪种交互方式的

UE_ENV为ue的环境变量

onSetEnv为环境发生变化时的回调

pcSetEnv为手动更改当前环境的方法

💡 API

ue嵌套前端环境下

pcSend()

由前端发送事件给ue引擎

参数:eventName: 事件名称;params: 事件参数;option: 配置项 ;

配置项默认为:{ isLog: false, isJson: false }

isLog: 是否打印日志,默认为false

isJson: 参数是否为json格式,默认为false

pcRegister()

由前端注册ue引擎发送过来的事件

参数:eventName: 事件名称 ; callback: 回调函数  ;

前端嵌套ue像素流环境下

psLoad()

加载像素流画面

参数:path:ws地址;callback:回调函数

psSend()

前端发送时间给像素流

参数:eventName:事件名称;params:事件参数

psRegister()

前端注册像素流发送过来的事件

  参数:eventName:事件名称;callback:回调函数

psUnregister()

移除监听的像素流事件

  参数:eventName:事件名称

psDisconnect()

断开像素流

psClose()

关闭像素流

通用模式

会根据当前设置的环境自动判断发送和接受事件的方式,适合项目中会切换显示方式的场景

ueSend

前端发送事件给ue引擎,参数同上

ueRegister

前端注册ue引擎发送过来的事件,参数同上

onSetEnv

环境发生变化时的回调

pcSetEnv

手动更改当前环境

UE_ENV

当前模式的环境变量