Minor version by @jscastro76, some enhancements and bugs.
- #356 Is it possible to disable the tooltip when dragging/rotating objects?
- added a new default parameter to Threebox called enableHelpTooltips that will show the help tooltips on dragging, rotating and measuring.
- #323 Azure Maps sample doesn't work if you change map style
- Updated Threebox documentation (
enableHelpTooltips
)
Minor version by @jscastro76, some enhancements and bugs.
- #310 extrusion.materials null by default, but not labelled as 'required' in documentation
- THREE.MeshPhongMaterial({ color: 0x660000, side: THREE.DoubleSide }) added as default material to extrusions
- #255 tb.updateSunGround raises an error if value is higher than 1.
- Multiplied also the raster-opacity by 4 to make it more realistic with the light hours
- #319 dat.gui.module has changed in threejs
- #320 Cannot read properties of undefined (reading 'appendChild')
- Updated Threebox documentation (
tb.extrusion
parammaterials
)
Minor version by @jscastro76, some enhancements and bugs.
- #287 Updating to Three.js r132
- #289 Remove CustomLines folder and content
- #286 Missing THREE in sphere.js
- Updated Threebox documentation (
tb.loadObj
paramsclone
,tb.defaultCursor
)
Minor version by @jscastro76, some enhancements and bugs.
- #245 Add an option to load a model without cloning
- #250 We need an explicit hidden property that overrides visibility
- #252 Set the cursor through a property in threebox
- #249 When style is changed, objects with fixedZoom don't rescale until map is moved.
- Updated Threebox documentation (
tb.loadObj
paramsclone
,tb.defaultCursor
)
Minor version by @jscastro76, some enhancements and bugs.
- #243 Create a new example on terrain layer
- New example on terrain layer with a 3D model aligned vertically 21-terrain.html
- #244 Darken the raster layer with realSunlight
- #233 map.setLight is not updated when tb.setStyle until the map moves
- #237
ObjectMouseOver
doesn't work after triggeringSelectedChange
- #241 KNOWN ISSUE: Terrain layer calculates wrongly the object height
- #242 KNOWN ISSUE: Create a warning for sky layers when used with Mapbox < 2.0
- Updated documentation
- Updated Threebox documentation (
terrain
attribute and property,tb.createTerrainLayer
,tb.updateSunGround
) - Updated Examples documentation (new terrain layer in 21).
Minor version by @jscastro76, some enhancements and bugs.
WARNING: This version updates to Mapbox 2.2.0. Despite v1.11.1 still supported, if used, some features from mapbox v.2.0.1 won't be obviously available such as sky layers.
Known issue: BuildingShadow
wont work as the definition of the layers has changed.
- #118 Add a better light for night on 14-buildingshadow.html example
- #146 Update to Mapbox 2.2
- #225 Mapbox 2.2: Update Depth calculation keeping compatibility with previous versions
- #226 Mapbox 2.2: Update all the examples (14-buildingshadow & 17-azuremaps not updated)
- #232 Mapbox 2.2: Add sky layer as an option in threebox
- Updated example 07-alignmentTest.html
- Updated example 12-add3dmodel.html
- Updated example 13-eiffel.html
- #224 Ignore worker_threads
- #229 tb.dispose() in dev mode not working. It was removed from three.js but not included in migration guide.
- #234 Update all the examples to include antialias: true in the webglcontext
- #223 Can't resolve worker threads
- #230 Module not found: Can't resolve 'worker_threads' (duplicated #223)
- Updated documentation (Added a note on the examples updated to Mapbox 2.2.0)
- Updated Threebox documentation (public cdns data,
sky
attribute and property,tb.createSkyLayer
,tb.getSunSky
,tb.updateSunSky
,tb.updateLightHelper
, ) - Updated Examples documentation (new sky layers in 7, 12, 13).
Minor version by @jscastro76, some enhancements and bugs.
WARNING: This version updates to Three.js r127 which is now bundled within Threebox.
- #212 Allow to remove an object by name
- #211 Create an object property that changes all the materials by a color
- #169 Update to Three.js r127
- #214 Full refactor of tb.tube
- #215 Refactor tb.line
- #216 Refactor tb.update
- #217 utils.material should allow THREE.DoubleSide
- #218 Remove CustomEvent from events
- #219 Remove .getInverse()
- #220 Update Loaders
- #221 Add fflate module
- #222 fflate depends on a physical file
- Updated documentation (
obj.color
,tb.removeByName
)
Minor version by @jscastro76, some enhancements and bugs.
- #197 Remove local path from server.js and use current directory variable
- #198 Bounding box is now shown if bbox is null but enableSelectingObjects is true
- #199
[.WebGL-00000210783663D0] GL_INVALID_VALUE: Invalid width.
- #200 Bug in 11-animation.html example
selectedObject is not defined
- #201 Since #124 the objects wireframed and animated lost the animation
- Updated documentation (
vue.js
sample) - Updated README.md.
- Updated Examples documentation (
vue.js
sample).
Minor version by @jscastro76, some enhancements and bugs.
- #193 Build with tinyify
- #194 Make the build way lighter (3D models to lowpoly, images, gifs)
- #195 rename .json to .geosjon
- #196 Add in code and license.txt all the licenses and attributions for the 3D models
- #192
getFeatureCenter
could change the altitude
Minor version by @jscastro76, some enhancements and bugs.
- #182 Resource interpreted as Stylesheet but transferred with MIME type text/plain
- #187 Create an option to translate an object based on world coordinates (obj.position)
- #188 Add threebox.css to the /dist folder. Included now in
npm run build
command - #189 Create a driving game-like example with WASD controls
- #177 [BUG] FollowPath animation with realSunlight produces an error
- #190 When using
obj.selected
programatically the bbox is not shown
- Updated documentation started to link points and improving documentation descriptions in general.
- Updated README.md.
Minor version by @jscastro76, some enhancements and bugs.
- #155 How to keep fixed scale and size of Airplane 3D model when zoom in or out Mapbox?
- #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 to attach to the event
ObjectChanged
- Modified example 11-logistics.html to attach to the event
ObjectChanged
- Modified example 08-3dbuildings.html to adjust perspective and position to a more relevant zone (empire state building)
- #170 Refactor internal methods
- #179 Create a new example for fixed scale model
- Added to 19-fixedZoom.html that shows shows how to have a fixed scale for an object at a concrete zoom level. In that way the object with preserve the same visual size when the zoom is lower than the fixed zoom value.
- #181 Move npm modules to devDependencies and remove not used
- #168 Bug on init params
bbox
andtooltip
- #175 Shadows are not updated if an object is moved through animations
- Shadow plane is oriented properly when the object rotates due to a followPath animation
- Shadow plane grows properly based on object height
- Shadow plane positions at ground level if scale is
scene
- Allows to change
obj.fixedZoom
level in real time - Allows to change to non-fixedZoom in real time
- #176
units: 'scene'
objects get wrong shadow - #180 Fixed scale objects not being rescaled if they are being animated
- Updated documentation (
ObjectChanged
,setFixedZoom
,setObjectScale
,setScale
,modelHeight
,unitsPerMeter
and other events) - Updated README.md.
- Updated Examples documentation (
19-fixedzoom.html
).
Minor version by @jscastro76, some enhancements and bugs.
- #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 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
- #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
- #158 MERCATOR_A constant unused, added an code comment to explain why it was deprecated (nor removed)
- Updated documentation (
tb.orthographic
,tb.fov
) - Updated README.md.
- Updated Examples documentation.
Minor version by @jscastro76, some enhancements and bugs.
- #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
- #145 Worldwide view demos, have precision issues after #143
- #149
obj.set
withoptions.coords
doesn't change the z axis in obj.coordinates
- Updated documentation (
tb.raycasted
,tb.extrusion
,tb.loadObj
andtb.Object3D
params, mime types) - Updated README.md.
- Updated Examples documentation.
Minor version by @jscastro76, some enhancements and bugs.
- #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
- #147 Error in BuildingShadows when used from a script module
Minor version by @jscastro76, just one hot fix for a critical bug.
#142 CRITICAL BUG: Cannot set property 'toJulian' of undefined
Minor version by @jscastro76, some enhancements and bugs.
- #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
- #130 Convert internal variables (
selectedObject
,draggedObject
, ...) into instance variables . - #134 Deprecate
tb.setLayerZoomVisibility
, overlaps withtb.toggleLayer
. - #138 expose
SunCalc.toJulian
- #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.
Minor version by @jscastro76, some enhancements and bugs.
- #105 In examples tb is not defined . #105
- #107 CSS2D labels must be refactored to optimize the render #107
- #108 Deprecate
tb.setLabelZoomRange
#108 - #109 add speed param to animations #109
- #114
tb.setSunlight
must accept LngLatLike coords #114 - #117 cache functions must be 100% async #117
- #119 Create a sample with azure maps #119. Added a new example 17-azuremaps.html
- #104 CSS2DLabels doesn't hide properly based on zoom ranges on setLabelZoomRange #104
- #120
labelCanvas
z-index overlaps with HTML controls visibility #120 - #122 when the style changes
tb.zoomLayers
must be reset #122 - #123 style change doesn't work when
multiLayer = true
#123
Minor version by @jscastro76, some enhancements and bugs.
- #5 Add a multi layer sample. 16-multilayer.html
- #95
tb.add
should admit layer and source as optional params - #96
tb.setLayerHeigthProperty
depends on an internal feature onobj.userData.feature
- #98 Add an init param for multiLayer scenarios, that allows to create a default empty layer in threebox
- #99
setLayoutZoomRange
doesn�t work on multilayer scenarios - #101
options.adjustment
must be on top ofoptions.anchor
not instead
- #94 tb.setLayoutPropery is not working when geojson features are not being used.
- #97 When
enableSelectingObjects
is active and not tooltips - #100 Object anchors are not well calculated on duplicates when downscaled
Minor version by @jscastro76, some enhancements and bugs.
- #12 rotationStep, gridStep and altitudeStep must be configurable
- #44 disable or enable dirLightHelper for realSunlight.
- #89 Allow drag an Object3D on altitude.
- #90 When dragging/rotating objects add a label that shows the current values
- #91 An object rotated twice, starts again from 0 degrees not from its original position
- #92 Refactor
obj.addLabel
,obj.addTooltip
and addobj.addHelp
- #93 Bug on
utils.equal
is only comparing objects, not when is only values
Minor version by @jscastro76, some enhancements and bugs.
- #73
tb.dispose
must cleantb.objectsCache
- #74 Question: Why is this library not available on npm ?
- #75 Publish in npm
- #76 Refactor Objects.prototype._makeGroup
- #78 refactor var to const and let
- #80 Update example 15-performance.html Add built-in animation to example 15-performance.html windmill.
- #82 Add a method
tb.getSunTimes
- #85 We need an object compare method
- #87 Change
tb.getSunPosition
to accept lnglat coords instead of two params - #88 Add night style change in 12-add3dmodel.html and 13-eiffel.html examples during night hours
- #42 #42 Angular and Threebox. Solved an issue using a
mapboxgl.Point
line - #77 #77 example 05-logistics raises an error removing the line
- #79 #79 Some examples are not using
renderingMode: 3d
in the layer creation - #86 #86 After #56 the feature that comes in userData is not being updated.
Minor version by @jscastro76, some enhancements and bugs.
- #24 Refactor
obj.deepCopy
, these members must be properties found by name - #54 vue and threebox,map not defined.
- #63
CSS2DObject
is not disposing properly. - #66
tb.dispose
must now calltb.clear
and return the async value - #68 add new methods to remove label & tooltip
- #71 Defer default boundingBox and tooltip creation.
- Update example 15-performance.html to avoid dupplicated calls when dragging the count GUI control.
- #61
.userData
not refreshed properly onobj.duplicate
. - #62 Memory Leak on
tb.remove()
. Tested - #64 Cache instance of a loaded model is disposed when the world children is.
- #65 addTooltip and addLabel don't remove previous objects.
- #67 clones have
boundingBoxShadow
line in white. - #69 After #56 the labels and tooltips are wrongly positioned.
- #70 After #56 object boundingBox has the original cached size.
- #72 After #56 animations are not being cloned.
Minor version by @jscastro76, some enhancements and bugs.
- #43 Threebox new method
tb.removeLayer
that removes the 3D objects of a layer, apart from removing the layer itself withmap.removeLayer
- #56 Objects cache at
tb.loadObj
- #57 Add a new sample to measure performance
- Added new example to demonstrate add thousands of objects and measure performance Threebox Performance.
- #58 Refactor
tb.remove
- #59 Refactor
tb.clear
to addlayerId
. - #60 Refactor
tb.dispose
- All the examples reviewed and updated and added to the Examples list
Minor version by @jscastro76, some enhancements and bugs.
- #28 Create a realistic illumination at any given lnglat, date and time
- Added SunCalc for sun position calculations
- Threebox can receive now a new param
realSunlight : true
at instantiation - Threebox new method
tb.realSunlight
that sets the lights for the scene with default map center position and current datetime. - Threebox new method
tb.getSunPosition(date, lng, lat)
that allows to get sun altitude and azimuth from SunCalc - Threebox new method
tb.setBuildingShadows(options)
that instantiates a newBuildingShadows
class. - Threebox new method
tb.setSunlight (newDate = new Date(), coords)
that calculates real Sun light position at a given datetime and lnglat callingtb.getSunPosition(date, lng, lat)
. - Added
this.lights
to enable access to lights configured for the scene throughdefaultLights
orrealSunLight
. - Light Helpers (if any) are now updated on
tb.update
callingthis.updateLightHelper()
, useful to see the sun direction on animations.
- #30 Shadow examples
- Added new example to demonstrate how to change style Change map style for Eiffel Tower.
- Added new example boosting @andrewharvey original sample but with real sunlight and built-in shadows Add a 3D model.
- Added new example to show default fill extrusion buildings shadow Building Sun light and shadows.
- Improved Eiffel example with real sun light slider and shadows on 3D models and Buildings extrusions Statue of Liberty and Eiffel Tower with Shadows
tb.Constants
are now accessible through instance (usefull for HTML/js side calculations)- #31 Create/Remove the shadow plane automatically on
obj.castShadow
- #33 Refactored methods
òbj.add
andobj.remove
to enable add an object to them (honestly this never worked as it was referring to root which is the function.) - #34 Added shadows for fill extrusion layers
- Synced with Custom Layers
tb.setSunLight
throughtb.setBuildingShadows(options)
- Added new example on fill-extrusion shadows.
- Synced with Custom Layers
- #36 Clean up after use. Implemented a new method
tb.clear(dispose)
that removes all the children fromtb.children
- #37 Anchor options. Implement the option
'auto'
that won't do anything to position the anchor, so the 3D Object will use it's default anchor defined in the model itself.
- #32 Hide PlaneGeometry used for shadow from raycaster.
- #35 Refresh of map after map style change creating a new
tb.setStyle
that replicatesmap.setStyle
and calls a new methodtb.clear
Minor version by @jscastro76, some enhancements and bugs.
- Update to Mapbox GL v1.11.1.
- #13 Refactored
tube
andObject3D
including now all the events, behaviors,.tooltip
.boundingBox
and.boundingBoxShadow
and behave like 3D models loaded throughtb.loadObj
- #15 Removed modules from the solution.
- #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 valuestop
,bottom
,left
,right
,center
,top-left
,top-right
,bottom-left
,bottom-right
. Default value isbottom-left
for precison on positioning. - #17 3D models and Objects3D
adjustment
param will overrideanchor
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
obj.addTooltip
andobj.addLabel
receive a new paramanchor
that is by defaultobj.anchor
, so it'll be calculated dynamically tobottom-left
position. - #19 Removed version logs from
ColladaLoader
andFBXLoader
- #20 3D model url returned at
loadObj
error if there's an exception - #21 Added new example with Statue of Liberty and Eiffel Tower insipred by this StackOverflow question
- #22 All the examples updated to Mapbox GL v1.11.1.
- Threebox initialization params are now validated at the beginning.
- #23 Updated sample mercator.html to test the changes in
obj.duplicate()
method comparing duplication with new instances creation. - Preparation for including post-effects
- #16 Bug in
obj.duplicate()
method. It was a Three.js bug 19900 but it was resolved here through the addition of a copy constructor. - #23 Bug in
obj.duplicate()
method. It's not cloning properly all the members of a Threebox Object3D such asobj.animations
,obj.boundingBox
,obj.boundingBoxShadow
,obj.anchor
, etc...
Minor version by @jscastro76, some enhancements and bugs.
- Update Three.js to v117 (WARNING: v118 breaks compatibility)
- Update ColladaLoader.js, FBXLoader.js, GLTFLoader.js, MTLLoader.js and OBJLoader.js to v.118
- Change in
obj.setCoords
method to usemin_height
value from default fill-extrusions coming from composite-building data. - Change in
getObjectHeightOnFloor
to change use ofmodel.modelHeight
cosidering alwaysheight=0
usemin_height
value from default fill-extrusions coming from composite-building data. - Added
enableSelectingFeatures
toThreebox
object default options, this allows to activate built-in raycasting over custom or default composite layer fill-extrusions. - Added
enableSelectingObjects
toThreebox
object default options, this allows to activate built-in raycasting over Threebox 3D objects. - Added
enableDraggingObjects
toThreebox
object default options, this allows to drag&drop Threebox 3D objects when selected to move them. - Added
enableRotatingObjects
toThreebox
object default options, this allows to drag&drop Threebox 3D objects when selected to rotate them. - Added
enableTooltips
toThreebox
object default options, this creates default tooltips on Objects3D and fill-extrusions. - 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
andObject3D
including now all the events, behaviors,.tooltip
.boundingBox
and.boundingBoxShadow
and behave like 3D models loaded throughtb.loadObj
- Refactored
t.loadObj
to validate options format. - Added
toolbox.css
that supports generic styles for tooltips mapbox-like.
- Bug fixed in
THREE.MTLLoader
with url undefined. (Pending decouple MTLLoader unless it's a.obj
model) - Bug fixed in
addTooltip(f, map)
method when a fill-extrusion has no name or id. - Bug fixed in
utils.getFeatureCenter
that was not considering geoJsonMultiPolygon
type.
Minor version by @jscastro76, some enhancements and bugs.
- New example added for alignment test check.
- Label and Tooltip are now dynamic objects in Threebox.
- Label and Tooltip objects support extrusions and include Altitude.
- Label and Tooltip calculate by default the center of the object.
- Tooltip has now a new param to match Mapbox styles
- obj.modelHeight is not anymore needed as a param to create a Label at obj.drawLabelHTML
- obj.addLabel does not need anymore bottomMargin cab be changed by styles through cssClass parameter
- Refactoring of HTML creation for Label and Tooltip
- Server.js script added for server execution.
- Bug fixed, Camera aspect ratio was not properly updated on map resize.
- Bug fixed on unselect Object and unselect Feature, now both work the same
- Bug fixed to support default fill-extrusion layers using composite and building data.
This is the new version created with this fork by @jscastro76 and it's a major update.
- Update to Three.js v114.
- Update to Mapbox GL v1.10.0.
- All the examples updated, and one more example added with new features.
- Support for multiple format objects (FBX, GLTF/GLB, Collada + OBJ/MTL).
- Support for CSS2DLabels supporting rich HTML controls through a new LabelManager.
- Support for tooltips/title browser-like.
- Support for Objects3D 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.
- Support for Objects3D embedded animations, and combined animations on AnimationManager (i.e. translate + embedded).
- Support for multi-floor design of spaces.
- Support for Non-AABB Non Axes Aligned Bounding Box and real model size.
- Support for wireframing on Objects3D, removing them from the raycast.
- Support for setLayerZoomRange and setLayoutProperty on Custom Layers (not available in Mapbox).
- 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.
-
Add an Object class: convenience methods to produce lines, spheres, tubes, and imported OBJ/MTL meshes, as well as a method to bring in THREE.Object3D's produced elsewhere with vanilla Three.js. Most of these are moveable, and have methods to move/rotate/rescale
-
No need to call
tb.update()
after putting it in the custom layer'srender()
function.
- Automatically adjust for viewport size (peterqliu#43)
.setupDefaultLights()
has moved to an optionaldefaultLights
parameter, in the third argument for Threebox().tb.addAtCoordinate()
andtb.moveToCoordinate()
have been deprecated.tb.add(Object)
andObject.setCoords()
replace them