
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
maptalks.three
Advanced tools
A maptalks Layer to render with THREE.js
npm install maptalks.three
.https://unpkg.com/maptalks.three/dist/maptalks.three.min.js
As a plugin, maptalks.three
must be loaded after maptalks.js
and THREE.js
in browsers.
<script type="text/javascript" src="https://unpkg.com/three@0.84.0/build/three.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/maptalks/dist/maptalks.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/maptalks.three/dist/maptalks.three.js"></script>
<script>
var threeLayer = new maptalks.ThreeLayer('t');
threeLayer.prepareToDraw = function (gl, scene, camera) {
var light = new THREE.PointLight(0xffffff, 0.8);
camera.add(light);
var me = this;
countries.features.forEach(function (g) {
var num = g.properties.population;
var color = getColor(num);
var m = new THREE.MeshPhongMaterial({color: color, opacity : 0.7});
var mesh = me.toExtrudeGeometry(maptalks.GeoJSON.toGeometry(g), num / 4E2, m);
if (Array.isArray(mesh)) {
scene.add.apply(scene, mesh);
} else {
scene.add(mesh);
}
});
};
map.addLayer(threeLayer);
</script>
IE 11, Chrome, Firefox, other modern and mobile browsers that support WebGL;
ThreeLayer
is a subclass of maptalks.CanvasLayer and inherits all the methods of its parent.
Constructor
new maptalks.ThreeLayer(id, options)
We welcome any kind of contributions including issue reportings, pull requests, documentation corrections, feature requests and any other helps.
The only source file is index.js
.
It is written in ES6, transpiled by babel and tested with mocha and expect.js.
$ npm install
$ gulp watch
$ npm test
$ gulp tdd
$ gulp minify
$ npm run lint
FAQs
A maptalks Layer to render with THREE.js.
The npm package maptalks.three receives a total of 292 weekly downloads. As such, maptalks.three popularity was classified as not popular.
We found that maptalks.three demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.