فهرست منبع

Support v3f attribute type

WestLangley 5 سال پیش
والد
کامیت
1646182876
2فایلهای تغییر یافته به همراه28 افزوده شده و 0 حذف شده
  1. 14 0
      examples/js/loaders/EXRLoader.js
  2. 14 0
      examples/jsm/loaders/EXRLoader.js

+ 14 - 0
examples/js/loaders/EXRLoader.js

@@ -1928,6 +1928,16 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 		}
 
+		function parseV3f( dataView, offset ) {
+
+			var x = parseFloat32( dataView, offset );
+			var y = parseFloat32( dataView, offset );
+			var z = parseFloat32( dataView, offset );
+
+			return [ x, y, z ];
+
+		}
+
 		function parseValue( dataView, buffer, offset, type, size ) {
 
 			if ( type === 'string' || type === 'stringvector' || type === 'iccProfile' ) {
@@ -1962,6 +1972,10 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
 
 				return parseV2f( dataView, offset );
 
+			} else if ( type === 'v3f' ) {
+
+				return parseV3f( dataView, offset );
+
 			} else if ( type === 'int' ) {
 
 				return parseInt32( dataView, offset );

+ 14 - 0
examples/jsm/loaders/EXRLoader.js

@@ -1942,6 +1942,16 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 		}
 
+		function parseV3f( dataView, offset ) {
+
+			var x = parseFloat32( dataView, offset );
+			var y = parseFloat32( dataView, offset );
+			var z = parseFloat32( dataView, offset );
+
+			return [ x, y, z ];
+
+		}
+
 		function parseValue( dataView, buffer, offset, type, size ) {
 
 			if ( type === 'string' || type === 'stringvector' || type === 'iccProfile' ) {
@@ -1976,6 +1986,10 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
 
 				return parseV2f( dataView, offset );
 
+			} else if ( type === 'v3f' ) {
+
+				return parseV3f( dataView, offset );
+
 			} else if ( type === 'int' ) {
 
 				return parseInt32( dataView, offset );