Browse Source

glb(드론, 비행기) model 추가

master
김장현 9 months ago
parent
commit
5fa01bff22
  1. 7
      src/components/map/mapbox/MapBoxMap.js
  2. BIN
      src/components/map/mapbox/models/boeing_777_airplane.glb
  3. BIN
      src/components/map/mapbox/models/drone-1.glb
  4. BIN
      src/components/map/mapbox/models/scene.bin
  5. 4631
      src/components/map/mapbox/models/scene.gltf

7
src/components/map/mapbox/MapBoxMap.js

@ -25,7 +25,7 @@ import { mapInitAction } from '../../../modules/control/map/actions/controlMapAc
import * as THREE from 'three'; import * as THREE from 'three';
// example 3d gltf 파일 // example 3d gltf 파일
import UamGltf from './models/out.glb'; import UamGltf from './models/boeing_777_airplane.glb';
let gridCoords = []; let gridCoords = [];
let altitudeMarker = []; let altitudeMarker = [];
@ -444,7 +444,7 @@ export default function MapBoxMap() {
// const options = { // const options = {
// obj: UamGltf, // 3D Model 파일 // obj: UamGltf, // 3D Model 파일
// type: 'gltf', // 3D Model 확장자 타입 // type: 'gltf', // 3D Model 확장자 타입
// scale: { x: 50, y: 50, z: 50 }, // 3D Model 크기 값 // scale: { x: 0, y: 0, z: 0 }, // 3D Model 크기 값
// units: 'meters', // 높이 단위 // units: 'meters', // 높이 단위
// rotation: { x: 90, y: -90, z: 0 } // // 3D Model 방향 각도 초기 값 // rotation: { x: 90, y: -90, z: 0 } // // 3D Model 방향 각도 초기 값
// }; // };
@ -455,7 +455,7 @@ export default function MapBoxMap() {
// let hei = 0; // 3D Model 높이 값 // let hei = 0; // 3D Model 높이 값
// model.setCoords([longitude, latitude, hei]); // 3D Model 위치 지정 // model.setCoords([longitude, latitude, hei]); // 3D Model 위치 지정
// model.setRotation({ x: 0, y: 0, z: 241 }); // 3D Model 방향 각도 지정 // model.setRotation({ x: 0, y: 0, z: 90 }); // 3D Model 방향 각도 지정
// tb.add(model); // tb.add(model);
// // 0.5초마다 모델의 위치를 변경 // // 0.5초마다 모델의 위치를 변경
@ -469,6 +469,7 @@ export default function MapBoxMap() {
// // 애니메이션 클립 찾기 // // 애니메이션 클립 찾기
// const clips = model.animations; // const clips = model.animations;
// console.log(clips);
// if (clips && clips.length) { // if (clips && clips.length) {
// // 모든 애니메이션 클립 재생 // // 모든 애니메이션 클립 재생
// clips.forEach(clip => { // clips.forEach(clip => {

BIN
src/components/map/mapbox/models/boeing_777_airplane.glb

Binary file not shown.

BIN
src/components/map/mapbox/models/drone-1.glb

Binary file not shown.

BIN
src/components/map/mapbox/models/scene.bin

Binary file not shown.

4631
src/components/map/mapbox/models/scene.gltf

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save