Skip to content

Commit

Permalink
v.2.0.4
Browse files Browse the repository at this point in the history
Issues #13, #15, #16, #17, #18, #19, #20, #21, #22
  • Loading branch information
jscastro76 committed Jul 25, 2020
1 parent d2dd81a commit c957983
Show file tree
Hide file tree
Showing 56 changed files with 225,714 additions and 243 deletions.
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## 2.0.4

Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### :sparkles: Enhancements

- Update to *Mapbox GL* v1.11..
- [**#13**](https://github.com/jscastro76/threebox/issues/13) Refactored `tube` and `Object3D` including now all the events, behaviors, `.tooltip` `.boundingBox` and `.boundingBoxShadow` and behave like 3D models loaded through `tb.loadObj`
- [**#15**](https://github.com/jscastro76/threebox/issues/15) Removed modules from the solution.
- [**#17**](https://github.com/jscastro76/threebox/issues/17) 3D models and Objects3D have a new config param `anchor` as string, that will be used to calculate dynamically the position of the object pivotal anchor to the coords it's positioned. This could have the following values `top`, `bottom`, `left`, `right`, `center`, `top-left`, `top-right`, `bottom-left`, `bottom-right`. Default value is `bottom-left` for precison on positioning.
- [**#17**](https://github.com/jscastro76/threebox/issues/17) 3D models and Objects3D `adjustment` param will override `anchor` automatic calculation to allow fully custom positioning for a pivotal center and altitude.
- 3DObject has now a new method `obj.setAnchor` to define the positional and pivotal center based on a string value.
- 3DObject has now a new method `obj.setCenter` to allows to define positional and pivotal center based on an {x,y,z} value in units.
- [**#18**](https://github.com/jscastro76/threebox/issues/18) `obj.addTooltip` and `obj.addLabel` receive a new param `anchor` that is by default `obj.anchor`, so it'll be calculated dynamically to `bottom-left` position.
- [**#19**](https://github.com/jscastro76/threebox/issues/19) Removed version logs from `ColladaLoader` and `FBXLoader`
- [**#20**](https://github.com/jscastro76/threebox/issues/20) 3D model url returned at `loadObj` error if there's an exception
- [**#21**](https://github.com/jscastro76/threebox/issues/21) Added new example with [Statue of Liberty and Eiffel Tower](https://github.com/jscastro76/threebox/blob/master/examples/eiffel.html) insipred by this [StackOverflow question](https://stackoverflow.com/questions/46701072/how-to-put-threejs-building-on-mapbox-to-its-real-place/46705447#)
- [**#22**](https://github.com/jscastro76/threebox/issues/22) All the examples updated to *Mapbox GL* v1.11.1.
- Threebox initialization params are now validated at the beginning.
- Preparation for including post-effects

#### :beetle: Bug fixes
- [**#16**](https://github.com/jscastro76/threebox/issues/16) Bug in `obj.duplicate()` method. It was a *Three.js* bug [**19900**](https://github.com/mrdoob/three.js/issues/19900) but it was resolved here through the addition of a copy constructor.


<br>

- - -

## 2.0.3

Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.
Expand All @@ -16,7 +45,7 @@ Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements
- Added default tooltips to 3D objects and fill-extrusion features that can be overriden, so far always top centered.
- Added a new example *3Dbuildings.html* showing the built-in raycast behavior and tooltips on top of the 3D Buildings fill-extrusions composite layer.
- Updated samples *raycaster.html*, *mercator.html*, *animation.html*, *mercator.html*, *basic.html*, *logistics.html*.
- Refactored `sphere` and `Object3D` including now `.tooltip` `.boundingBox` and `.boundingBoxShadow` and behave like 3D models loaded through `tb.loadObj`
- Refactored `sphere` and `Object3D` including now all the events, behaviors, `.tooltip` `.boundingBox` and `.boundingBoxShadow` and behave like 3D models loaded through `tb.loadObj`
- Refactored `t.loadObj` to validate options format.
- Added `toolbox.css` that supports generic styles for tooltips mapbox-like.

Expand Down
5 changes: 4 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
v.0.3.0
MIT License

Copyright (c) 2017 Peter Liu

v.2.0.1 - v.2.0.4
MIT License
Copyright (c) 2020 Jesus Serrano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# `Threebox`

A three.js plugin for Mapbox GL JS, using the custom layer feature. Provides convenient methods to manage objects in lnglat coordinates, and to synchronize the map and scene cameras.
A **[*Three.js*](https://threejs.org/)** plugin for **[*Mapbox GL JS*](https://docs.mapbox.com/mapbox-gl-js/examples/)**, using the [`CustomLayerInterface`](https://docs.mapbox.com/mapbox-gl-js/api/properties/#customlayerinterface) feature. Provides convenient methods to manage objects in lnglat coordinates, and to synchronize the map and scene cameras.

<img alt="threebox" src="docs/gallery.jpg">

<br>

- - -
## Current release

Current release is [**2.0.4**](https://github.com/jscastro76/threebox/releases/tag/v.2.0.4), please review the [**Change log**](https://github.com/jscastro76/threebox/blob/master/CHANGELOG.md) for more details.

<br>

- - -

## ONLY in this Threebox fork
Expand All @@ -22,12 +29,12 @@ A three.js plugin for Mapbox GL JS, using the custom layer feature. Provides con

Only in this fork, there is a list of new features implemented on top of the amazing work from [@peterqliu](https://github.com/peterqliu/threebox/):
- Update to Three.js v117.
- Update to Mapbox v1.10.0.
- All the [examples](https://github.com/jscastro76/threebox/tree/master/examples) updated, and 3 more examples added with new features.
- Update to Mapbox v1.11.1.
- All the [examples](https://github.com/jscastro76/threebox/tree/master/examples) updated, and 4 more examples added with new features.
- Support for multiple format objects (FBX, GLTF/GLB, Collada + OBJ/MTL).
- Support for CSS2D Labels supporting rich HTML controls through a new LabelManager.
- Support for tooltips/title browser-like and mapbox-like.
- Support for Objects3D bounding box and floor projection.
- Support for CSS2D tooltips/title browser-like and mapbox-like.
- Support for Objects3D auto-centering, bounding box and floor projection.
- Support for built-in Raycaster in loaded Objects3D and fill-extrusions together.
- Support for built-in MouseOver/Mouseout, Selected, Drag&Drop, Drag&Rotate, Wireframe in loadedObjects including events.
- Support for GeoJson standard features format import and export in different layers.
Expand All @@ -39,12 +46,13 @@ Only in this fork, there is a list of new features implemented on top of the ama
- Support for full dispose of Mapbox, Three and Threebox resources.
- Optimization of Camera perspective to have Raycast with pixel-precision level.
- Adjusted positioning for Objects3D to set center and rotation axes by config.
- Check out [v2.03 change log](https://github.com/jscastro76/threebox/blob/master/CHANGELOG.md#203) for more detail.
- Check out [v2.04 change log](https://github.com/jscastro76/threebox/blob/master/CHANGELOG.md#204) for more detail.

<br>

- - -


## Documentation
<img alt="threebox" src="docs/SoldierAnimation.jpg">

Expand All @@ -61,7 +69,7 @@ All the [**Threebox Documentation**](/docs/Threebox.md) has been completely upda
## Compatibility/Dependencies

- Mapbox v.0.50.0 and later (for custom layer support)
- Three.r114 (already bundled into the Threebox build). If desired, other versions can be swapped in and rebuilt [here](https://github.com/jscastro76/threebox/blob/master/src/three.js), though compatibility is not guaranteed.
- Three.r117 (already bundled into the Threebox build). If desired, other versions can be swapped in and rebuilt [here](https://github.com/jscastro76/threebox/blob/master/src/three.js), though compatibility is not guaranteed. **(WARNING: v118.3 breaks compatibility in some cases)**


<br>
Expand Down
18 changes: 17 additions & 1 deletion ThreeboxSolution.njsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<StartWebBrowser>True</StartWebBrowser>
<LaunchUrl>/examples/raycaster.html</LaunchUrl>
<LaunchUrl>/examples/3Dbuildings.html</LaunchUrl>
<SaveNodeJsSettingsInProjectFile>True</SaveNodeJsSettingsInProjectFile>
<NodejsPort>8080</NodejsPort>
</PropertyGroup>
Expand All @@ -36,6 +36,20 @@
<Content Include="examples\css\free-v4-shims.min.css" />
<Content Include="examples\css\free.min.css" />
<Content Include="examples\css\threebox.css" />
<Content Include="examples\eiffel.html" />
<Content Include="examples\geojson\statue-of-liberty.json" />
<Content Include="examples\images\eiffel-tower.png" />
<Content Include="examples\images\statue-of-liberty.png" />
<Content Include="examples\models\Eiffel.glb" />
<Content Include="examples\models\LibertStatue.mtl" />
<Content Include="examples\models\LibertStatue.obj" />
<Content Include="examples\models\Liberty-DecorazioniMarmo-2.bmp" />
<Content Include="examples\models\Liberty-GreenBronze-1.bmp" />
<Content Include="examples\models\Liberty-MattoniBasamento-1.bmp" />
<Content Include="examples\models\Liberty-Pavimentazione-1.bmp" />
<Content Include="examples\models\Liberty-PortaBronzo-1.bmp" />
<Content Include="examples\models\LibertyStatue.mtl" />
<Content Include="examples\models\LibertyStatue.obj" />
<Content Include="examples\models\Soldier.glb" />
<Content Include="examples\models\Truck.mtl" />
<Content Include="examples\models\Truck.obj" />
Expand Down Expand Up @@ -114,6 +128,8 @@
<Folder Include="docs\img" />
<Folder Include="examples" />
<Folder Include="examples\css\" />
<Folder Include="examples\geojson\" />
<Folder Include="examples\images\" />
<Folder Include="examples\models" />
<Folder Include="examples\old" />
<Folder Include="examples\plugins\" />
Expand Down
Loading

0 comments on commit c957983

Please sign in to comment.