Socket
Socket
Sign inDemoInstall

@2gis/mapgl-gltf

Package Overview
Dependencies
0
Maintainers
9
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @2gis/mapgl-gltf

Plugin for the rendering glTF models with MapGL


Version published
Maintainers
9
Install size
131 kB
Created

Readme

Source

mapgl-gltf

Plugin for the rendering glTF models with MapGL

The basic usage via npm package

Install @2gis/mapgl and @2gis/mapgl-gltf packages:

npm install @2gis/mapgl
npm install @2gis/mapgl-gltf

Import mapgl and plugin into your project:

import { load } from '@2gis/mapgl';
import { GltfPlugin } from '@2gis/mapgl-gltf';

const mapglAPI = await load();

const map = new mapglAPI.Map('container', {
    center: [82.886554, 54.980988],
    zoom: 18,
});

const plugin = new GltfPlugin(map);
plugin.addModels([{
    modelId: '03a234cb',
    coordinates: [82.886554, 54.980988],
    modelUrl: 'models/cube_draco.glb',
    rotateX: 90,
    scale: 1000,
    linkedIds: ['141373143530065', '70030076379181421'],
}]);

Testing

If you write screenshot tests, you will need run npm run docker:test after coding. This command runs your tests on the docker image that is used in pipeline build. This guarantees the authenticity of the screenshots used.

Documentation

You can find the more information in the official documentation.

FAQs

Last updated on 27 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc