Questions tagged [threebox]
22 questions
2
votes
0 answers
Mapbox/threebox Changing Scale On Existing 3D Object Not Working
First, I'm somewhat new to Mapbox. I've made some fun things work ok, but that doesn't mean I'm doing things the correct/best way. Always happy to learn how to do things better.
I'm trying to set up a page that loads a 3D model and gives you…

Trevor Gryffyn
- 49
- 4
2
votes
1 answer
Threebox and Mapbox: Why are textures and shapes disappearing on consecutive instances of the same GLTF model?
I am adding multiple instances of the same GLTF model to a scene using Mapbox-gl (2.2.0) and the excellent Threebox (2.2.3) plugin.
The first model renders correctly, the second model exists in the scene, but loses textures and/or shapes.
Different…

nickshreck
- 23
- 5
2
votes
1 answer
Threebox CastShadow on 3D Model
Im doing a project using threebox js and trying to get the shadow of 3D models imported. Following the documentation https://github.com/jscastro76/threebox/blob/master/docs/Threebox.md#threebox-methods When i create a object i change the property to…

tiagofonseca1109
- 135
- 1
- 7
1
vote
0 answers
Threebox on Mapbox: 3D Model Disappears with Low Camera Pitch
I loaded a 3D model using Threebox on Mapbox with the projection set to 'globe.' However, I'm facing an issue where the 3D model disappears when the camera pitch is close to 0. Is there a solution to this problem?
I tried loading a 3D model using…

seung987
- 11
- 1
1
vote
1 answer
In Threebox, it is possible to disable dragging, only the altitude of a 3D object?
In Threebox, it is possible to disable dragging, only the altitude of a 3D object?
I know that we get the altitude position value on the third index of the coords (origin) array, when we are dragging the 3D object and have the…

this.mig123
- 13
- 2
1
vote
2 answers
Why can't I load 3D models with Mapbox GL JS and Threebox with this Angular code
Can anyone help me understand how I need to structure my code for this mapbox w/ threebox project in Angular?
I can't figure out why this code:
this.tb.loadObj(options, function (model) {
var house = model.setCoords(origin);
…

juntunen
- 207
- 3
- 10
1
vote
1 answer
Threebox Mapbox: Every of my edited models ends up a as giant ball in the sky
When i add the truck.glb as a custom layer with threebox to a mapbox map, every thingworks fine. All the models from the examples are fine.
Every model edited by me with three.js editor or nunustudio.org is rendered as a giant grey ball far away in…

Baba Wanga
- 31
- 3
1
vote
1 answer
Threebox Tooltip in 3D models
I´ve been trying to enable tooltips on some imported 3D models, but it isnt working.
I already enabled tooltips in threbox, and I enabled tooltips in the options for the 3d element, as shown below.
tb = new Threebox(
map,
mbxContext,
…

tiagofonseca1109
- 135
- 1
- 7
0
votes
0 answers
Have 3D model in mapbox/threebox to sit on top of DEM layer
I use mapbox 2.15.0 and threebox 2.2.7 in react 18.2.0
I succesfully insert a gltf model in mapbox using threebox.
map.current.addLayer({
id: 'custom-threebox-model',
type: 'custom',
renderingMode: '3d',
onAdd: ()…

slevin
- 4,166
- 20
- 69
- 129
0
votes
0 answers
3D model altitude not stable when using MapBox elevation raster-dem
When using map.setTerrain in MapBox and adding a 3D model using Threebox 2.2.2 the 3D model changes altitude when zooming in and out.
Displaying a dae 3D model on the MapBox without map elevation works fine, but if (in the code below) the 'Add map…
0
votes
0 answers
Threebox GLTF Model partly wrong
I have an fbx model that i exportet as an embedded gltf in blender. When i load it into a map with threebox then it looks wrong but in the gltf viewer of threejs it looks right. What am i doing wrong?
Some parts seem to work but some are…

nico-src
- 31
- 1
- 7
0
votes
0 answers
How do i toggle visibility of a threebox line in mapbox?
I want to be able to toggle the visibility of my 3D line layer in mapbox
Threebox has a method called toggleLayer, however i am not able to add the TB.line to the layer and freely toggle the line layer.
Currently i am generating the lines using…

Glenn Koh
- 1
- 1
0
votes
1 answer
Custom threebox layer for react-map-gl
I am trying to add a custom 3D object to my react-map-gl instance. Unfortunately, I can't find any examples that have successfully implemented this besides mapbox-gl-threelayer. This package is a bit outdated for my needs- it relies on an v1…

bitTorin
- 1
- 1
0
votes
0 answers
how to load an .obj in threebox
Here goes my first question, I hope you can help me. I'm writing a peice op code to show an .obj file in mapbox using Threebox. The problem is that the .gltf file shows on the map but the .obj file doesn't. Can you help me?
map.on('style.load',…

Gert-Jan
- 1
0
votes
0 answers
Issue creating multiple models from source layer in Threebox
Currently trying to get to grips with Threebox.js and I'm run into an issue trying to create a wind turbine for each point on a layer. My code is as follows:
function AddTurbineLayer()
{
console.log("AddTurbineLayer");
if(!renderedModels)
…

Adam_R
- 37
- 2
- 12