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
|
// setup scene
|
||||||
scene = new THREE.Scene();
|
scene = new THREE.Scene();
|
||||||
|
const manager = new THREE.LoadingManager();
|
||||||
loader = new THREE.JSONLoader();
|
loader = new THREE.GLTFLoader(manager);
|
||||||
loader.load('./resources/models/' + model_file + '.json', function (geometry, materials) {
|
loader.load('./resources/models/' + model_file + '.gltf', (obj) =>{
|
||||||
var modelMaterial = new THREE.MeshFaceMaterial(materials);
|
model = obj.scene;
|
||||||
model = new THREE.Mesh(geometry, modelMaterial);
|
|
||||||
|
|
||||||
model.scale.set(15, 15, 15);
|
model.scale.set(15, 15, 15);
|
||||||
|
//modelWrapper.add(obj);
|
||||||
modelWrapper.add(model);
|
scene.add(model);
|
||||||
scene.add(modelWrapper);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// stationary camera
|
// stationary camera
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue