mirror of
https://github.com/billsonnn/nitro-converter.git
synced 2024-11-22 23:50:52 +01:00
Fix animation issues
This commit is contained in:
parent
0e52cacdf8
commit
342fa7f122
@ -65,8 +65,8 @@ export class BundleProvider
|
|||||||
{
|
{
|
||||||
const files = await packAsync(imageBundle.images, {
|
const files = await packAsync(imageBundle.images, {
|
||||||
textureName: (convertCase ? documentClass.substring(1) : documentClass),
|
textureName: (convertCase ? documentClass.substring(1) : documentClass),
|
||||||
width: 3072,
|
width: 10240,
|
||||||
height: 2048,
|
height: 4320,
|
||||||
fixedSize: false,
|
fixedSize: false,
|
||||||
allowRotation: false,
|
allowRotation: false,
|
||||||
detectIdentical: true,
|
detectIdentical: true,
|
||||||
|
@ -64,7 +64,7 @@ export class FurnitureDataMapper extends Mapper
|
|||||||
furnitureType.name = typeXML.name;
|
furnitureType.name = typeXML.name;
|
||||||
furnitureType.description = typeXML.description;
|
furnitureType.description = typeXML.description;
|
||||||
furnitureType.adurl = typeXML.adurl;
|
furnitureType.adurl = typeXML.adurl;
|
||||||
furnitureType.offerid = typeXML.offerid;
|
furnitureType.offerid = typeXML.id;
|
||||||
furnitureType.buyout = typeXML.buyout;
|
furnitureType.buyout = typeXML.buyout;
|
||||||
furnitureType.rentofferid = typeXML.rentofferid;
|
furnitureType.rentofferid = typeXML.rentofferid;
|
||||||
furnitureType.rentbuyout = typeXML.rentbuyout;
|
furnitureType.rentbuyout = typeXML.rentbuyout;
|
||||||
|
@ -128,6 +128,11 @@ export class LogicMapper extends Mapper
|
|||||||
|
|
||||||
for(const particleSystemXML of xml)
|
for(const particleSystemXML of xml)
|
||||||
{
|
{
|
||||||
|
if(particleSystemXML.size !== undefined)
|
||||||
|
{
|
||||||
|
if([ 32 ].indexOf(particleSystemXML.size) >= 0) continue;
|
||||||
|
}
|
||||||
|
|
||||||
const particleObject: IParticleSystem = {};
|
const particleObject: IParticleSystem = {};
|
||||||
|
|
||||||
if(particleSystemXML.size !== undefined) particleObject.size = particleSystemXML.size;
|
if(particleSystemXML.size !== undefined) particleObject.size = particleSystemXML.size;
|
||||||
|
@ -189,6 +189,26 @@ export class VisualizationMapper extends Mapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static requestNextInsertId(requestId: number, output: { [index: string]: IAssetVisualAnimation }): string
|
||||||
|
{
|
||||||
|
let id = requestId.toString();
|
||||||
|
|
||||||
|
if(!output[id]) return id;
|
||||||
|
|
||||||
|
let i = 1;
|
||||||
|
|
||||||
|
while(i < 6)
|
||||||
|
{
|
||||||
|
id += '_' + i;
|
||||||
|
|
||||||
|
if(!output[id]) return id;
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private static mapVisualizationAnimationXML(xml: AnimationXML[], output: { [index: string]: IAssetVisualAnimation }): void
|
private static mapVisualizationAnimationXML(xml: AnimationXML[], output: { [index: string]: IAssetVisualAnimation }): void
|
||||||
{
|
{
|
||||||
if(!xml || !xml.length || !output) return;
|
if(!xml || !xml.length || !output) return;
|
||||||
@ -212,7 +232,11 @@ export class VisualizationMapper extends Mapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output[animationXML.id.toString()] = animation;
|
const id = this.requestNextInsertId(animationXML.id, output);
|
||||||
|
|
||||||
|
if(!id) continue;
|
||||||
|
|
||||||
|
output[id] = animation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user