소스 검색

Basis: Update Basis library.

Don McCurdy 4 년 전
부모
커밋
46c40718f5
3개의 변경된 파일16개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      examples/js/libs/basis/basis_transcoder.js
  2. BIN
      examples/js/libs/basis/basis_transcoder.wasm
  3. 16 1
      examples/webgl_loader_texture_basis.html

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
examples/js/libs/basis/basis_transcoder.js


BIN
examples/js/libs/basis/basis_transcoder.wasm


+ 16 - 1
examples/webgl_loader_texture_basis.html

@@ -40,7 +40,7 @@
 
 				scene = new THREE.Scene();
 
-				const geometry = new THREE.BoxGeometry( 200, 200, 200 );
+				const geometry = flipY( new THREE.BoxGeometry( 200, 200, 200 ) );
 				const material = new THREE.MeshBasicMaterial();
 
 				mesh = new THREE.Mesh( geometry, material );
@@ -88,6 +88,21 @@
 
 			}
 
+			/** Correct UVs to be compatible with `flipY=false` textures. */
+			function flipY( geometry ) {
+
+				const uv = geometry.attributes.uv;
+
+				for ( let i = 0; i < uv.count; i ++ ) {
+
+					uv.setY( i, 1 - uv.getY( i ) );
+
+				}
+
+				return geometry;
+
+			}
+
 		</script>
 
 	</body>

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.