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

@dlr-eoc/map-three

v15.0.0-next.1

Published

This is a angular module that exports a threejs component which uses a canvas of a OpenLayers map as a texture.

Downloads

205

Readme

@dlr-eoc/map-three

This module exposes a component ukis-map-three analogous to ukis-map-ol.

Motivation and approach

There are a few objects that are very big, but still irregularly shaped. Because they are big, it makes sense to serve their image-material per WMTS instead of a single, humongous file. Because they are irregularly shaped, it makes sense to display them in 3d.

Here we use threejs to address those requirements. A threejs scene is being created with orbit-control circling around a singular Mesh. This mesh makes use of a custom shader, that uses a canvas of a map in EPSG:4326 as a texture. This way, any map in EPSG:4326 can be wrapped around any shape. The texture-canvas is being kept in sync with the map. As such, when new tiles are loaded on the map, they are immediately visible on the mesh.

Design

We have attempted to create a design as similar as possible to the existing ukis-map-ol. There is a component MapThreeComponent that accepts all relevant parameters as @Input. There is a service MapThreeService that handles the actual setup of a threejs-scene and all other interaction with the threejs-API. We also sync the scene with MapStateService so that all maps in the app show the same information.

Contrary to ukis-map-ol, however, no LayerService or controls are expected. Instead, the component expects an MapOlService as inputs. The reason for this difference is that this component does in fact depend on openlayers: the map that is wrapped around our mesh must have been generated somewhere.

What if I only want to show the 3d-scene?

Create a ukis-map-ol anyway, but hide it behind ukis-map-three. This way, openlayers can still handle all the WMTS loading logic and other complicated map-functionality, while this component continues to focus on 3d-specific problems.

TODOs

  • avoid those gray areas where no texture is present. Either:
    • make ol-map larger (but make that new padding invisible to the user),
    • or store a full map extent (in small resolution) in a framebuffer and fall back to it when no texture is available.
  • extend the shader to handle lighting
  • implement a raycaster to handle click-events on the mesh (also returning geographic coordinate of click)
  • handle multi-center objects like 67P/Churyumov–Gerasimenko
  • use brower-cache so gltf models don't need to be reloaded