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 🙏

© 2026 – Pkg Stats / Ryan Hefner

game-kelaqi2

v0.0.1

Published

``` npm install game-kelaqi2 ```

Readme

game-kelaqi2

游戏

安装
npm install game-kelaqi2
使用
必须开启 "enableSkia": "true"
  • json
{
    "usingComponents": {
        "game": "game-kelaqi2/index"
    }
}
  • mini.project.json
{
  "node_modules_es6_whitelist": [
    "common-game"
  ]
}
  • js
Page({
  data: {
    gameSource: JSON.stringify({
      baseOps: {
        moveSpeed: 20,//点击一次移动的距离
        showX: 750 / 2,
        modelY: 1000,//model显示的Y
        otherY: 100,//其他碎片元素出现的时候位置
        isAni: !true,//是否动画移动
        aniTime: 0.1,//动画时间
      },
      items: [
        {
          model: { src: "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01E3AF9D1EUdMKAzdKJ_!!2185320355.png" },
          arr: [
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01v7Vxe91EUdMQ09WI8_!!2185320355.png", endPosOffset: { x: 88, y: 213 } },
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01ZBVrnr1EUdMNz2bUf_!!2185320355.png", endPosOffset: { x: 88, y: 104 } },
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01zaqQ341EUdMJUcKCo_!!2185320355.png", endPosOffset: { x: 88, y: 53 } },
            { src: "https://img.alicdn.com/imgextra/i4/2185320355/O1CN01zRpPhF1EUdMH3swVJ_!!2185320355.png", endPosOffset: { x: 123, y: 35 } },
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01EbtekL1EUdMJPKhmx_!!2185320355.png", endPosOffset: { x: 41, y: 78 } },
          ]
        },
        {
          model: { src: "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01by5eCM1EUdMJPO7yr_!!2185320355.png" },
          arr: [
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01KuvG0E1EUdMOlyoZH_!!2185320355.png", endPosOffset: { x: 90, y: 210 } },
            { src: "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01cYTTJY1EUdMKB3K6D_!!2185320355.png", endPosOffset: { x: 90, y: 90 } },
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01HsM6tw1EUdMQ0CsLQ_!!2185320355.png", endPosOffset: { x: 90, y: 70 } },
            { src: "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01K7cDe61EUdMN1NQnW_!!2185320355.png", endPosOffset: { x: 37, y: 62 } },
            { src: "https://img.alicdn.com/imgextra/i4/2185320355/O1CN01LwuhKA1EUdMLGPxRr_!!2185320355.png", endPosOffset: { x: 127, y: 108 } },
          ]
        },
        {
          model: { src: "https://img.alicdn.com/imgextra/i3/2185320355/O1CN01dXveZ31EUdMEmTzcq_!!2185320355.png" },
          arr: [
            { src: "https://img.alicdn.com/imgextra/i3/2185320355/O1CN01i7N3CX1EUdMLhcuoG_!!2185320355.png", endPosOffset: { x: 90, y: 210 } },
            { src: "https://img.alicdn.com/imgextra/i3/2185320355/O1CN017rWaDC1EUdMLhdmsR_!!2185320355.png", endPosOffset: { x: 90, y: 92 } },
            { src: "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01PhsHkg1EUdMLGTiRm_!!2185320355.png", endPosOffset: { x: 95, y: 55 } },
            { src: "https://img.alicdn.com/imgextra/i3/2185320355/O1CN017iGFsK1EUdMGLvPpE_!!2185320355.png", endPosOffset: { x: 45, y: 76 } },
            { src: "https://img.alicdn.com/imgextra/i3/2185320355/O1CN01nxvKxK1EUdMN1PFDb_!!2185320355.png", endPosOffset: { x: 126, y: 102 } },
          ]
        },
      ],
      timePos: {
        align: "center",
        x: 594,
        y: 280,
        // 时间数字图片 0 - 9
        numOffset: 0,//数字两边空白太多,增加偏移量
        numArr: [
          { "src": "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01A3hENV1EUdMOljZZ7_!!2185320355.png", "val": ".", "width": "4", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01YwK25n1EUdMRwbccP_!!2185320355.png", "val": "s", "width": "11", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i3/2185320355/O1CN01qAArfR1EUdMJUQZb5_!!2185320355.png", "val": "0", "width": "12", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01HpTSMQ1EUdMN17Jrb_!!2185320355.png", "val": "1", "width": "11", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01oSOLjE1EUdMNyjoCa_!!2185320355.png", "val": "2", "width": "13", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i2/2185320355/O1CN018qLoqE1EUdMGLcYCM_!!2185320355.png", "val": "3", "width": "13", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01Faf4kZ1EUdMOlhh95_!!2185320355.png", "val": "4", "width": "14", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i3/2185320355/O1CN0130fwyM1EUdMQlMRqe_!!2185320355.png", "val": "5", "width": "13", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01f0Mudv1EUdM9uVghE_!!2185320355.png", "val": "6", "width": "12", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i4/2185320355/O1CN01UU02v31EUdMOlg1C6_!!2185320355.png", "val": "7", "width": "13", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i1/2185320355/O1CN01MlfzY31EUdMEmCfbF_!!2185320355.png", "val": "8", "width": "13", "height": "19" },
          { "src": "https://img.alicdn.com/imgextra/i2/2185320355/O1CN01UAAYex1EUdMGLcgWL_!!2185320355.png", "val": "9", "width": "13", "height": "19" },
        ],
      },
    }),
  },
  onLoad(query) {
  },

  playFun() {
    this.gameComponent.onEvent("start");
  },
  resetFun() {
    // reset: true:强制刷新 false:游戏结束才重置有效
    this.gameComponent.onEvent("reset", { reset: !true, idx: 1 });
  },

  onInitDone(e) {
    console.log("游戏初始化完成...")
    this.gameComponent = e.ref;

    // 参数对应items下标,渲染对应数据
    this.gameComponent.onEvent("init2", 0);
  },
  onUpdate(ops) {
    // { totalScore: 0, imgObj: { } }
    console.log("update:", ops)
  },
  onGameOver(totalScore) {
    console.log("gameOver:", totalScore)
  }
})
  • xaml
  <view class="pageBox">
    <game gameSource="{{gameSource}}" 
      onInitDone="onInitDone" 
      onUpdate="onUpdate" 
      onGameOver="onGameOver"
      />
  </view>

  <view onTap="playFun" style="position:absolute;left: 40%;bottom: 100rpx;">开始</view>
  <view onTap="resetFun" style="position:absolute;left: 50%;bottom: 100rpx;">重置</view>
  • acss
.pageBox{
  position: absolute;
  width: 750rpx;
  height: 1200rpx;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}