{"_id":"3dtiles-geo-transform","_rev":"2-0919aab34021c5368546fdc628b75376","name":"3dtiles-geo-transform","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"3dtiles-geo-transform","version":"1.0.0","keywords":["3d-tiles","geographic-coordinates","coordinate-transformation","cesium","three.js","ecef","wgs84","gltf","react","geospatial","cesium-rtc"],"author":{"name":"SohMitian"},"license":"MIT","_id":"3dtiles-geo-transform@1.0.0","maintainers":[{"name":"soh92","email":"pix4soh@gmail.com"}],"homepage":"https://github.com/SohMitian/3dtiles-geo-transform#readme","bugs":{"url":"https://github.com/SohMitian/3dtiles-geo-transform/issues"},"dist":{"shasum":"259753addd6d1f5d2783c50dcbcd23f07531b1c5","tarball":"https://registry.npmjs.org/3dtiles-geo-transform/-/3dtiles-geo-transform-1.0.0.tgz","fileCount":8,"integrity":"sha512-ZH272sVuKSrnyyrnjk0BF+7nViao4Ea8RJf7sQCLWZJpLw1aIJJDnknuOvVOdHn+hms89i0gUVRotdCORYQKrw==","signatures":[{"sig":"MEQCIE40lqpPFey0B2wYdI3OamwByMC9ix0lFKhnnZjQxpFTAiA2W0at7mkuNs1a3aMRPr1gscDC08Xv3jQlsoOgisU2eg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113634},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.esm.js","require":"./dist/index.cjs"}},"gitHead":"5c46f2354c7658b478acc816332a938c8c7f28af","scripts":{"dev":"rollup -c -w","test":"jest","build":"rollup -c","prepublishOnly":"npm run build"},"_npmUser":{"name":"soh92","email":"pix4soh@gmail.com"},"repository":{"url":"git+https://github.com/SohMitian/3dtiles-geo-transform.git","type":"git"},"_npmVersion":"11.4.2","description":"Geographic coordinate transformation library for 3D Tiles with Three.js and React support","directories":{"test":"tests","example":"example"},"_nodeVersion":"24.4.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","tslib":"^2.6.2","rollup":"^4.13.0","ts-jest":"^29.1.2","typescript":"^5.4.3","@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/react":"^19.1.12","@types/three":"^0.179.0","rollup-plugin-dts":"^6.1.0","@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-typescript":"^11.1.6","@rollup/plugin-node-resolve":"^15.2.3"},"peerDependencies":{"react":">=16.8.0","three":">=0.150.0","@react-three/fiber":">=8.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true},"@react-three/fiber":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/3dtiles-geo-transform_1.0.0_1756734041534_0.7020993567849594","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"3dtiles-geo-transform","version":"1.0.1","description":"Geographic coordinate transformation library for 3D Tiles with Three.js and React support","keywords":["3d-tiles","geographic-coordinates","coordinate-transformation","cesium","three.js","ecef","wgs84","gltf","react","geospatial","cesium-rtc"],"homepage":"https://github.com/SohMitian/3dtiles-geo-transform#readme","bugs":{"url":"https://github.com/SohMitian/3dtiles-geo-transform/issues"},"repository":{"type":"git","url":"git+https://github.com/SohMitian/3dtiles-geo-transform.git"},"license":"MIT","author":{"name":"SohMitian"},"main":"dist/index.cjs","module":"dist/index.esm.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.cjs","default":"./dist/index.esm.js"}},"directories":{"example":"example","test":"tests"},"scripts":{"build":"rollup -c","dev":"rollup -c -w","test":"jest","prepublishOnly":"npm run build"},"devDependencies":{"@rollup/plugin-commonjs":"^25.0.7","@rollup/plugin-node-resolve":"^15.2.3","@rollup/plugin-typescript":"^11.1.6","@types/jest":"^29.5.12","@types/node":"^20.11.30","@types/react":"^19.1.12","@types/three":"^0.179.0","jest":"^29.7.0","rollup":"^4.13.0","rollup-plugin-dts":"^6.1.0","ts-jest":"^29.1.2","tslib":"^2.6.2","typescript":"^5.4.3"},"peerDependencies":{"@react-three/fiber":">=8.0.0","react":">=16.8.0","three":">=0.150.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true},"@react-three/fiber":{"optional":true}},"_id":"3dtiles-geo-transform@1.0.1","gitHead":"282fd4cb053ee87b90554e4a85d4e646d9f0f09d","_nodeVersion":"24.4.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-4e8/zci0hXxH56fxignyyiSu8Kkr9ny9PhpRV1NTi+u0OwX0ddIC+ztUrava4uF3NpTr+IZl8+G6DnmFLlEthw==","shasum":"47c53381b5a35baa0904d99b3d5ff47b0b982b47","tarball":"https://registry.npmjs.org/3dtiles-geo-transform/-/3dtiles-geo-transform-1.0.1.tgz","fileCount":8,"unpackedSize":113557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHvgdfkHCD0yPKImJFcn9WYVGoSzkKym1q2TVqb4qh10AiBoi47u6X+fe1F+xPchzYUGxt0JoMyJ/DFnnKFla8RqQw=="}]},"_npmUser":{"name":"soh92","email":"pix4soh@gmail.com"},"maintainers":[{"name":"soh92","email":"pix4soh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/3dtiles-geo-transform_1.0.1_1756737311774_0.007666272441972044"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-01T13:40:41.534Z","modified":"2025-09-01T14:35:12.110Z","1.0.0":"2025-09-01T13:40:41.721Z","1.0.1":"2025-09-01T14:35:11.937Z"},"bugs":{"url":"https://github.com/SohMitian/3dtiles-geo-transform/issues"},"author":{"name":"SohMitian"},"license":"MIT","homepage":"https://github.com/SohMitian/3dtiles-geo-transform#readme","keywords":["3d-tiles","geographic-coordinates","coordinate-transformation","cesium","three.js","ecef","wgs84","gltf","react","geospatial","cesium-rtc"],"repository":{"type":"git","url":"git+https://github.com/SohMitian/3dtiles-geo-transform.git"},"description":"Geographic coordinate transformation library for 3D Tiles with Three.js and React support","maintainers":[{"name":"soh92","email":"pix4soh@gmail.com"}],"readme":"# 3dtiles-geo-transform\n\nA geographic coordinate transformation library for 3D Tiles, providing ECEF (Earth-Centered, Earth-Fixed) coordinate transformations and CESIUM_RTC extension support for Three.js and React applications.\n\n## Features\n\n- 🌍 **Geographic Coordinate Transformation**: Convert 3D Tiles from ECEF/WGS84 coordinates to local coordinate systems\n- 🎮 **CESIUM_RTC Support**: Handle Cesium's Relative To Center (RTC) extension for improved precision\n- ⚡ **Three.js Integration**: Seamless integration with Three.js for 3D rendering\n- ⚛️ **React Components**: Ready-to-use React components for React Three Fiber applications\n- 📦 **TypeScript Support**: Full TypeScript definitions included\n- 🚀 **Framework Agnostic Core**: Core transformation logic can be used independently\n\n## Installation\n\n```bash\nnpm install 3dtiles-geo-transform\n```\n\nor\n\n```bash\nyarn add 3dtiles-geo-transform\n```\n\n## Quick Start\n\n### Basic Three.js Usage\n\n```javascript\nimport { CesiumRTCPlugin, createTransformMatrix } from '3dtiles-geo-transform';\nimport { TilesRenderer } from '3d-tiles-renderer';\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';\n\n// Setup GLTF loader with CESIUM_RTC support\nconst gltfLoader = new GLTFLoader();\ngltfLoader.register((parser) => new CesiumRTCPlugin(parser));\n\n// Create tiles renderer\nconst tilesRenderer = new TilesRenderer(tilesetUrl);\ntilesRenderer.manager.addHandler(/\\.gltf$/, gltfLoader);\n\n// Apply geographic transformation\nconst center = new THREE.Vector3(x, y, z); // ECEF coordinates\nconst transformMatrix = createTransformMatrix(center);\ntilesRenderer.group.applyMatrix4(transformMatrix);\n```\n\n### React Three Fiber Usage\n\n```jsx\nimport { TilesetTransformComponent } from '3dtiles-geo-transform';\nimport { Canvas } from '@react-three/fiber';\n\nfunction App() {\n  return (\n    <Canvas>\n      <TilesetTransformComponent>\n        {/* Your 3D Tiles components */}\n      </TilesetTransformComponent>\n    </Canvas>\n  );\n}\n```\n\n## API Reference\n\n### Core Functions\n\n#### `ecefToLngLat(x, y, z)`\nConvert ECEF coordinates to longitude/latitude/height.\n\n#### `lngLatToEcef(lng, lat, height)`\nConvert longitude/latitude/height to ECEF coordinates.\n\n#### `createTransformMatrix(center)`\nCreate a transformation matrix for converting from ECEF to local coordinates.\n\n### Three.js Classes\n\n#### `CesiumRTCPlugin`\nGLTFLoader plugin for handling CESIUM_RTC extension.\n\n```javascript\nconst plugin = new CesiumRTCPlugin(parser);\n```\n\n#### `TilesetTransform`\nClass for managing 3D tileset transformations.\n\n### React Components\n\n#### `TilesetTransformComponent`\nReact component that provides transformation context for child components.\n\n## Supported Data\n\nThis library works with any 3D Tiles dataset that uses:\n- WGS84/ECEF coordinate system\n- CESIUM_RTC extension\n- Standard 3D Tiles format (OGC specification)\n\nCompatible with:\n- Geographic 3D city models\n- Cesium ion tilesets\n- Any geographic 3D Tiles data\n\n## Example\n\nCheck out the `example/` directory for a complete working example using geographic 3D Tiles data.\n\n```bash\ncd example\nnpm install\nnpm start\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the library\nnpm run build\n\n# Run tests\nnpm test\n\n# Start development mode\nnpm run dev\n```\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Roadmap\n\n- [ ] Babylon.js support\n- [ ] WebGL-only implementation\n- [ ] Additional coordinate systems support\n- [ ] Performance optimizations\n\n## Credits\n\nThis library is designed to work with geographic 3D Tiles data from various sources, including government and commercial providers worldwide.","readmeFilename":"README.md"}