
pixiSSA.createAniPicture(0,'cloud',10); //create the aniOBJ cloud, asign to id 0, and id assign to layer 10
pixiSSA.changeLayers(0 ,9); //transfer id 0, to layer 9, a lower layer
var myVar = pixiSSA.changeLayers(0 ,14); // also store animationControler in a scoped var
myVar.changeLayers(0 ,true); // restore to default initial layer.
pixiSSA.testPerformances(10,'cloud',500); //creates *500,renderings and plays cloud aniObj in the layer 10
pixiSSA.destroyCaches('cloud'); //perma destroy the cloud obj in pixiSSA._aniObj and all textures
var myVar = pixiSSA.getAnimationControler_Pictures(0); //store animationControler ID in a var
var myVar = pixiSSA.getAnimationControler_Events(24); //get the animationControler from events 24
myVar.start('mymotion');// start a motion from this controller
var myVar = pixiSSA.getAnimationControler_Actors(1); //store animationControler of the actor 1
var startLists = pixiSSA.startAll(); //start rendering and play all aniControler with motions you created
var startLists = pixiSSA.startAll(false,true,true); //start all module rendering with all aniControler have motions.
var playLists = pixiSSA.playAll([2,57,105,1000]); //resume all motions from the last frame paused.
var playLists = pixiSSA.playAll(false,true,true); //resume all animation of all module
var stopLists = pixiSSA.stopAll([2,57,105,1000]); //stop all motions and the rendering in those animationControler id.
var stopLists = pixiSSA.stopAll(false,true,true); //stop all rendering of all module
var stopLists = pixiSSA.pauseAll( [2,57,105,1000] ); //pause all motions in those animationControler id, keep the rendering
var myVar = pixiSSA.bindMaps(6); //bind the animationControler 6 to the map from screen position
var myVar = pixiSSA.bindMaps(6,1240,600); //bind the animationControler 6 to the reel map coor 1240x,600y
pixiSSA.debug([2,1]); //apply a debug rendering mode to motions in animationControler 2 and 1
pixiSSA._animationControler._pictures._animationPicturesIndex[id] //direct acces
var myVar = pixiSSA.getAnimationControler_Pictures(id) // acces by return, also can store in a scope variable
var myVar = createAniPicture (id,aniObj,layer) // acces by create, also can store in a scope variable
var newProps = {x:50, y:100, scale[1,-1], alpha:0.5, pivot:[0.1,0.8], buttonMode:true, ...};
pixiSSA.createAniPicture(0,'cloud',10).setControlerProps(newProps)
pixiSSA.getAnimationControler_Pictures(0).setControlerProps(newProps)
pixiSSA.getAnimationControler_Pictures(66).setControlerProps( {x:50, y:100} )
pixiSSA.createAniPicture(0,'cloud',10).start(); // ex: create animationControler with cloudOBJ, and will start the default motion in the list
pixiSSA.getAnimationControler_Pictures(0).start("cloud_shake2", 5) // get the target animationControler, and start the motion cloud_shake2 at frame 5
pixiSSA.getAnimationControler_Pictures(7).stop() //stop all motions update and rendering in scene (no more calculation)
pixiSSA.getAnimationControler_Pictures(7).stop(true) //stop all motions update and rendering, but force keep the property in controler
pixiSSA.getAnimationControler_Pictures(7).play() //resume update animation from last frame
pixiSSA.getAnimationControler_Pictures(7).pause() //pause current motion and freeze frame and update (allow resume)
pixiSSA.getAnimationControler_Pictures(0).bindToMaps(); //autoBind by current screen position
pixiSSA.createAniPicture(0,'cloud',10).bindToMaps(1200,50).play("cloud_idle3"); // create, bindToNew x,y and play rendering
pixiSSA.getAnimationControler_Pictures(0).bindToScreen(); // unBindMap
pixiSSA.getAnimationControler_Pictures(0).bindToScreen(95,10); // unBindMap and apply factor pixel screen position (1pixel are now X:0.05 Y:0.90
pixiSSA.createAniPicture(8,'bigTree1',3).bindToMaps(120,200).setCollide([-5,5,20,-5]).play("idle1"); //create aniObj bigTree1, id 8, to layer 3, bind it to map at X120,Y200, giveColision zone to trink, play and rendering
pixiSSA.getAnimationControler_Pictures(8).setCollide(); // heroes can move if its x,y are inside the collision zone make by the current motions rendered
pixiSSA.createAniPicture(8,'menu1',10).addSpineBone('menuBG','wheel1',[1,1],true)
.addSpineBone('menuBG','wheel2',[1000,1],true)
.addSpineBone('menuBG','wheel3',[1,500],true)
.play("menuBG"); //if bone detect in children menuBG, they will auto play
pixiSSA.createAniPicture(8,'cloud',10).play("idl1").debug(); //play normal, with motionContext in debug Mode
var myVar = pixiSSA.createAniPicture(8,'cloud',10).debug(true); //force play ordered motions sequences with debug mode
pixiSSA.createAniPicture(8,'cloud',10).debug( [0,1,2,1] ); //force play custom motions sequences with debug mode
myVar.setMotionsProps( {x:50} ); // you can easily add more setup after debug run.
var myEase = pixiSSA.getAnimationControler_Pictures(id).newEasing( {x:100,y:200} );
myEase.ease(IAVRA.EASING.elastic.out).dur(30).delay(1).start(); // move animationControler to x,y coor with easing 30 frame , and delay 1 frame
pixiSSA.getAnimationControler_Pictures(id).delete(true); // with true, deep remove and destroy obj
pixiSSA.getAnimationControler_Pictures(id).delete(true); // with true, deep remove and destroy obj
//this is example for loop with 2 randomise motions context evaluation.
var myVar = pixiSSA.getAnimationControler_Pictures(10);
myVar.addMotionContext_Linear ('idle1','idle2',29,80); // 80%chance to start idle2, if idle1 reach his frame 29.
myVar.addMotionContext_Linear ('idle1','idle2',"end",5); // 5%chance to start idle2, if idle1 reach his frame 29(lastFrames).
myVar.addMotionContext_Linear ('idle2','idle1',"end"); // 100%chance to start idle1, if idle2 reach his frame 10(lastFrames ex: of idle2 are 10).
var myVar = pixiSSA.getAnimationControler_Pictures(3);
myVar.addMotionContext_winks('idle1','wink2',5,30); // 30%chance to start wink2, if idle1 reach his frame 5.
//when wink2 reach end cycle after example 5 frame, will rendering back idle1 at frame 10.
myVar.addMotionContext_winks('idle1','wink3',10,25); // 25%chance to start wink3, if idle1 reach his frame 10.
// also if wink2 finish , rendering back idle1, and allow to instantly evaluate if can call wink3
var myVar = pixiSSA.getAnimationControler_Pictures(3);
myVar.addMotionContext_onMoved('idle1','walk2',true); // 100%chance to start walk2, if idle1 detect AnimationControler moving.
//true apply evaluation on each frame update from pixi.tiker
var myVar = pixiSSA.getAnimationControler_Pictures(3);
myVar.addMotionContext_FX('walking','smokeStep',0,100,true); // 100%chance to render smokeStep, if motion walking reatch frame 0. Also force play again if smokeStep already playing
myVar.addMotionContext_FX('startWalk','wing',"end"); // 100%chance to render wing, if motion startWalk reatch his last frame.if already playing, do nothing.
var myAudioObj1 = { name: "wing", volume: 100, pitch: 100, pan: 100 };
var myAudioObj2 = { name: "stepHit", volume: 100, pitch: 100, pan: 100 };
var myVar = pixiSSA.getAnimationControler_Pictures(40);
myVar.addMotionContext_Audio('startMov1',myAudioObj1,0,100); // 100%chance to playSound wing, at if startMov1 are rendering frame 0.
myVar.addMotionContext_Audio('winlking1',myAudioObj2,"middle",100); // 100%chance to playSound stepHit, at if winlking1 are rendering at frame middle:(totalFrame/2).
var myVar = pixiSSA.getAnimationControler_Pictures(40);
myVar.addMotionContext_playerCollid('idle1','hey2',true,100); // 100%chance to rendering motion hey2 if player collide with motion idle1
var myVar = pixiSSA.getAnimationControler_Pictures(40);
myVar.addMotionContext_playerCollid('hey2','idle1',true,100); //100%chance to rendering motion idle1 if player not collide with motion hey2
var myVar = pixiSSA.getAnimationControler_Pictures(2);
myVar.addMotionContext_mouseIn('idle1','mouseSelector1',true,100,true); // 100%chance to rendering motion mouseSelector1 FX if mouse collide with motion idle1
var myVar = pixiSSA.getAnimationControler_Pictures(2);
myVar.addMotionContext_mouseOut('mouseSelector1','idle2',true,100); // 100%chance to rendering motion idle2 if mouse not collide with motion mouseSelector1
myVar.addMotionContext_mouseOut('mouseSelector1','idle2',true,100).onTrue({loop:false}); // 100%chance to rendering motion idle2 if mouse not collide with motion mouseSelector1, also execute custom property setter to loop false.
var myFunc = function(){myStuff};
myVar.addMotionContext_custom(myFunc); // custom callback evaluation
var myFunc = function(){};
pixiSSA.createAniPicture(8,'bigTree1',3)
.addMotionContext_mouseOut('mouseSelector1','idle2',true,100).onTrue(myFunc).onFalse(myFunc) // affect this MotionContext only
.addMotionContext_onMoved('idle1','walk2',true).onTrue(myFunc) // affect this MotionContext only
.play("idle1");
pixiSSA.createAniPicture(8,'bigTree1',3)
.addMotionContext_mouseIn('idle1','mouse1',true,100).onTrue( {alpha:0.5} )
.addMotionContext_mouseOut('mouse1','idle1',true,100).onTrue( {alpha:1} )
.play("idle1");
simpleLoopPicture1:{
json:['spriteSheetsAni/sheets/multiPack/bobSpriteSheet1'],
motionList:{
motionLoop:{ref:'bob_idle1_',framesRange:[0,39],loop:true},
},
},
pixiSSA.createAniPicture(0,4,' simpleLoopPicture1').play(' motionLoop ');
var myVar = pixiSSA.createAniPicture(0,4,'bob');
myVar.play('idl1');
myPlayer1:{
json:['testSmallPlayerAni/h1test'],
motionList:{
idl1Ri:{ref:'H1IDLE1_',framesRange:[0,19],speed:0.3,anchor:[0.5,1],loop:true,dir:6},
idl1Le:{ref:'H1IDLE1_',framesRange:[0,19],scale:[-1,1],speed:0.3,anchor:[0.5,1],loop:true,dir:4},
},
},
myPlayer1:{
json:['testSmallPlayerAni/h1test'],
motionList:{
idl1Ri:{ref:'H1IDLE1_',framesRange:[0,19],speed:0.3,anchor:[0.5,1],loop:true,dir:6},
idl1Le:{ref:'H1IDLE1_',framesRange:[0,19],scale:[-1,1],speed:0.3,anchor:[0.5,1],loop:true,dir:4},
idlUp:{ref:{4:'idl1Le',6:'idl1Ri'},dir:8},
idlDw:{ref:{4:'idl1Le',6:'idl1Ri'},dir:2},
},
},
myPlayer1:{
json:['testSmallPlayerAni/h1test'],
motionList:{
idl1Ri:{ref:'H1IDLE1_',framesRange:[0,19],speed:0.3,anchor:[0.5,1],loop:true,dir:6},
idl1Le:{ref:'H1IDLE1_',framesRange:[0,19],scale:[-1,1],speed:0.3,anchor:[0.5,1],loop:true,dir:4},
idlUp:{ref:{4:'idl1Le',6:'idl1Ri'},dir:8},
idlDw:{ref:{4:'idl1Le',6:'idl1Ri'},dir:2},
moveR1:{ref:'H1moveDG1_',framesRange:[0,49],anchor:[0.5,0.93]},
moveL1:{ref:'H1moveDG1_',framesRange:[0,49],scale:[-1,1],anchor:[0.5,0.93]},
moveUpR1:{ref:'H1moveUP_',framesRange:[0,49],anchor:[0.5,1]},
moveDwL1:{ref:'H1moveDW_',framesRange:[0,49],anchor:[0.5,1]},
moveUpG1:{ref:'H1moveUP_',framesRange:[0,49],scale:[-1,1],anchor:[0.5,1]},
moveDwG1:{ref:'H1moveDW_',framesRange:[0,49],scale:[-1,1],anchor:[0.5,1]},
},
},
myPlayer1:{
json:['testSmallPlayerAni/h1test'],
motionList:{
idl1Ri:{ref:'H1IDLE1_',framesRange:[0,19],speed:0.3,anchor:[0.5,1],loop:true,dir:6},
idl1Le:{ref:'H1IDLE1_',framesRange:[0,19],scale:[-1,1],speed:0.3,anchor:[0.5,1],loop:true,dir:4},
idlUp:{ref:{4:'idl1Le',6:'idl1Ri'},dir:8},
idlDw:{ref:{4:'idl1Le',6:'idl1Ri'},dir:2},
moveR1:{ref:'H1moveDG1_',framesRange:[0,49],anchor:[0.5,0.93]},
moveL1:{ref:'H1moveDG1_',framesRange:[0,49],scale:[-1,1],anchor:[0.5,0.93]},
moveUpR1:{ref:'H1moveUP_',framesRange:[0,49],anchor:[0.5,1]},
moveDwR1:{ref:'H1moveDW_',framesRange:[0,49],anchor:[0.5,1]},
moveUpL1:{ref:'H1moveUP_',framesRange:[0,49],scale:[-1,1],anchor:[0.5,1]},
moveDwL1:{ref:'H1moveDW_',framesRange:[0,49],scale:[-1,1],anchor:[0.5,1]},
},
motionContexts:[
['addMotionContext_onMoved','idl1Le',{ 2:' moveDwL1', 4:' moveL1', 8:' moveUpL1', },100],
['addMotionContext_onMoved','idl1Ri',{ 2:' moveDwR1', 6:'moveR1', 8:' moveUpR1', },100],
],
},
grassTestEvent:{
json:['spriteSheetsAni/sheets/singleFiles/grassV2'],
motionList:{
idl1:{ref:'idl1_',framesRange:[0,19],speed:0.32,anchor:[0.5,0.7],loop:true,dir:false},
},
},
grassTestEvent:{
json:['spriteSheetsAni/sheets/singleFiles/grassV2'],
motionList:{
idl1:{ref:'idl1_',framesRange:[0,19],speed:0.32,anchor:[0.5,0.7],loop:true,dir:false},
onFootD:{ref:'footD_',framesRange:[0,19],anchor:[0.5,0.7],loop:false},
endFootD:{ref:'footD_',framesRange:[19,0],anchor:[0.5,0.7],loop:false},
onFootG:{ref:'footG_',framesRange:[0,19],anchor:[0.5,0.7],loop:false,speed:0.35},
endFootG:{ref:'footG_',framesRange:[19,0],anchor:[0.5,0.7],loop:false,speed:0.35},
onFootUpDw:{ref:'grassUD_',framesRange:[0,19],anchor:[0.5,0.7],loop:false,speed:0.6},
endFootUpDw:{ref:'grassUD_',framesRange:[19,0],anchor:[0.5,0.7],loop:false,speed:0.6},
},
},
grassTestEvent:{
json:['spriteSheetsAni/sheets/singleFiles/grassV2'],
motionList:{
idl1:{ref:'idl1_',framesRange:[0,19],speed:0.32,anchor:[0.5,0.7],loop:true,dir:false},
onFootD:{ref:'footD_',framesRange:[0,19],anchor:[0.5,0.7],loop:false},
endFootD:{ref:'footD_',framesRange:[19,0],anchor:[0.5,0.7],loop:false},
onFootG:{ref:'footG_',framesRange:[0,19],anchor:[0.5,0.7],loop:false,speed:0.35},
endFootG:{ref:'footG_',framesRange:[19,0],anchor:[0.5,0.7],loop:false,speed:0.35},
onFootUpDw:{ref:'grassUD_',framesRange:[0,19],anchor:[0.5,0.7],loop:false,speed:0.6},
endFootUpDw:{ref:'grassUD_',framesRange:[19,0],anchor:[0.5,0.7],loop:false,speed:0.6},
},
motionContexts:[
['addMotionContext_playerIn','idl1',{4:'onFootG', 6:'onFootD',8:'onFootUpDw',2:'onFootUpDw'},true,100,true,true], // 1true:allframe, 2true:allowcolide wither follower 3true:eventColider
['addMotionContext_playerOut','onFootG','endFootG',true,100,true,true],
['addMotionContext_playerOut','onFootD','endFootD',true,100,true,true],
['addMotionContext_playerOut','onFootUpDw','endFootUpDw',true,100,true,true],
['addMotionContext_Linear',['endFootUpDw','endFootD','endFootG'],'idl1',19,100],
],
},