ThreeJS:将 DecalGeometry 添加到分组对象中

问题描述 投票:0回答:1

有一个基于 原始 ThreeJS DecalGeometry 示例的小草图,它工作得很好。基本上,它必须通过 X 轴垂直

[{0, 0, 0}, {tankRadius, 0, 0}]
将徽标添加到坦克中心,并且通过
scene.add(...)
将所有内容直接添加到场景中。

enter image description here

当我尝试将所有对象移动到一个组中时出现问题

THREE.Group()
,根据设计,该组应该具有预定义的旋转和缩放,即
group.rotation.y = -Math.PI / 4;

body {
    
    margin: 0;
    background-color: #fff;
    font-family: Monospace;
    font-size: 13px;
    line-height: 24px;
    overscroll-behavior: none;
    
}
<div id="container"></div>

    <script type="module">

      import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js";
      import { OrbitControls } from "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/controls/OrbitControls.js";
        import { DecalGeometry } from "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/geometries/DecalGeometry.js";

    const logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAALBnpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja7ZlpciM7DoT/8xRzBG4gyONwASPmBnP8+VCW3e1eZl7Hez+tCqnkUokLkMhMyMH+8+8b/sWjtFJDFe1ttBZ51FFHnrzp8e0xntcU6/P6/kiv10/Xw8fbzLlwLm8f6Hx9a3Jdvn3hfY60Pl8P/fVJ7q+B3mfOb6fiM/v78/0iuZ7frqf6GmjY25s2un6/1PUaaL9ufJbyetb+aZPP3+HTBSVKR5io5Gwllfi89rcVFH/WMjkLr/zNfel5n0oOnKTk12AE5NP2vgX4+wD9Mvjhx+j/Lvh5vq6XH2LZ3rPWfv1Bkh+ul49p8vcTl48V5c8f3BX3T9t5Pe89/V57292sjYi2F6I+cPQMw42LkJfna41DeQrv9TkGR48zblJ+mG5x7DRSJis3pJpOmukme847bZZYs2XlnPPO5bnWi+aRd/E8VT/SzVpGOaWTv50tlMLl/LGW9Mw7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lbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChNYWNpbnRvc2gpIgogICAgICBzdEV2dDp3aGVuPSIyMDI0LTA1LTE4VDEzOjUwOjI1KzAzOjAwIi8+CiAgICAgPHJkZjpsaQogICAgICBzdEV2dDphY3Rpb249InNhdmVkIgogICAgICBzdEV2dDpjaGFuZ2VkPSIvIgogICAgICBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjNkNmE5ZTZkLWQ5ZjMtNGExYS05MWM3LTIwOTgwY2QwY2M5YyIKICAgICAgc3RFdnQ6c29mdHdhcmVBZ2VudD0iR2ltcCAyLjEwIChMaW51eCkiCiAgICAgIHN0RXZ0OndoZW49IiswMzowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgIDxwbHVzOkltYWdlU3VwcGxpZXI+CiAgICA8cmRmOlNlcS8+CiAgIDwvcGx1czpJbWFnZVN1cHBsaWVyPgogICA8cGx1czpJbWFnZUNyZWF0b3I+CiAgICA8cmRmOlNlcS8+CiAgIDwvcGx1czpJbWFnZUNyZWF0b3I+CiAgIDxwbHVzOkNvcHlyaWdodE93bmVyPgogICAgPHJkZjpTZXEvPgogICA8L3BsdXM6Q29weXJpZ2h0T3duZXI+CiAgIDxwbHVzOkxpY2Vuc29yPgogICAgPHJkZjpTZXEvPgogICA8L3BsdXM6TGljZW5zb3I+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7X8G+kAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH6AUUDAw10kQOvAAAEONJREFUeNrt3Xl0VuWBx/FvgECAEA1IBAO4gGJAceG4odOnVBzrruNWrdhRdByttZ7O6dRlWu3YOtp66jLo1IV6XDq2tueorbZax+oddZS6oLEEBeKCiSKLYQkhQELmj/dNcu/N+74Jyziaf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yQCQZABIMgAkGQCSDABJBoAkA0CSASDJAJBkAEgyACQZAJIMAEkGgCQDQJIBIMkAkAwASQaAJANAkgEgyQCQZABIMgAkGQCSDABJBoAkA0CSASDJAJBkAEgyACQZAJIMAEkGgCQDQJIBIMkAkGQASDIAJBkAkgwASQaAJANAkgEgyQCQZABIMgAkGQCSDABJBoAkA0CSASDJAJAMAEkGgCQDQJIBIMkAkGQASDIAJBkAknqB/wU0THiC0fYZ8gAAAABJRU5ErkJggg==';

    class TankGeometry extends THREE.LatheGeometry {

        constructor(radius = 1, length = 1, capSegments = 4, radialSegments = 8) {

            const path = new THREE.Path();

            path.absellipse(0, -length / 2, radius, radius / 2, Math.PI * 1.5, 0);
            path.absellipse(0, length / 2, radius, radius / 2, 0, Math.PI * 0.5);

            super(path.getPoints(capSegments), radialSegments);

            this.type = 'TankGeometry';

            this.parameters = {

                radius: radius,
                length: length,
                capSegments: capSegments,
                radialSegments: radialSegments,

            };

        }

        static fromJSON(data) {
            return new TankGeometry(data.radius, data.length, data.capSegments, data.radialSegments);
        }

    }

    let renderer, scene, camera, controls, group, tank, line, raycaster, intersects = [];

  const container = document.getElementById('container');

  const intersection = {

      intersects: false,
      point: new THREE.Vector3(),
      normal: new THREE.Vector3()

  };

  const tankParameters = {
      radius: 11,
      width: 75
  };

  const decalMaterial = new THREE.MeshPhongMaterial({

      map: new THREE.TextureLoader().load(logo),
      normalScale: new THREE.Vector2(1, 1),
      shininess: 30,
      transparent: true,
      depthTest: true,
      depthWrite: true,
      polygonOffset: true,
      polygonOffsetFactor: -2,
      wireframe: false

  });

  const decals = [];

  let position = new THREE.Vector3();
  let orientation = new THREE.Euler();

  init(aftermath);

  checkIntersection(window.innerWidth / 2, window.innerHeight / 2);

  function aftermath() {

      renderer.render(scene, camera);

      checkIntersection(window.innerWidth / 2, window.innerHeight / 2);
      if (intersection.intersects) {
          addDecal();
      }

      animate();


  }

  function init(callback_) {

      renderer = new THREE.WebGLRenderer({
          antialias: true
      });
      renderer.setPixelRatio(window.devicePixelRatio);
      renderer.setSize(window.innerWidth, window.innerHeight);
      container.appendChild(renderer.domElement);

      scene = new THREE.Scene();
      scene.background = new THREE.Color(0xFFFFFF);

      camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 1000);
      camera.position.z = 120;

      const controls = new OrbitControls(camera, renderer.domElement);
      controls.minDistance = 50;
      controls.maxDistance = 200;

      scene.add(new THREE.AmbientLight(0x333333));

      const dirLight = new THREE.DirectionalLight(0x999999, 3);
      dirLight.position.set(1, 0.75, 0.5);
      scene.add(dirLight);

      group = new THREE.Group();
      group.rotation.y = -Math.PI / 4;
      scene.add(group);

      const lineGeometry = new THREE.BufferGeometry();
      lineGeometry.setFromPoints([new THREE.Vector3(0.0, 0.0, 0.0), new THREE.Vector3(16.0, 0.0, 0.0)]);
      line = new THREE.Line(lineGeometry, new THREE.LineBasicMaterial({
          color: 0xFF0000
      }));
      group.add(line);

      tank = new THREE.Mesh(new TankGeometry(tankParameters.radius, tankParameters.width, 16, 16), new THREE.MeshBasicMaterial({
          color: 0xDDDDDD
      }));
      tank.geometry.computeVertexNormals();
      tank.rotation.x = Math.PI / 2;
      tank.name = 'Tank';
      group.add(tank);

      raycaster = new THREE.Raycaster();
      raycaster.setFromCamera(new THREE.Vector2(0, 0), camera);

      window.addEventListener('resize', onWindowResize);

      let moved = false;

      callback_();

  }

  function checkIntersection(x, y) {

      if (tank === undefined) {
          return;
      }

      raycaster.setFromCamera(new THREE.Vector2(0, 0), camera);

      raycaster.intersectObject(tank, false, intersects);

      if (intersects.length > 0) {

          intersection.normal.copy(intersects[0].face.normal);

          intersection.intersects = true;

          intersects.length = 0;

      } else {

          intersection.intersects = false;

      }


  }

  function addDecal() {

      const scale = tankParameters.width;
      const size = new THREE.Vector3(scale, scale, scale * 0.5);

      orientation = new THREE.Euler(-Math.PI / 2, Math.PI / 2, Math.PI / 2, 'XYZ');
      position = new THREE.Vector3(tankParameters.radius, 0.0, 0.0);

      const m = new THREE.Mesh(new DecalGeometry(tank, position, orientation, size), decalMaterial);
      m.renderOrder = 0;
      m.name = 'decalLogo';
      group.add(m);

  }

  function removeDecal() {
      scene.remove(scene.getObjectByName('decalLogo'));
  }

  function onWindowResize() {

      camera.aspect = window.innerWidth / window.innerHeight;
      camera.updateProjectionMatrix();

      renderer.setSize(window.innerWidth, window.innerHeight);

  }

  function animate() {

      requestAnimationFrame(animate);
      renderer.render(scene, camera);

  }

    </script>

enter image description here

很明显,

THREE.Raycaster
应该以某种方式考虑群矩阵,但我所有插入它的尝试,例如在
checkIntersection(x, y)
处,都没有产生结果。

有什么想法吗?

three.js geometry intersection rotational-matrices
1个回答
0
投票

其实我不需要

THREE.Raycaster
checkIntersection()
,而贴花的位置是一成不变的。

body {
    
    margin: 0;
    background-color: #fff;
    font-family: Monospace;
    font-size: 13px;
    line-height: 24px;
    overscroll-behavior: none;
    
}
<div id="container"></div>

    <script type="module">

      import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js";
      import { OrbitControls } from "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/controls/OrbitControls.js";
      import { DecalGeometry } from "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/geometries/DecalGeometry.js";

    const logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAALBnpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja7ZlpciM7DoT/8xRzBG4gyONwASPmBnP8+VCW3e1eZl7Hez+tCqnkUokLkMhMyMH+8+8b/sWjtFJDFe1ttBZ51FFHnrzp8e0xntcU6/P6/kiv10/Xw8fbzLlwLm8f6Hx9a3Jdvn3hfY60Pl8P/fVJ7q+B3mfOb6fiM/v78/0iuZ7frqf6GmjY25s2un6/1PUaaL9ufJbyetb+aZPP3+HTBSVKR5io5Gwllfi89rcVFH/WMjkLr/zNfel5n0oOnKTk12AE5NP2vgX4+wD9Mvjhx+j/Lvh5vq6XH2LZ3rPWfv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ICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7X8G+kAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH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SDABJBoAkA0CSASDJAJBkAEgyACQZAJIMAEkGgCQDQJIBIMkAkGQASDIAJBkAkgwASQaAJANAkgEgyQCQDABJBoAkA0CSASDJAJBkAEgyACQZAJIMAEkGgCQDQJIBIMkAkGQASDIAJBkAkgwASQaAJANAkgEgyQCQZABIMgAkGQCSDABJBoAkA0CSASDJAJBkAEgyACQZAJIMAEkGgCQDQJIBIMkAkAwASQaAJANAkgEgyQCQZABIMgAkGQCSDABJBoAkA0CSASDJAJBkAEgyACQZAJIMAEkGgCQDQJIBIMkAkGQASDIAJBkAkgwASQaAJANAkgEgyQCQZABIMgAkGQCSDABJBoAkA0CSASDJAJAMAEkGgCQDQJIBIMkAkGQASDIAJBkAknqB/wU0THiC0fYZ8gAAAABJRU5ErkJggg==';

    class TankGeometry extends THREE.LatheGeometry {

        constructor(radius = 1, length = 1, capSegments = 4, radialSegments = 8) {

            const path = new THREE.Path();

            path.absellipse(0, -length / 2, radius, radius / 2, Math.PI * 1.5, 0);
            path.absellipse(0, length / 2, radius, radius / 2, 0, Math.PI * 0.5);

            super(path.getPoints(capSegments), radialSegments);

            this.type = 'TankGeometry';

            this.parameters = {

                radius: radius,
                length: length,
                capSegments: capSegments,
                radialSegments: radialSegments,

            };

        }

        static fromJSON(data) {
            return new TankGeometry(data.radius, data.length, data.capSegments, data.radialSegments);
        }

    }

    let renderer, scene, camera, controls, group, tank, line, intersects = [];

  const container = document.getElementById('container');

  const tankParameters = {
      radius: 11,
      width: 75
  };

  const decalMaterial = new THREE.MeshPhongMaterial({

      map: new THREE.TextureLoader().load(logo),
      normalScale: new THREE.Vector2(1, 1),
      shininess: 30,
      transparent: true,
      depthTest: true,
      depthWrite: true,
      polygonOffset: true,
      polygonOffsetFactor: -2,
      wireframe: false

  });

  const decals = [];

  let position = new THREE.Vector3();
  let orientation = new THREE.Euler();

  init(aftermath);

  function aftermath() {

      renderer.render(scene, camera);

      addDecal();
      
      animate();


  }

  function init(callback_) {

      renderer = new THREE.WebGLRenderer({
          antialias: true
      });
      renderer.setPixelRatio(window.devicePixelRatio);
      renderer.setSize(window.innerWidth, window.innerHeight);
      container.appendChild(renderer.domElement);

      scene = new THREE.Scene();
      scene.background = new THREE.Color(0xFFFFFF);

      camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 1000);
      camera.position.z = 120;

      const controls = new OrbitControls(camera, renderer.domElement);
      controls.minDistance = 50;
      controls.maxDistance = 200;

      scene.add(new THREE.AmbientLight(0x333333));

      const dirLight = new THREE.DirectionalLight(0x999999, 3);
      dirLight.position.set(1, 0.75, 0.5);
      scene.add(dirLight);

      group = new THREE.Group();
      group.rotation.y = -Math.PI / 4;
      scene.add(group);

      const lineGeometry = new THREE.BufferGeometry();
      lineGeometry.setFromPoints([new THREE.Vector3(0.0, 0.0, 0.0), new THREE.Vector3(16.0, 0.0, 0.0)]);
      line = new THREE.Line(lineGeometry, new THREE.LineBasicMaterial({
          color: 0xFF0000
      }));
      group.add(line);

      tank = new THREE.Mesh(new TankGeometry(tankParameters.radius, tankParameters.width, 16, 16), new THREE.MeshBasicMaterial({
          color: 0xDDDDDD
      }));
      tank.geometry.computeVertexNormals();
      tank.rotation.x = Math.PI / 2;
      tank.name = 'Tank';
      group.add(tank);

      window.addEventListener('resize', onWindowResize);

      callback_();

  }

  function addDecal() {

      const scale = tankParameters.width;
      const size = new THREE.Vector3(scale, scale, scale * 0.5);

      orientation = new THREE.Euler(-Math.PI / 2, Math.PI / 2, Math.PI / 2, 'XYZ');
      position = new THREE.Vector3(tankParameters.radius, 0.0, 0.0);

      const m = new THREE.Mesh(new DecalGeometry(tank, position, orientation, size), decalMaterial);
      m.renderOrder = 0;
      m.name = 'decalLogo';
      group.add(m);

  }

  function removeDecal() {
      scene.remove(scene.getObjectByName('decalLogo'));
  }

  function onWindowResize() {

      camera.aspect = window.innerWidth / window.innerHeight;
      camera.updateProjectionMatrix();

      renderer.setSize(window.innerWidth, window.innerHeight);

  }

  function animate() {

      requestAnimationFrame(animate);
      renderer.render(scene, camera);

  }

    </script>

所以,问题在于重新计算

orientation
position
处的
addDecal()

© www.soinside.com 2019 - 2024. All rights reserved.