mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-19 14:25:13 +03:00
Setup with new ThreeJs version
This commit is contained in:
parent
ce0b4dac66
commit
c76b3e1a63
1 changed files with 6 additions and 9 deletions
|
@ -258,16 +258,13 @@ TABS.setup.initialize3D = function () {
|
|||
|
||||
// setup scene
|
||||
scene = new THREE.Scene();
|
||||
|
||||
loader = new THREE.JSONLoader();
|
||||
loader.load('./resources/models/' + model_file + '.json', function (geometry, materials) {
|
||||
var modelMaterial = new THREE.MeshFaceMaterial(materials);
|
||||
model = new THREE.Mesh(geometry, modelMaterial);
|
||||
|
||||
const manager = new THREE.LoadingManager();
|
||||
loader = new THREE.GLTFLoader(manager);
|
||||
loader.load('./resources/models/' + model_file + '.gltf', (obj) =>{
|
||||
model = obj.scene;
|
||||
model.scale.set(15, 15, 15);
|
||||
|
||||
modelWrapper.add(model);
|
||||
scene.add(modelWrapper);
|
||||
//modelWrapper.add(obj);
|
||||
scene.add(model);
|
||||
});
|
||||
|
||||
// stationary camera
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue