Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
threebox-plugin
Advanced tools
A Three.js plugin for Mapbox GL JS, using the CustomLayerInterface feature. Provides convenient methods to manage objects in lnglat coordinates, and to synchronize the map and scene cameras.
Threebox
A Three.js plugin for Mapbox GL JS and Azure Maps using the CustomLayerInterface
feature. Provides convenient methods to manage objects in lnglat coordinates, and to synchronize the map and scene cameras.
Latest code release is , please review the Change log for more details.
Threebox is also available as an nmp package
npm i threebox-plugin
Models built-in & custom animations | Mouse over/out, Selected, Drag&Drop, Drag&Rotate, Wireframe |
---|---|
Tooltips using altitude | Optimization of camera perspective and depth |
---|---|
Runtime style change | Optimized performance through cache |
---|---|
Customizable FOV | Geojson and Points Extrusions |
---|---|
Sunlight illumination for a given datetime and lnglat | Models built-in shadows and sky layer synced with Sunlight |
---|---|
Only in this fork, there is a list of new features implemented on top of the amazing work from @peterqliu:
setLayerZoomRange
and setLayoutProperty
on Custom Layers (not available in Mapbox).removeLayer
considering Object3D.setStyle
and keeping Object3D.All the Threebox Documentation has been completely updated, including all the methods, properties and events implemented in Threebox and objects, but still 'work in progress' adding better documented examples and images to illustrate Threebox capabilities.
You can use threebox in three different ways.
Add threebox to your project via npm package :
npm install threebox-plugin
Then you will need to import Threebox object in your code. Depending your javascript framework this might be different.
import { Threebox } from 'threebox-plugin';
Depending the framework, wrapper or bundler you ar using, try with this:
import { Threebox } from 'threebox-plugin/dist/threebox';
Download the bundle from dist/threebox.js
or dist/threebox.min.js
and include it in a <script>
tag on your page.
If you want to use styles predefined, add the link to the cascade style sheet, just ensure the src
and href
attributes are pointing to relative or absolute url path.
<script src="../dist/threebox.js" type="text/javascript"></script>
<link href="../dist/threebox.css" rel="stylesheet" />
Threebox can be also used from different public CDNs:
This CDN has the particularity that always requires the version of the package to download individual files.
<script src="https://cdn.jsdelivr.net/gh/jscastro76/threebox@v.2.2.2/dist/threebox.min.js" type="text/javascript"></script>
<link href="https://cdn.jsdelivr.net/gh/jscastro76/threebox@v.2.2.2/dist/threebox.css" rel="stylesheet" />
Despite this CDN admits version, if omitted, it will download always the last one published.
<script src="https://unpkg.com/threebox-plugin/dist/threebox.min.js" type="text/javascript"></script>
<link href="https://unpkg.com/threebox-plugin/dist/threebox.css" rel="stylesheet" />
For an specific version (i.e. v2.2.1) use the followin:
<script src="https://unpkg.com/threebox-plugin@2.2.1/dist/threebox.min.js" type="text/javascript"></script>
<link href="https://unpkg.com/threebox-plugin@2.2.1/dist/threebox.css" rel="stylesheet" />
Several introductory examples are here.
To run them, create a config.js
file with your Mapbox-gl-js access token, alongside and in the format of the template.
npm run build
to get the minimized version, or npm run dev
to get the development version and rebuild continuously as you develop.dist/
folder.Tests live here.
npm run test
, this will create tests\threebox-tests-bundle.js
threebox-tests.html
and check the console for test results.Sample to get a full build from scratch for Visual Studio:
.npm [ProjectName] init -y
.npm [ProjectName] install
.npm [ProjectName] i
.npm [ProjectName] run dev
or .npm run build
2.2.7
Minor version by @jscastro76, some enhancements and bugs.
enableHelpTooltips
)FAQs
A Three.js plugin for Mapbox GL JS, using the CustomLayerInterface feature. Provides convenient methods to manage objects in lnglat coordinates, and to synchronize the map and scene cameras.
The npm package threebox-plugin receives a total of 2,541 weekly downloads. As such, threebox-plugin popularity was classified as popular.
We found that threebox-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.