-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
three.js draw geojson #125
Comments
Can you share 1 or 2 items from your geoJson file? |
Hi @skypan, I found what’s the problem you’re having... the buildings shake, aren’t they? |
I have uploaded a new example with extrusions read from a geojson file with real complex features from the composite layer. I have created a new method |
- add options.rotate and options.scale for Objects3D #126 - Create a new example with Three.js extrusions based on standard geoJson #127 Added a new example [17-extrusions.html](https://github.com/jscastro76/threebox/blob/master/examples/17-extrusions.html) - Convert internal variables (`selectedObject`, `draggedObject`, ...) into instance variables #130 - Deprecate `tb.setLayerZoomVisibility`, overlaps with `tb.toggleLayer` #134 - when an object is wireframed, all its clones are too #124 - Error when wireframing all the objects #131 - While dragging an object if mouse overs a label it stops dragging #132 - A layer shouldn't be shown explicitely if it's not in the right zoom range #133
@jscastro76 thanks your anwser, I try it and it works good, before that my local's case is shake indeed,after that I will try it with the shadermaterial and show the special effects |
@skypan glad to hear it worked well in your scenario. Don’t forget to share the result when you add the shader and those effects, I’d love to see it! |
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs. #### ✨ Enhancements - #125 three.js draw geojson. - #126 add options.rotate and options.scale for Objects3D. - #127 Create a new example with Three.js extrusions based on standard geoJson. Added a new example [17-extrusions.html](https://github.com/jscastro76/threebox/blob/master/examples/17-extrusions.html) - #130 Convert internal variables (`selectedObject`, `draggedObject`, ...) into instance variables . - #134 Deprecate `tb.setLayerZoomVisibility`, overlaps with `tb.toggleLayer`. - #138 expose `SunCalc.toJulian` #### 🪲 Bug fixes - #124 when an object is wireframed, all its clones are too. - #131 Error when wireframing all the objects. - #132 While dragging an object if mouse overs a label it stops dragging. - #133 A layer shouldn't be shown explicitely if it's not in the right zoom range.
Can the examples provides : draw buildings and loads with three.js and geojson, so that i can draw then with threejs's ability
i try to draw then by the ExtrudeBufferGeometry, but the result is bad , my code is
` addBuildings(data, info, height) {
height = height ? height : 1;
}
genShape(points) {
let shape = new THREE.Shape();
}
genGeometry(shape, settings) {
// 2d 拉伸到 3d
let geometry = new THREE.ExtrudeBufferGeometry(shape, settings);
geometry.computeBoundingBox();
return geometry;
}`
now the way of draw buildings is that mapbox's fill-extrusion, but i can not add the special effects, such as Sweep light
The text was updated successfully, but these errors were encountered: