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

vr-navigation

v0.16.1

Published

```bash tnpm install --save @alipay/mas-vr-navigation ```

Downloads

41

Readme

安装

tnpm install --save @alipay/mas-vr-navigation

组件介绍

vr 全景球

参数说明

属性 | 必填 | 参数类型 | 参数说明 | 默认值 | 示例 --|:--:|:--:|:--:|:--: | :-: src | 是 | string | 资源包地址可为 url,也可为本地路径 | --- | -- ballId | 是 | string | 全景球素材 | --- | root scene | 是 | string | 场景名称 | --- | -- sceneNodesMap | 是 | object | 场景对应表 | --- | -- destinationId | 否 | string | 目的地素材 | --- | -- onDetectDestination | 否 | function | 目的地偏离检测 | --- | -- visibleWhenTapMap | 否 | object | 点击可见素材表 | --- | -- animationNodesMap | 否 | object | 动画素材表 | --- | -- checkInterval | 否 | number | 检测全景球是否在运行间隔 | 100 | -- checkTime | 否 | number | 检测全景球是否在运行时间 | 2000 | -- normalInterval | 否 | number | 启动之后的检测间隔 | 5000 | -- headingLength | 否 | number | 检测定位的次数 | 5 | -- iosVersion | 否 | string | 兼容的ios版本 | 10.2.3 | -- androidVersion | 否 | string | 兼容的android版本 | 10.2.6 | -- swipeDegress | 否 | number | 滑动角度 | 10 | -- offsetDegress | 否 | number | 偏离角度 | 30 | -- destinationInterval | 否 | number | 目的地检测间隔 | 1500 | -- visibleWhenTapInterval | 否 | number | 点击可见素材间隔 | 3000 | -- animationInterval | 否 | number | 动画间隔 | 100 | --

在小程序中使用

{
  "usingComponents": {
    "mas-vr-navigation": "@alipay/mas-vr-navigation/es/index"
  }
}

在 page.axml 中引用组件

<!-- 页面使用方式 -->
 <mas-vr-navigation
    src="{{src}}"
    scene="{{scene}}"
    sceneNodesMap="{{sceneNodesMap}}"
    onFail="onFail"
    onNodeTap="onNodeTap"
    ballId="{{ballId}}"
    onDetectDestination="onDetectDestination"
    destinationId="pPlane_door2"
  />
Page({
  data: {
    ballId: 'root',
    src: 'https://gw.alipayobjects.com/os/bmw-prod/273ae6c3-8b04-4f7e-bdc5-6224d923142a.dat',
    scene: 'a',
    sceneNodesMap: {
      a: ['pPlane_door2'],
      b: ['pPlane_door3', 'pPlane_door4', 'pPlane_door2'],
      c: ['pPlane_door4'],
      d: ['pPlane_door5'],
    },
  },
  onLoad() {},
  changeSrc() {
    this.setData({
      src: `https://gw.alipayobjects.com/os/bmw-prod/273ae6c3-8b04-4f7e-bdc5-6224d923142a.dat?a=123${Math.random()}`,
    });
  },
  changeScene(e) {
    my.alert({
      content: e.target.dataset.scene,
    });
    this.setData({
      scene: e.target.dataset.scene,
    });
  },
  onFail(e) {
    my.alert({
      content: `失败${e.type}`,
    });
  },
  onNodeTap(e) {
    my.alert({
      content: e.nodeId,
    });
  },
  onDetectDestination(e) {
    // e.direction 为当前偏离方向,值为1(目的地没有偏离), 4(目的地在右侧),8(目的地在左侧),2(需要转身)
    this.setData({
      direction: e.direction,
    })
  }
});

Badges

TNPM version TNPM downloads [![install size][install-size-image]][install-size-url]