소스 검색

BatchedMesh: Move to core (#27200)

Garrett Johnson 1 년 전
부모
커밋
b65ee86c3a
5개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 1
      examples/jsm/Addons.js
  2. 1 2
      examples/webgl_mesh_batch.html
  3. 1 0
      src/Three.js
  4. 1 1
      src/loaders/ObjectLoader.js
  5. 0 0
      src/objects/BatchedMesh.js

+ 0 - 1
examples/jsm/Addons.js

@@ -160,7 +160,6 @@ export * from './modifiers/EdgeSplitModifier.js';
 export * from './modifiers/SimplifyModifier.js';
 export * from './modifiers/SimplifyModifier.js';
 export * from './modifiers/TessellateModifier.js';
 export * from './modifiers/TessellateModifier.js';
 
 
-export * from './objects/BatchedMesh.js';
 export * from './objects/GroundProjectedSkybox.js';
 export * from './objects/GroundProjectedSkybox.js';
 export * from './objects/Lensflare.js';
 export * from './objects/Lensflare.js';
 export * from './objects/MarchingCubes.js';
 export * from './objects/MarchingCubes.js';

+ 1 - 2
examples/webgl_mesh_batch.html

@@ -35,7 +35,6 @@
 		import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
 		import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
 
 
 		import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
 		import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
-		import { BatchedMesh } from 'three/addons/objects/BatchedMesh.js';
 
 
 		let stats, gui, guiStatsEl;
 		let stats, gui, guiStatsEl;
 		let camera, controls, scene, renderer;
 		let camera, controls, scene, renderer;
@@ -184,7 +183,7 @@
 
 
 			const euler = new THREE.Euler();
 			const euler = new THREE.Euler();
 			const matrix = new THREE.Matrix4();
 			const matrix = new THREE.Matrix4();
-			mesh = new BatchedMesh( geometryCount, vertexCount, indexCount, createMaterial() );
+			mesh = new THREE.BatchedMesh( geometryCount, vertexCount, indexCount, createMaterial() );
 			mesh.userData.rotationSpeeds = [];
 			mesh.userData.rotationSpeeds = [];
 
 
 			// disable full-object frustum culling since all of the objects can be dynamic.
 			// disable full-object frustum culling since all of the objects can be dynamic.

+ 1 - 0
src/Three.js

@@ -21,6 +21,7 @@ export { Skeleton } from './objects/Skeleton.js';
 export { Bone } from './objects/Bone.js';
 export { Bone } from './objects/Bone.js';
 export { Mesh } from './objects/Mesh.js';
 export { Mesh } from './objects/Mesh.js';
 export { InstancedMesh } from './objects/InstancedMesh.js';
 export { InstancedMesh } from './objects/InstancedMesh.js';
+export { BatchedMesh } from './objects/BatchedMesh.js';
 export { LineSegments } from './objects/LineSegments.js';
 export { LineSegments } from './objects/LineSegments.js';
 export { LineLoop } from './objects/LineLoop.js';
 export { LineLoop } from './objects/LineLoop.js';
 export { Line } from './objects/Line.js';
 export { Line } from './objects/Line.js';

+ 1 - 1
src/loaders/ObjectLoader.js

@@ -22,7 +22,7 @@ import { Color } from '../math/Color.js';
 import { Object3D } from '../core/Object3D.js';
 import { Object3D } from '../core/Object3D.js';
 import { Group } from '../objects/Group.js';
 import { Group } from '../objects/Group.js';
 import { InstancedMesh } from '../objects/InstancedMesh.js';
 import { InstancedMesh } from '../objects/InstancedMesh.js';
-import { BatchedMesh } from '../../examples/jsm/objects/BatchedMesh.js';
+import { BatchedMesh } from '../objects/BatchedMesh.js';
 import { Sprite } from '../objects/Sprite.js';
 import { Sprite } from '../objects/Sprite.js';
 import { Points } from '../objects/Points.js';
 import { Points } from '../objects/Points.js';
 import { Line } from '../objects/Line.js';
 import { Line } from '../objects/Line.js';

+ 0 - 0
examples/jsm/objects/BatchedMesh.js → src/objects/BatchedMesh.js