2
0
Эх сурвалжийг харах

Merge pull request #6211 from makc/buffer-geometry-loader-fix

BGL.parse fix
Mr.doob 10 жил өмнө
parent
commit
26b71211cc

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 3 - 0
examples/models/json/pressure.json


+ 3 - 3
src/loaders/BufferGeometryLoader.js

@@ -36,7 +36,7 @@ THREE.BufferGeometryLoader.prototype = {
 
 		var geometry = new THREE.BufferGeometry();
 
-		var attributes = json.attributes;
+		var attributes = json.data.attributes;
 
 		for ( var key in attributes ) {
 
@@ -47,7 +47,7 @@ THREE.BufferGeometryLoader.prototype = {
 
 		}
 
-		var offsets = json.offsets;
+		var offsets = json.data.offsets;
 
 		if ( offsets !== undefined ) {
 
@@ -55,7 +55,7 @@ THREE.BufferGeometryLoader.prototype = {
 
 		}
 
-		var boundingSphere = json.boundingSphere;
+		var boundingSphere = json.data.boundingSphere;
 
 		if ( boundingSphere !== undefined ) {
 

+ 1 - 1
src/loaders/ObjectLoader.js

@@ -183,7 +183,7 @@ THREE.ObjectLoader.prototype = {
 
 					case 'BufferGeometry':
 
-						geometry = bufferGeometryLoader.parse( data.data );
+						geometry = bufferGeometryLoader.parse( data );
 
 						break;
 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно