Browse Source

FontLoader now strips typeface.js header. Reverted typeface.js to typeface.json change.

Mr.doob 10 năm trước cách đây
mục cha
commit
fffe45c78a
41 tập tin đã thay đổi với 19 bổ sung19 xóa
  1. 1 1
      docs/scenes/js/geometry.js
  2. 1 1
      examples/canvas_geometry_text.html
  3. 0 0
      examples/fonts/droid/droid_sans_bold.typeface.js
  4. 0 0
      examples/fonts/droid/droid_sans_bold.typeface.json
  5. 0 0
      examples/fonts/droid/droid_sans_mono_regular.typeface.js
  6. 0 0
      examples/fonts/droid/droid_sans_mono_regular.typeface.json
  7. 0 0
      examples/fonts/droid/droid_sans_regular.typeface.js
  8. 0 0
      examples/fonts/droid/droid_sans_regular.typeface.json
  9. 0 0
      examples/fonts/droid/droid_serif_bold.typeface.js
  10. 0 0
      examples/fonts/droid/droid_serif_bold.typeface.json
  11. 0 0
      examples/fonts/droid/droid_serif_regular.typeface.js
  12. 0 0
      examples/fonts/droid/droid_serif_regular.typeface.json
  13. 0 0
      examples/fonts/gentilis_bold.typeface.js
  14. 0 0
      examples/fonts/gentilis_bold.typeface.json
  15. 0 0
      examples/fonts/gentilis_regular.typeface.js
  16. 0 0
      examples/fonts/gentilis_regular.typeface.json
  17. 0 0
      examples/fonts/helvetiker_bold.typeface.js
  18. 0 0
      examples/fonts/helvetiker_bold.typeface.json
  19. 0 0
      examples/fonts/helvetiker_regular.typeface.js
  20. 0 0
      examples/fonts/helvetiker_regular.typeface.json
  21. 0 0
      examples/fonts/optimer_bold.typeface.js
  22. 0 0
      examples/fonts/optimer_bold.typeface.json
  23. 0 0
      examples/fonts/optimer_regular.typeface.js
  24. 0 0
      examples/fonts/optimer_regular.typeface.json
  25. 1 1
      examples/webgl_camera_logarithmicdepthbuffer.html
  26. 1 1
      examples/webgl_custom_attributes_lines.html
  27. 1 1
      examples/webgl_geometry_normals.html
  28. 1 1
      examples/webgl_geometry_text.html
  29. 1 1
      examples/webgl_geometry_text_earcut.html
  30. 1 1
      examples/webgl_geometry_text_pnltri.html
  31. 1 1
      examples/webgl_materials_variations_basic.html
  32. 1 1
      examples/webgl_materials_variations_lambert.html
  33. 1 1
      examples/webgl_materials_variations_phong.html
  34. 1 1
      examples/webgl_materials_variations_standard.html
  35. 1 1
      examples/webgl_materials_variations_standard2.html
  36. 1 1
      examples/webgl_modifier_subdivision.html
  37. 1 1
      examples/webgl_modifier_tessellation.html
  38. 1 1
      examples/webgl_shaders_vector.html
  39. 1 1
      examples/webgl_shadowmap.html
  40. 1 1
      examples/webgl_shadowmap_performance.html
  41. 1 1
      src/loaders/FontLoader.js

+ 1 - 1
docs/scenes/js/geometry.js

@@ -435,7 +435,7 @@ var guis = {
 		function generateGeometry() {
 
 			var loader = new THREE.FontLoader();
-			loader.load( '../../examples/fonts/' + data.font + '_' + data.weight + '.typeface.json', function ( font ) {
+			loader.load( '../../examples/fonts/' + data.font + '_' + data.weight + '.typeface.js', function ( font ) {
 
 				var geometry = new THREE.TextGeometry( data.text, {
 					font: font,

+ 1 - 1
examples/canvas_geometry_text.html

@@ -42,7 +42,7 @@
 			var windowHalfY = window.innerHeight / 2;
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/helvetiker_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_sans_bold.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_sans_bold.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_sans_mono_regular.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_sans_mono_regular.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_sans_regular.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_sans_regular.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_serif_bold.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_serif_bold.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_serif_regular.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/droid/droid_serif_regular.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/gentilis_bold.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/gentilis_bold.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/gentilis_regular.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/gentilis_regular.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/helvetiker_bold.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/helvetiker_bold.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/helvetiker_regular.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/helvetiker_regular.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/optimer_bold.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/optimer_bold.typeface.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/optimer_regular.typeface.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
examples/fonts/optimer_regular.typeface.json


+ 1 - 1
examples/webgl_camera_logarithmicdepthbuffer.html

@@ -135,7 +135,7 @@
 				container = document.getElementById( 'container' );
 
 				var loader = new THREE.FontLoader();
-				loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
+				loader.load( 'fonts/helvetiker_regular.typeface.js', function ( font ) {
 
 					var scene = initScene( font );
 

+ 1 - 1
examples/webgl_custom_attributes_lines.html

@@ -82,7 +82,7 @@
 		var object, uniforms;
 
 		var loader = new THREE.FontLoader();
-		loader.load( 'fonts/helvetiker_bold.typeface.json', function ( font ) {
+		loader.load( 'fonts/helvetiker_bold.typeface.js', function ( font ) {
 
 			init( font );
 			animate();

+ 1 - 1
examples/webgl_geometry_normals.html

@@ -93,7 +93,7 @@
 			];
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/helvetiker_regular.typeface.js', function ( font ) {
 
 				geometriesParams[ 12 ].args[ 1 ].font = font;
 

+ 1 - 1
examples/webgl_geometry_text.html

@@ -353,7 +353,7 @@
 			function loadFont() {
 
 				var loader = new THREE.FontLoader();
-				loader.load( 'fonts/' + fontName + '_' + fontWeight + '.typeface.json', function ( response ) {
+				loader.load( 'fonts/' + fontName + '_' + fontWeight + '.typeface.js', function ( response ) {
 
 					font = response;
 

+ 1 - 1
examples/webgl_geometry_text_earcut.html

@@ -390,7 +390,7 @@
 			function loadFont() {
 
 				var loader = new THREE.FontLoader();
-				loader.load( 'fonts/' + fontName + '_' + fontWeight + '.typeface.json', function ( response ) {
+				loader.load( 'fonts/' + fontName + '_' + fontWeight + '.typeface.js', function ( response ) {
 
 					font = response;
 

+ 1 - 1
examples/webgl_geometry_text_pnltri.html

@@ -367,7 +367,7 @@
 			function loadFont() {
 
 				var loader = new THREE.FontLoader();
-				loader.load( 'fonts/' + fontName + '_' + fontWeight + '.typeface.json', function ( response ) {
+				loader.load( 'fonts/' + fontName + '_' + fontWeight + '.typeface.js', function ( response ) {
 
 					font = response;
 

+ 1 - 1
examples/webgl_materials_variations_basic.html

@@ -44,7 +44,7 @@
 			var particleLight;
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/gentilis_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/gentilis_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

+ 1 - 1
examples/webgl_materials_variations_lambert.html

@@ -44,7 +44,7 @@
 			var particleLight;
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/gentilis_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/gentilis_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

+ 1 - 1
examples/webgl_materials_variations_phong.html

@@ -45,7 +45,7 @@
 			var particleLight;
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/gentilis_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/gentilis_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

+ 1 - 1
examples/webgl_materials_variations_standard.html

@@ -44,7 +44,7 @@
 			var particleLight;
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/gentilis_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/gentilis_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

+ 1 - 1
examples/webgl_materials_variations_standard2.html

@@ -44,7 +44,7 @@
 			var particleLight;
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/gentilis_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/gentilis_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

+ 1 - 1
examples/webgl_modifier_subdivision.html

@@ -82,7 +82,7 @@
 			];
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/helvetiker_regular.typeface.js', function ( font ) {
 
 				geometriesParams[ 8 ].args[ 1 ].font = font;
 

+ 1 - 1
examples/webgl_modifier_tessellation.html

@@ -102,7 +102,7 @@
 			HEIGHT = window.innerHeight;
 
 		var loader = new THREE.FontLoader();
-		loader.load( 'fonts/helvetiker_bold.typeface.json', function ( font ) {
+		loader.load( 'fonts/helvetiker_bold.typeface.js', function ( font ) {
 
 			init( font );
 			animate();

+ 1 - 1
examples/webgl_shaders_vector.html

@@ -96,7 +96,7 @@
 			}
 
 			var loader = new THREE.FontLoader();
-			loader.load( 'fonts/helvetiker_regular.typeface.json', function ( font ) {
+			loader.load( 'fonts/helvetiker_regular.typeface.js', function ( font ) {
 
 				init( font );
 				animate();

+ 1 - 1
examples/webgl_shadowmap.html

@@ -249,7 +249,7 @@
 				// TEXT
 
 				var loader = new THREE.FontLoader();
-				loader.load( 'fonts/helvetiker_bold.typeface.json', function ( font ) {
+				loader.load( 'fonts/helvetiker_bold.typeface.js', function ( font ) {
 
 					var textGeo = new THREE.TextGeometry( "THREE.JS", {
 

+ 1 - 1
examples/webgl_shadowmap_performance.html

@@ -185,7 +185,7 @@
 				// TEXT
 
 				var loader = new THREE.FontLoader();
-				loader.load( 'fonts/helvetiker_bold.typeface.json', function ( font ) {
+				loader.load( 'fonts/helvetiker_bold.typeface.js', function ( font ) {
 
 					var textGeo = new THREE.TextGeometry( "THREE.JS", {
 

+ 1 - 1
src/loaders/FontLoader.js

@@ -17,7 +17,7 @@ THREE.FontLoader.prototype = {
 		var loader = new THREE.XHRLoader( this.manager );
 		loader.load( url, function ( text ) {
 
-			onLoad( new THREE.Font( JSON.parse( text ) ) );
+			onLoad( new THREE.Font( JSON.parse( text.substring( 65, text.length - 2 ) ) ) );
 
 		}, onProgress, onError );
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác