Skip to content

Commit

Permalink
Merge pull request #1 from jscastro76/master
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
KarimJedda authored Jan 17, 2021
2 parents 267de43 + 12a6f6a commit b4cc491
Show file tree
Hide file tree
Showing 51 changed files with 12,094 additions and 791 deletions.
90 changes: 89 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,97 @@
## 2.1.3
## 2.1.7

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

#### :sparkles: Enhancements
- #167 Create a new event `ObjectChanged` every time the object has modified its position, rotation or scale.
- Related to #163 request to get coordinates when the model follow path with line?
- Modified example [05-logistics.html](https://github.com/jscastro76/threebox/blob/master/examples/05-logistics.html) to attach to the event `ObjectChanged`
- Modified example [11-logistics.html](https://github.com/jscastro76/threebox/blob/master/examples/11-animation.html) to attach to the event `ObjectChanged`
- Modified example [08-3dbuildings.html](https://github.com/jscastro76/threebox/blob/master/examples/08-3dbuildings.html) to adjust perspective and position to a more relevant zone (empire state building)
- #170 Refactor internal methods

#### :beetle: Bug fixes
- #168 Bug on init params `bbox` and `tooltip`

#### :pencil: Documentation
- Updated [documentation](/docs/Threebox.md) (`ObjectChanged` and other events)
- Updated [README.md](/).
- Updated [Examples](/examples) documentation.

<br>

- - -

## 2.1.6

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

#### :sparkles: Enhancements

- #111 Show the dimensions of a model
- #151 Remove auxiliary test method on `CameraSync` used to debug #145
- #156 Create an Orthographic view mode
- #159 Create an example for FOV and Orthographic.
- Added to [09-raycaster.html](https://github.com/jscastro76/threebox/blob/master/examples/09-raycaster.html) as it impacts in raycast and shows fill-extrusions and 3D models together
- #161 Remove obsolete code that is avoiding to be used from React

#### :beetle: Bug fixes
- #152 `obj.raycasted` is ignored when an object is hidden and again visible.
- #157 Bug draggging after removing an object.
- #160 Bug using `utils.equal`

#### :pencil: Documentation
- #158 MERCATOR_A constant unused, added an code comment to explain why it was deprecated (nor removed)
- Updated [documentation](/docs/Threebox.md) (`tb.orthographic`, `tb.fov`)
- Updated [README.md](/).
- Updated [Examples](/examples) documentation.

<br>

- - -

## 2.1.5

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

#### :sparkles: Enhancements
- #3 Make Color of the boundingBox and boundingBoxShadow configurable
- #29 Make one object not selectable or draggable independently of Threebox params
- #150 Check methods doing traverse to avoid doing unnecessary loops

#### :beetle: Bug fixes
- #145 Worldwide view demos, have precision issues after #143
- #149 `obj.set` with `options.coords` doesn't change the z axis in obj.coordinates

#### :pencil: Documentation
- Updated [documentation](/docs/Threebox.md) (`tb.raycasted`, `tb.extrusion`, `tb.loadObj` and `tb.Object3D` params, mime types)
- Updated [README.md](/).
- Updated [Examples](/examples) documentation.
<br>

- - -

## 2.1.4

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

#### :sparkles: Enhancements
- #1 Collisions detection (Depth calculation)
- #102 Add stats performance to all the demos
- #139 Add a full dispose button to 15-Performance.html demo
- #143 CameraSync adjustment to avoid depth issues between 3D objects and Fill-extrusions
- #144 Improve 07-alignmentTest.html adding 3D objects inside the building

#### :beetle: Bug fixes
- #147 Error in BuildingShadows when used from a script module

<br>

- - -

## 2.1.3

Minor version by [@jscastro76](https://github.com/jscastro76), just one hot fix for a critical bug.

#### :beetle: Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v.2.0.1 - v.2.1.3
v.2.0.1 - v.2.1.7
MIT License
Copyright (c) 2020 Jesus Serrano

Expand Down
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![NPM license](http://img.shields.io/npm/l/threebox-plugin.svg?style=flat-square)](https://www.npmjs.org/package/threebox-plugin)
![npm](https://img.shields.io/npm/dt/threebox-plugin?style=social)

A **[*Three.js*](https://threejs.org/)** plugin for **[*Mapbox GL JS*](https://docs.mapbox.com/mapbox-gl-js/examples/)** and **[Azure Maps](https://azure.microsoft.com/en-us/services/azure-maps/)** 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.
A **[*Three.js*](https://threejs.org/)** plugin for **[*Mapbox GL JS*](https://docs.mapbox.com/mapbox-gl-js/examples/)** and **[*Azure Maps*](https://azure.microsoft.com/en-us/services/azure-maps/)** 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>
Expand Down Expand Up @@ -35,13 +35,17 @@ npm i threebox-plugin
|----------|-------
|<img alt="threebox" src="./docs/LabelsOnHeight.gif" width="100%">|<img alt="threebox" src="./docs/Depth.gif" width="100%">

|Models built-in shadows|Optimized performance through cache
|Runtime style change|Optimized performance through cache
|----------|-------
|<img alt="threebox" src="./docs/MapboxShadow.gif" width="100%">|<img alt="threebox" src="./docs/Performance.gif" width="100%">
|<img alt="threebox" src="./docs/StyleChange.gif" width="100%">|<img alt="threebox" src="./docs/Performance.gif" width="100%">

|Runtime style change|Sunlight illumination for a given datetime and lnglat
|----------|-------
|<img alt="threebox" src="./docs/StyleChange.gif" width="100%">|<img alt="threebox" src="./docs/EiffelShadow.gif" width="100%">
|Models built-in shadows|Sunlight illumination for a given datetime and lnglat
|---------|-------
|<img alt="threebox" src="./docs/MapboxShadow.gif" width="100%">|<img alt="threebox" src="./docs/EiffelShadow.gif" width="100%">

|Customizable FOV|Geojson and Points Extrusions
|---------|-------
|<img alt="threebox" src="./docs/CustomizeFOV.gif" width="100%">|<img alt="threebox" src="./docs/extrusions.gif" width="100%">

<br>

Expand All @@ -51,23 +55,25 @@ Only in this fork, there is a list of new features implemented on top of the ama
- Updated to Azure Maps v2.0.31.
- [18 examples](https://github.com/jscastro76/threebox/tree/master/examples) with all the new features.
- Support for multiple 3D format objects (FBX, GLTF/GLB, Collada, OBJ/MTL).
- Support for CSS2D labels supporting rich HTML controls through a new LabelManager.
- Support for 3D extruded shapes from [GeoJson](https://geojson.org/) features or points array.
- Support for CSS2D labels and rich HTML controls through a new LabelManager.
- Support for CSS2D tooltips/title browser-like and mapbox-like.
- Support for built-in shadows and real Sun light positioning for a given datetime and lnglat coords.
- Support for built-in Raycaster in Object3D and fill-extrusions together.
- Support for built-in MouseOver/Mouseout, Selected, Drag&Drop, Drag&Rotate, Wireframe in loadedObjects including events.
- Support for wireframing on any Object3D, removing them from the Raycaster.
- Support for [GeoJson](https://geojson.org/) standard features format import and export in different layers.
- Support for Object3D embedded animations, and custom animations on AnimationManager (i.e. embedded animation + translate + rotate).
- Support for multi-floor/layer design of spaces.
- Support for Non-AABB Non Axes Aligned Bounding Box and real model size.
- Support for wireframing on any Object3D, removing them from the raycast.
- Support for multi-layer and multi-floor design of spaces.
- Support for built-in shadows and real Sun light positioning for a given datetime and lnglat coords.
- Support for Non-AABB Non Axes Aligned Bounding Box and real model size, including floor projection.
- Support for Object3D auto-centering and 9 default anchor positions customizable through adjustments.
- Support for `setLayerZoomRange` and `setLayoutProperty` on Custom Layers (not available in Mapbox).
- Support for `removeLayer` considering Object3D.
- Support for style change through `setStyle` and keeping Object3D.
- Support for partial and full dispose of Mapbox, Three and Threebox resources and memory.
- Support for Object3D auto-centering, bounding box and floor projection.
- Support for Orthographic view and customizable Perspective FOV.
- Optimization of Camera perspective to have Raycast with pixel-precision level and depth sync between Mapbox and Threebox objects.
- Optimization for loading thousands of objects through cache.
- Optimization of Camera perspective to have Raycast with pixel-precision level.
- Available as [npm package](https://www.npmjs.com/package/threebox-plugin)
- Check out [change log](https://github.com/jscastro76/threebox/blob/master/CHANGELOG.md) for more detail.

Expand Down Expand Up @@ -109,7 +115,13 @@ Add threebox to your project via **npm package** [![NPM version](http://img.shie
`npm install threebox-plugin`

#### Use the bundle
Download the bundle from [`dist/threebox.js`](dist/threebox.js) or [`dist/threebox.min.js`](dist/threebox.min.js) and include it in a `<script>` tag on your page.
Download the bundle from [`dist/threebox.js`](dist/threebox.js) or [`dist/threebox.min.js`](dist/threebox.min.js) and include it in a `<script>` tag on your page.
If you want to use styles predefined, add the link to the cascade style sheet.
If deployed in other folder structure or a CDN, just ensure you use your `src` and `href` attributes are pointing to relative or absolute url path.
```html
<script src="../dist/threebox.js" type="text/javascript"></script>
<link href="./css/threebox.css" rel="stylesheet" />
```

#### Test the samples
Several introductory examples are [here](https://github.com/jscastro76/threebox/tree/master/examples). To run them, create a `config.js` file with your Mapbox-gl-js access token, alongside and in the format of [the template](https://github.com/jscastro76/threebox/blob/master/examples/config_template.js).
Expand Down
Loading

0 comments on commit b4cc491

Please sign in to comment.