
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
This package provides WebAssembly bindings for the FlatCityBuf library, allowing for efficient CityJSON processing in the browser.
// Import the wasm module
import * as fcb from "fcb_wasm";
// Example CityJSON object
const cityJsonObject = {
type: "CityJSON",
version: "1.1",
transform: {
scale: [1.0, 1.0, 1.0],
translate: [0.0, 0.0, 0.0],
},
vertices: [
[0, 0, 0],
[1, 0, 0],
[1, 1, 0],
[0, 1, 0],
[0, 0, 1],
[1, 0, 1],
[1, 1, 1],
[0, 1, 1],
],
CityObjects: {
"id-1": {
type: "Building",
geometry: [
{
type: "Solid",
lod: "2",
boundaries: [
// Cube faces as example
[[[0, 1, 2, 3]]], // bottom face
[[[4, 5, 6, 7]]], // top face
[[[0, 1, 5, 4]]], // front face
[[[1, 2, 6, 5]]], // right face
[[[2, 3, 7, 6]]], // back face
[[[3, 0, 4, 7]]], // left face
],
},
],
},
},
};
// Convert CityJSON to OBJ
const objContent = fcb.cjToObj(cityJsonObject);
// Create a blob and download link
const blob = new Blob([objContent], { type: "text/plain" });
const url = URL.createObjectURL(blob);
// Create download link
const a = document.createElement("a");
a.href = url;
a.download = "citymodel.obj";
a.textContent = "Download OBJ";
document.body.appendChild(a);
The conversion process internally:
import * as fcb from "fcb_wasm";
async function loadFcb() {
// Create an HTTP FlatCityBuf reader
const reader = await new fcb.HttpFcbReader(
"https://example.com/path/to/model.fcb"
);
// Get CityJSON metadata
const metadata = await reader.cityjson();
console.log("CityJSON metadata:", metadata);
// Select all features and iterate
const iter = await reader.select_all();
const count = iter.features_count();
console.log(`Found ${count} features`);
// Process features
let feature;
while ((feature = await iter.next()) !== null) {
console.log("Feature:", feature);
}
}
loadFcb().catch(console.error);
cjToObj(cityJsonObject): Converts a CityJSON object to OBJ format string. Expects a valid CityJSON object as input.HttpFcbReader: Class for reading FlatCityBuf files over HTTPWasmSpatialQuery: Spatial query helper classWasmAttrQuery: Attribute query helper classFAQs
FlatCityBuf is a library for reading and writing CityJSON with FlatBuffers.
The npm package fcb_wasm receives a total of 0 weekly downloads. As such, fcb_wasm popularity was classified as not popular.
We found that fcb_wasm demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.