Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dlr-eoc/map-three

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlr-eoc/map-three

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

  • 12.0.1-next.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@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

Keywords

FAQs

Package last updated on 18 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc