cityjson / cityjson-threejs-loader Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I got the following error after using import { CityJSONLoader, CityJSONWorkerParser } from "cityjson-threejs-loader";
in script.js
.
The module was installed via npm i cityjson-threejs-loader
.
May I ask what the error means, and how to fix it?
Thanks.
Uncaught Error: Cannot find module './geometry/GeometryData'
webpackMissingModule bundle.9478a3eba0cd7458.js:56419
js bundle.9478a3eba0cd7458.js:56419
Webpack 6
__webpack_require__
js
__webpack_require__
<anonymous>
<anonymous>
<anonymous>
[bundle.9478a3eba0cd7458.js:56419:50](http://192.168.50.92:8080/bundle.9478a3eba0cd7458.js)
webpackMissingModule bundle.9478a3eba0cd7458.js:56419
js bundle.9478a3eba0cd7458.js:56419
Webpack 6
__webpack_require__
js
__webpack_require__
<anonymous>
<anonymous>
<anonymous>
Recent version of THREE.js have some breaking changes that impact this loader. Here is a short list of changes that might be of interest in cityjson-threejs-loader
:
Please clarify what license does the software have. Although the code is public for everyone to see, it is legally not possible to contribute or to reuse it in any way until the conditions for it are specified.
This is practically the same issue that cjio has. Geometries are deformed because the whole transform is applied very early in the process. This leads to floating point inaccuracies.
To reproduce the problem, load files in CityJSON Ninja (which uses cityjson-threejs-loader), and notice the difference. The test files are below
simplified2.city.json
simplified2_less_translation.city.json
My suggested solution is to only apply the scale from the transform
at first, do all the processing normally, and then add the translation
afterwards to the position
of loader.scene
(or if there's a better root node, then that).
These features are not supported yet:
Geometry instances
MultiLineStrings
MultiPoints
Hi,
I'm trying to use cityjson-threejs-loader in Angular 14 app.I'm trying to add cityjson-threejs-loader via the NPM package installer using,
npm install git+https://github.com/cityjson/cityjson-threejs-loader.git
your package was added to my node_modules but isn't working.
Here,
const parser = new CityJSONWorkerParser();
const loader = new CityJSONLoader(parser); //Got error: TS2554: Expected 0 arguments, but got 1.
loader.load("/assets/cityjsons/cube.city.json");
this.scene.add(loader.scene);
Could you help me, how can I integrate cityjson-threejs-loader with angular 14.
Thanks.
CityJSONWorkerParser
does a lot though I want more control and customisation over geometry generationCityJSONWorkerParser
tries to create its own worker)ChunkParser
has been helpful for me but it's not accessible via the root / index fileChunkParser
and GeometryParser
)cityjson-threejs-loader
in my own application on CodeSandboxnpm install cityjson-threejs-loader
./src
directory and build it at runtimenpm install cityjson-threejs-loader
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.