Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "Ramar" : async function() {
- let plMod = await NinjaFile.API.load("pldnj.bml");
- let plTex = await NinjaFile.API.load("pldtex.afs");
- let plMot = await NinjaFile.API.load("plymotiondata.pr2");
- let bml = NinjaFile.API.bml(plMod);
- let afs = NinjaFile.API.afs(plTex, true);
- let mot = NinjaFile.API.prc(plMot);
- console.log("--- Parse All Textures ---");
- let texList = new Array(afs.length);
- for(let i = 0; i < afs.length; i++) {
- texList[i] = NinjaTexture.API.parse(afs[i]);
- }
- console.log("--- Load Body ---");
- console.log(afs[0]);
- let bdyTex = [
- texList[123],
- texList[4],
- texList[5],
- texList[6],
- texList[111]
- ];
- let bdyLoader = new NinjaModel(this + "_body", bdyTex);
- bdyLoader.parse(bml["plDbdy00.nj"]);
- bdyLoader.plyMotion(mot);
- let body = bdyLoader.getModel();
- console.log("--- Load Head ---");
- let hedTex = [
- texList[63],
- texList[64]
- ];
- let hedLoader = new NinjaModel(this + "_head", hedTex);
- hedLoader.parse(bml["plDhed00.nj"]);
- let head = hedLoader.getModel();
- console.log("--- Load Hair ---");
- let haiTex = [
- texList[103],
- texList[104],
- texList[105]
- ];
- let haiLoader = new NinjaModel(this + "_hair", haiTex);
- haiLoader.parse(bml["plDhai00.nj"]);
- let hair = haiLoader.getModel();
- console.log("--- Load Cap ---");
- let capTex = [
- texList[2],
- texList[3]
- ];
- let capLoader = new NinjaModel(this + "_cap", haiTex);
- capLoader.parse(bml["plDcap00.nj"]);
- let cap = capLoader.getModel();
- let meshList = [head, hair, cap];
- for(let key in bml) {
- bml[key].seekSet(0);
- let ldr = new NinjaModel(key.replace(".nj", ""));
- ldr.parse(bml[key]);
- meshList.push(ldr.getModel());
- }
- console.log("--- Display Model ---");
- body.skeleton.bones[59].add(head);
- body.skeleton.bones[59].add(hair);
- body.skeleton.bones[59].add(cap);
- NinjaPlugin.API.setPlayer(this, body, meshList, texList);
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement