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

@here/harp-map-controls

v0.28.0

Published

Camera controller which implements a common default set of camera functionality in a map context.

Downloads

127

Readme

@here/harp-map-controls

Overview

This module provides MapControls and MapAnimations which implement a common default set of camera functionality in a map context.

Using the MapAnimations

The MapAnimations can simply be added to the existing MapView. The animations should not start from the beginning, but after a few seconds, so the MapView has time to load the data for the first tiles. A timeOut of 2000ms should be fine for most situations.

CameraRotationAnimation

For the CameraRotationAnimation, the MapControls that may be employed to manipulate the view should also be passed in, so the camera animation can pause during the manipulation.

const camRot = new CameraRotationAnimation(this.mapView, this.mapControls,
    {
        axis: new THREE.Vector3(0, 0, 1),
        duration: (20. * 1000),
        endAngle: 720
    });

this.mapView.addEventListener("render", (event: RenderEvent) => {
    camRot.update();
})

camRot.start();

CameraPanAnimation

The CameraPanAnimation is not connected to the MapControls. If moves along the specified path, while the camera orientation is not changed, it may be animated independently.

this.mapView.geoCenter = new GeoCoordinates(52.515276, 13.377689000000002, 8000);

const camPan = new CameraPanAnimation(this.mapView,
    {
        // low level flight above Berlin
        // duration: (40. * 1000),
        // geoCoordinates: [
        //     new GeoCoordinates(52.52006626, 13.40764352, 800),
        //     new GeoCoordinates(52.48094817, 13.3909456, 800),
        //     new GeoCoordinates(52.518611, 13.376111, 800)
        // ],

        // Longer lasting higher level flight above Germany and France.
        duration: (400. * 1000),
        geoCoordinates: [
            new GeoCoordinates(48.138137, 11.575682, 15000),
            new GeoCoordinates(50.93873, 6.95236, 10000),
            new GeoCoordinates(48.853190, 2.348585, 8000)
        ],

        repeat: Infinity,
        interpolation: InterpolationFunction.CatmullRom
    });

this.mapView.addEventListener("render", (event: RenderEvent) => {
    camPan.update();
})

camPan.start();