Quellcode durchsuchen

Finishing transition to new UTF8 loader.

alteredq vor 13 Jahren
Ursprung
Commit
29e6c6b818
34 geänderte Dateien mit 26 neuen und 25 gelöschten Zeilen
  1. 21 21
      examples/js/loaders/UTF8Loader.js
  2. 0 0
      examples/models/utf8/James_Body_Lores.jpg
  3. 0 0
      examples/models/utf8/James_EyeLashBotTran.png
  4. 0 0
      examples/models/utf8/James_EyeLashTopTran.png
  5. 0 0
      examples/models/utf8/James_Eye_Green.jpg
  6. 0 0
      examples/models/utf8/James_Eye_Inner_Green.jpg
  7. 0 0
      examples/models/utf8/James_Face_Color_Hair_Lores.jpg
  8. 0 0
      examples/models/utf8/James_Mouth_Gum_Lores.jpg
  9. 0 0
      examples/models/utf8/James_Tongue_Lores.jpg
  10. 0 0
      examples/models/utf8/MCasShoe1TEX_Lores.jpg
  11. 0 0
      examples/models/utf8/MJeans1TEX_Lores.jpg
  12. 0 0
      examples/models/utf8/MTshirt3TEX_Lores.jpg
  13. 0 0
      examples/models/utf8/Nail_Hand_01_Lores.jpg
  14. 0 0
      examples/models/utf8/ben.js
  15. 0 0
      examples/models/utf8/ben.utf8
  16. 0 0
      examples/models/utf8/hand.jpg
  17. 0 0
      examples/models/utf8/hand.js
  18. 0 0
      examples/models/utf8/hand.utf8
  19. 5 4
      examples/webgl_loader_utf8.html
  20. 0 0
      utils/exporters/utf8/build.bat
  21. 0 0
      utils/exporters/utf8/obj2utf8.exe
  22. 0 0
      utils/exporters/utf8/obj2utf8x.exe
  23. 0 0
      utils/exporters/utf8/objcompress.exe
  24. 0 0
      utils/exporters/utf8/src/README
  25. 0 0
      utils/exporters/utf8/src/base.h
  26. 0 0
      utils/exporters/utf8/src/bounds.h
  27. 0 0
      utils/exporters/utf8/src/compress.h
  28. 0 0
      utils/exporters/utf8/src/mesh.h
  29. 0 0
      utils/exporters/utf8/src/obj2utf8.cc
  30. 0 0
      utils/exporters/utf8/src/obj2utf8x.cc
  31. 0 0
      utils/exporters/utf8/src/objcompress.cc
  32. 0 0
      utils/exporters/utf8/src/optimize.h
  33. 0 0
      utils/exporters/utf8/src/stream.h
  34. 0 0
      utils/exporters/utf8/src/utf8.h

+ 21 - 21
examples/js/loaders/UTF8v2Loader.js → examples/js/loaders/UTF8Loader.js

@@ -5,7 +5,7 @@
  * Code to load/decompress mesh is taken from r100 of this webgl-loader
  */
 
-THREE.UTF8v2Loader = function () {};
+THREE.UTF8Loader = function () {};
 
 /**
  * Load UTF8 encoded model
@@ -17,7 +17,7 @@ THREE.UTF8v2Loader = function () {};
  *                   materialBase: Base url from which to load referenced textures
  */
 
-THREE.UTF8v2Loader.prototype.load = function ( jsonUrl, callback, options ) {
+THREE.UTF8Loader.prototype.load = function ( jsonUrl, callback, options ) {
 
     this.downloadModelJson( jsonUrl, options, callback );
 
@@ -25,10 +25,10 @@ THREE.UTF8v2Loader.prototype.load = function ( jsonUrl, callback, options ) {
 
 // BufferGeometryCreator
 
-THREE.UTF8v2Loader.BufferGeometryCreator = function () {
+THREE.UTF8Loader.BufferGeometryCreator = function () {
 };
 
-THREE.UTF8v2Loader.BufferGeometryCreator.prototype.create = function ( attribArray, indexArray ) {
+THREE.UTF8Loader.BufferGeometryCreator.prototype.create = function ( attribArray, indexArray ) {
 
 	var ntris = indexArray.length / 3;
 
@@ -116,10 +116,10 @@ THREE.UTF8v2Loader.BufferGeometryCreator.prototype.create = function ( attribArr
 
 // GeometryCreator
 
-THREE.UTF8v2Loader.GeometryCreator = function () {
+THREE.UTF8Loader.GeometryCreator = function () {
 };
 
-THREE.UTF8v2Loader.GeometryCreator.prototype = {
+THREE.UTF8Loader.GeometryCreator.prototype = {
 
     create: function ( attribArray, indexArray ) {
 
@@ -321,7 +321,7 @@ var DEFAULT_DECODE_PARAMS = {
 // runtime for different combinations of stride, decodeOffset and
 // decodeScale?
 
-THREE.UTF8v2Loader.prototype.decompressAttribsInner_ = function ( str, inputStart, inputEnd,
+THREE.UTF8Loader.prototype.decompressAttribsInner_ = function ( str, inputStart, inputEnd,
                                                                   output, outputStart, stride,
                                                                   decodeOffset, decodeScale ) {
 
@@ -339,7 +339,7 @@ THREE.UTF8v2Loader.prototype.decompressAttribsInner_ = function ( str, inputStar
 
 };
 
-THREE.UTF8v2Loader.prototype.decompressIndices_ = function( str, inputStart, numIndices,
+THREE.UTF8Loader.prototype.decompressIndices_ = function( str, inputStart, numIndices,
                                                             output, outputStart ) {
 
 	var highest = 0;
@@ -360,7 +360,7 @@ THREE.UTF8v2Loader.prototype.decompressIndices_ = function( str, inputStart, num
 
 };
 
-THREE.UTF8v2Loader.prototype.decompressAABBs_ = function ( str, inputStart, numBBoxen,
+THREE.UTF8Loader.prototype.decompressAABBs_ = function ( str, inputStart, numBBoxen,
                                                            decodeOffsets, decodeScales ) {
     var numFloats = 6 * numBBoxen;
 
@@ -393,7 +393,7 @@ THREE.UTF8v2Loader.prototype.decompressAABBs_ = function ( str, inputStart, numB
 
 };
 
-THREE.UTF8v2Loader.prototype.decompressMesh =  function ( str, meshParams, decodeParams, name, idx, callback ) {
+THREE.UTF8Loader.prototype.decompressMesh =  function ( str, meshParams, decodeParams, name, idx, callback ) {
 
     // Extract conversion parameters from attribArrays.
 
@@ -451,7 +451,7 @@ THREE.UTF8v2Loader.prototype.decompressMesh =  function ( str, meshParams, decod
 
 };
 
-THREE.UTF8v2Loader.prototype.copyAttrib = function ( stride, attribsOutFixed, lastAttrib, index ) {
+THREE.UTF8Loader.prototype.copyAttrib = function ( stride, attribsOutFixed, lastAttrib, index ) {
 
     for ( var j = 0; j < stride; j ++ ) {
 
@@ -461,7 +461,7 @@ THREE.UTF8v2Loader.prototype.copyAttrib = function ( stride, attribsOutFixed, la
 
 };
 
-THREE.UTF8v2Loader.prototype.decodeAttrib2 = function ( str, stride, decodeOffsets, decodeScales, deltaStart,
+THREE.UTF8Loader.prototype.decodeAttrib2 = function ( str, stride, decodeOffsets, decodeScales, deltaStart,
                                                         numVerts, attribsOut, attribsOutFixed, lastAttrib,
                                                         index ) {
 
@@ -477,7 +477,7 @@ THREE.UTF8v2Loader.prototype.decodeAttrib2 = function ( str, stride, decodeOffse
 
 };
 
-THREE.UTF8v2Loader.prototype.accumulateNormal = function ( i0, i1, i2, attribsOutFixed, crosses ) {
+THREE.UTF8Loader.prototype.accumulateNormal = function ( i0, i1, i2, attribsOutFixed, crosses ) {
 
     var p0x = attribsOutFixed[ 8*i0 ];
     var p0y = attribsOutFixed[ 8*i0 + 1 ];
@@ -517,7 +517,7 @@ THREE.UTF8v2Loader.prototype.accumulateNormal = function ( i0, i1, i2, attribsOu
 
 };
 
-THREE.UTF8v2Loader.prototype.decompressMesh2 = function( str, meshParams, decodeParams, name, idx, callback ) {
+THREE.UTF8Loader.prototype.decompressMesh2 = function( str, meshParams, decodeParams, name, idx, callback ) {
 
     var MAX_BACKREF = 96;
 
@@ -710,7 +710,7 @@ THREE.UTF8v2Loader.prototype.decompressMesh2 = function( str, meshParams, decode
 
 };
 
-THREE.UTF8v2Loader.prototype.downloadMesh = function ( path, name, meshEntry, decodeParams, callback ) {
+THREE.UTF8Loader.prototype.downloadMesh = function ( path, name, meshEntry, decodeParams, callback ) {
 
     var loader = this;
     var idx = 0;
@@ -760,7 +760,7 @@ THREE.UTF8v2Loader.prototype.downloadMesh = function ( path, name, meshEntry, de
 
 };
 
-THREE.UTF8v2Loader.prototype.downloadMeshes = function ( path, meshUrlMap, decodeParams, callback ) {
+THREE.UTF8Loader.prototype.downloadMeshes = function ( path, meshUrlMap, decodeParams, callback ) {
 
     for ( var url in meshUrlMap ) {
 
@@ -771,7 +771,7 @@ THREE.UTF8v2Loader.prototype.downloadMeshes = function ( path, meshUrlMap, decod
 
 };
 
-THREE.UTF8v2Loader.prototype.createMeshCallback = function( materialBaseUrl, loadModelInfo, allDoneCallback ) {
+THREE.UTF8Loader.prototype.createMeshCallback = function( materialBaseUrl, loadModelInfo, allDoneCallback ) {
 
 	var nCompletedUrls = 0;
     var nExpectedUrls = 0;
@@ -805,8 +805,8 @@ THREE.UTF8v2Loader.prototype.createMeshCallback = function( materialBaseUrl, loa
 
 	// Create callback for creating mesh parts
 
-    var geometryCreator = new THREE.UTF8v2Loader.GeometryCreator();
-	var bufferGeometryCreator = new THREE.UTF8v2Loader.BufferGeometryCreator();
+    var geometryCreator = new THREE.UTF8Loader.GeometryCreator();
+	var bufferGeometryCreator = new THREE.UTF8Loader.BufferGeometryCreator();
 
 	var meshCallback = function( name, idx, attribArray, indexArray, bboxen, meshParams ) {
 
@@ -862,14 +862,14 @@ THREE.UTF8v2Loader.prototype.createMeshCallback = function( materialBaseUrl, loa
 
 };
 
-THREE.UTF8v2Loader.prototype.downloadModel = function ( geometryBase, materialBase, model, callback ) {
+THREE.UTF8Loader.prototype.downloadModel = function ( geometryBase, materialBase, model, callback ) {
 
     var meshCallback = this.createMeshCallback( materialBase, model, callback );
     this.downloadMeshes( geometryBase, model.urls, model.decodeParams, meshCallback );
 
 };
 
-THREE.UTF8v2Loader.prototype.downloadModelJson = function ( jsonUrl, options, callback ) {
+THREE.UTF8Loader.prototype.downloadModelJson = function ( jsonUrl, options, callback ) {
 
     getJsonRequest( jsonUrl, function( loaded ) {
 

+ 0 - 0
examples/models/utf8_r104/James_Body_Lores.jpg → examples/models/utf8/James_Body_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/James_EyeLashBotTran.png → examples/models/utf8/James_EyeLashBotTran.png


+ 0 - 0
examples/models/utf8_r104/James_EyeLashTopTran.png → examples/models/utf8/James_EyeLashTopTran.png


+ 0 - 0
examples/models/utf8_r104/James_Eye_Green.jpg → examples/models/utf8/James_Eye_Green.jpg


+ 0 - 0
examples/models/utf8_r104/James_Eye_Inner_Green.jpg → examples/models/utf8/James_Eye_Inner_Green.jpg


+ 0 - 0
examples/models/utf8_r104/James_Face_Color_Hair_Lores.jpg → examples/models/utf8/James_Face_Color_Hair_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/James_Mouth_Gum_Lores.jpg → examples/models/utf8/James_Mouth_Gum_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/James_Tongue_Lores.jpg → examples/models/utf8/James_Tongue_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/MCasShoe1TEX_Lores.jpg → examples/models/utf8/MCasShoe1TEX_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/MJeans1TEX_Lores.jpg → examples/models/utf8/MJeans1TEX_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/MTshirt3TEX_Lores.jpg → examples/models/utf8/MTshirt3TEX_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/Nail_Hand_01_Lores.jpg → examples/models/utf8/Nail_Hand_01_Lores.jpg


+ 0 - 0
examples/models/utf8_r104/ben.js → examples/models/utf8/ben.js


+ 0 - 0
examples/models/utf8_r104/ben.utf8 → examples/models/utf8/ben.utf8


+ 0 - 0
examples/models/utf8_r104/hand.jpg → examples/models/utf8/hand.jpg


+ 0 - 0
examples/models/utf8_r104/hand.js → examples/models/utf8/hand.js


+ 0 - 0
examples/models/utf8_r104/hand.utf8 → examples/models/utf8/hand.utf8


+ 5 - 4
examples/webgl_loader_utf8_r104.html → examples/webgl_loader_utf8.html

@@ -33,7 +33,8 @@
 		</div>
 
 		<script src="../build/three.min.js"></script>
-		<script src="js/loaders/UTF8v2Loader.js"></script>
+
+		<script src="js/loaders/UTF8Loader.js"></script>
 		<script src="js/loaders/MTLLoader.js"></script>
 
 		<script src="js/Detector.js"></script>
@@ -138,9 +139,9 @@
 
 				var start = Date.now();
 
-				var loader = new THREE.UTF8v2Loader();
+				var loader = new THREE.UTF8Loader();
 
-				loader.load( "models/utf8_r104/hand.js", function ( object ) {
+				loader.load( "models/utf8/hand.js", function ( object ) {
 
 					var end = Date.now();
 					console.log( "hand", end - start, "ms" );
@@ -167,7 +168,7 @@
 
 				}, { normalizeRGB: true } );
 
-				loader.load( "models/utf8_r104/ben.js", function ( object ) {
+				loader.load( "models/utf8/ben.js", function ( object ) {
 
 					var end = Date.now();
 					console.log( "ben", end - start, "ms" );

+ 0 - 0
utils/exporters/utf8-r104/build.bat → utils/exporters/utf8/build.bat


+ 0 - 0
utils/exporters/utf8-r104/obj2utf8.exe → utils/exporters/utf8/obj2utf8.exe


+ 0 - 0
utils/exporters/utf8-r104/obj2utf8x.exe → utils/exporters/utf8/obj2utf8x.exe


+ 0 - 0
utils/exporters/utf8-r104/objcompress.exe → utils/exporters/utf8/objcompress.exe


+ 0 - 0
utils/exporters/utf8-r104/src/README → utils/exporters/utf8/src/README


+ 0 - 0
utils/exporters/utf8-r104/src/base.h → utils/exporters/utf8/src/base.h


+ 0 - 0
utils/exporters/utf8-r104/src/bounds.h → utils/exporters/utf8/src/bounds.h


+ 0 - 0
utils/exporters/utf8-r104/src/compress.h → utils/exporters/utf8/src/compress.h


+ 0 - 0
utils/exporters/utf8-r104/src/mesh.h → utils/exporters/utf8/src/mesh.h


+ 0 - 0
utils/exporters/utf8-r104/src/obj2utf8.cc → utils/exporters/utf8/src/obj2utf8.cc


+ 0 - 0
utils/exporters/utf8-r104/src/obj2utf8x.cc → utils/exporters/utf8/src/obj2utf8x.cc


+ 0 - 0
utils/exporters/utf8-r104/src/objcompress.cc → utils/exporters/utf8/src/objcompress.cc


+ 0 - 0
utils/exporters/utf8-r104/src/optimize.h → utils/exporters/utf8/src/optimize.h


+ 0 - 0
utils/exporters/utf8-r104/src/stream.h → utils/exporters/utf8/src/stream.h


+ 0 - 0
utils/exporters/utf8-r104/src/utf8.h → utils/exporters/utf8/src/utf8.h