Changed normal of the ground to GL, Now the normal mapping is correct.
This commit is contained in:
@@ -5,21 +5,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import scene from './scene.js';
|
||||
import scene from "./scene.js";
|
||||
|
||||
import shader from './shader.js';
|
||||
import shader from "./shader.js";
|
||||
|
||||
import mesh from './mesh.js';
|
||||
import mesh from "./mesh.js";
|
||||
|
||||
import material from './material.js';
|
||||
import material from "./material.js";
|
||||
|
||||
import sampler2D from './sampler2D.js';
|
||||
import sampler2D from "./sampler2D.js";
|
||||
|
||||
import entity from './entity.js';
|
||||
import entity from "./entity.js";
|
||||
|
||||
import {matrix3, matrix4} from './math.js';
|
||||
import {matrix3, matrix4} from "./math.js";
|
||||
|
||||
import boundingBox from './boundingBox.js';
|
||||
import boundingBox from "./boundingBox.js";
|
||||
|
||||
/**
|
||||
* Player object
|
||||
@@ -153,6 +153,14 @@ class assimp
|
||||
|
||||
this.scene = scene;
|
||||
|
||||
this.currentModelFile = jsonFilename;
|
||||
|
||||
if( typeof kepler !== "undefined" && kepler && kepler.resources ) {
|
||||
|
||||
kepler.resources.updateFilePreloaderProgress( this.name, 0, 0, false );
|
||||
|
||||
}
|
||||
|
||||
var data = this.loadTextFileSynchronous( this.baseUrl + this.modelPath + jsonFilename );
|
||||
|
||||
this.processFiles(data);
|
||||
@@ -217,10 +225,14 @@ class assimp
|
||||
|
||||
|
||||
request.onprogress = callback = function (evt) {
|
||||
|
||||
console.log("onupdate", evt);
|
||||
|
||||
//kepler.loader.update( evt.target.responseURL, evt.loaded, evt.total );
|
||||
|
||||
if( typeof kepler !== "undefined" && kepler && kepler.resources && evt && evt.target && evt.target.assimp ) {
|
||||
|
||||
var label = evt.target.assimp.name;
|
||||
|
||||
kepler.resources.updateFilePreloaderProgress( label, evt.loaded, evt.total, false );
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -231,6 +243,22 @@ class assimp
|
||||
//console.log(request.responseText);
|
||||
this.assimp.filesToLoad.push({data: request.responseText, filename: request.responseURL });
|
||||
//'this.assimp.filesToLoad.push(evt.responseText);
|
||||
|
||||
if( typeof kepler !== "undefined" && kepler && kepler.resources && this.assimp ) {
|
||||
|
||||
var label = this.assimp.name;
|
||||
|
||||
var totalBytes = 0;
|
||||
|
||||
if( request.responseText ) {
|
||||
|
||||
totalBytes = request.responseText.length;
|
||||
|
||||
}
|
||||
|
||||
kepler.resources.updateFilePreloaderProgress( label, totalBytes, totalBytes, true );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -792,4 +820,4 @@ console.log('diffuseAdress', diffuseAdress);
|
||||
}
|
||||
}
|
||||
|
||||
export {assimp as default};
|
||||
export {assimp as default};
|
||||
|
||||
Reference in New Issue
Block a user