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

babylonwander

v1.5.0

Published

a extension tool for babylon's FreeCamera

Readme

babylonWander

基于Babylon的漫游手柄插件,该插件使用自己的配置来实现漫游功能,具体配置参考下面option

demo

Global

<script src="babylonWander.min.js"></script>  
<script>
    babylonWander(camera)
</script>

NPM

npm install

npm install babylonwander --save

use with ES6

import babylonWander from 'babylonwander'
babylonWander(camera)

or you can use with commonJS

let babylonWander=require('babylonwander')
babylonWander(camera)

option

let wander=babylonWander(camera,option)
  • camera:创建的漫游相机
  • option:漫游相关配置,默认配置如下

    默认canvas的父对象,可以通过 wander.setWrapper来更改

    • wrapper: canvas.parentElement

    碰撞椭圆体

    • ellipsoid: new BABYLON.Vector3(.5, 2, .5)

    重力

    • gravity: new BABYLON.Vector3(0, -9.8, 0)

    漫游code码,默认←↑→↓和AWDS

    • keysLeft: [37, 65]
    • keysUp: [38, 87]
    • keysRight: [39, 68]
    • keysDown: [40, 83]

    跳跃code码,默认space

    • keysJump: [32]

    漫游速度

    • speed: 1

    弹跳能力

    • jumpingAbility: 30

    允许弹跳间隔时间

    • jumpingTime: 600

    漫游灵敏度,50代表50像素达到最大值,所以数值越大越不灵敏

    • wanderSensibility: 50

    旋转视角灵敏度

    • rotateSensibility: 100

API

let wander=babylonWander(camera,option)

重新设置包裹漫游插件的DOM

  • wander.setWrapper(dom)

获取漫游插件的配置项

  • wander.getOption()

设置漫游插件的配置项

  • wander.setOption({...})

显示插件,并开启事件

  • wander.show()

隐藏插件,disposeEvent决定是否隐藏的同时也销毁事件

  • wander.hide(disposeEvent?: boolean)

手动销毁漫游插件.当babylon引擎销毁的时候会自动销毁漫游插件

  • wander.dispose()