Rename result to output.
This commit is contained in:
parent
ec4bc495a2
commit
009925c4b6
10
source/external/threeconverter.js
vendored
10
source/external/threeconverter.js
vendored
@ -6,7 +6,7 @@ OV.ModelToThreeConversionParams = class
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OV.ModelToThreeConversionResult = class
|
OV.ModelToThreeConversionOutput = class
|
||||||
{
|
{
|
||||||
constructor ()
|
constructor ()
|
||||||
{
|
{
|
||||||
@ -14,9 +14,9 @@ OV.ModelToThreeConversionResult = class
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OV.ConvertModelToThreeMeshes = function (model, params, result, callbacks)
|
OV.ConvertModelToThreeMeshes = function (model, params, output, callbacks)
|
||||||
{
|
{
|
||||||
function CreateThreeMaterial (model, materialIndex, params, result)
|
function CreateThreeMaterial (model, materialIndex, params, output)
|
||||||
{
|
{
|
||||||
function SetTextureParameters (texture, threeTexture)
|
function SetTextureParameters (texture, threeTexture)
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@ OV.ConvertModelToThreeMeshes = function (model, params, result, callbacks)
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (material.isDefault) {
|
if (material.isDefault) {
|
||||||
result.defaultMaterial = threeMaterial;
|
output.defaultMaterial = threeMaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
return threeMaterial;
|
return threeMaterial;
|
||||||
@ -195,7 +195,7 @@ OV.ConvertModelToThreeMeshes = function (model, params, result, callbacks)
|
|||||||
|
|
||||||
let modelThreeMaterials = [];
|
let modelThreeMaterials = [];
|
||||||
for (let materialIndex = 0; materialIndex < model.MaterialCount (); materialIndex++) {
|
for (let materialIndex = 0; materialIndex < model.MaterialCount (); materialIndex++) {
|
||||||
let threeMaterial = CreateThreeMaterial (model, materialIndex, params, result);
|
let threeMaterial = CreateThreeMaterial (model, materialIndex, params, output);
|
||||||
modelThreeMaterials.push (threeMaterial);
|
modelThreeMaterials.push (threeMaterial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
source/external/threemodelloader.js
vendored
6
source/external/threemodelloader.js
vendored
@ -63,13 +63,13 @@ OV.ThreeModelLoader = class
|
|||||||
this.callbacks.onVisualizationStart ();
|
this.callbacks.onVisualizationStart ();
|
||||||
let params = new OV.ModelToThreeConversionParams ();
|
let params = new OV.ModelToThreeConversionParams ();
|
||||||
params.forceMediumpForMaterials = this.hasHighpDriverIssue;
|
params.forceMediumpForMaterials = this.hasHighpDriverIssue;
|
||||||
let result = new OV.ModelToThreeConversionResult ();
|
let output = new OV.ModelToThreeConversionOutput ();
|
||||||
OV.ConvertModelToThreeMeshes (importResult.model, params, result, {
|
OV.ConvertModelToThreeMeshes (importResult.model, params, output, {
|
||||||
onTextureLoaded : () => {
|
onTextureLoaded : () => {
|
||||||
this.callbacks.onTextureLoaded ();
|
this.callbacks.onTextureLoaded ();
|
||||||
},
|
},
|
||||||
onModelLoaded : (meshes) => {
|
onModelLoaded : (meshes) => {
|
||||||
this.defaultMaterial = result.defaultMaterial;
|
this.defaultMaterial = output.defaultMaterial;
|
||||||
this.callbacks.onModelFinished (importResult, meshes);
|
this.callbacks.onModelFinished (importResult, meshes);
|
||||||
this.inProgress = false;
|
this.inProgress = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user