Babylon~cinematics

IMPORTANT

Found a great animation syntax.

Had to dig for it. Very obscure. Hidden. Not explained on web.

It was necessary to “instrument” a web cinematic.

It uses “Inbetweening” syntax underneath, (CPU ok) and works (better than) ok.

Proof shortly.

EXAMPLE: interpolates 4 things simultaneously: x, y, z, with 1 rotation.

anm.({FROM},{TO});

x: 0 - 1
y: 10 - 0
z: 100 - 1
anything: 3.14 - 0

 anm({x:0,y:10,z:100, anything: 3.14})
 .anim8({x:1,y:0,z:1,anything:0},
 {bunch:false,dur:8000,ease:'swing',
 idx: function(now) {
    hero.position.x = this.x;  //<-- this.x is the interpolation num assigned to BABYLON.position.x
    hero.position.y = this.y;
    hero.position.z = this.z;
    hero.rotation.x = this.anything; //<-- interpolate multiple things simultaneously with PRECISION-.
 },done:function(){ //important, simple syntax.
}});

ALL IN ONE-LINE OF CODE!

Being COMPACT is key - to scale up.


It is called ANM~PATTERN-.

REQUIREMENT: anms defined ALL IN ONE LINE OF CODE -so they can move around and be instrumented. Which then results in fine-tuned animations at scale.

This is important to me. I had to have it. And I want to share-back. Happy Holidays!
NOTE: item for shelf, not dustheap. lol. : )

EXAMPLE: moving a camera and focus simultaneously:

 $({cx:initCAMPOS.x,cy:initCAMPOS.y,cz:initCAMPOS.z})
 .animate({cx:endCAMPOS.x,cy:endCAMPOS.y,cz:endCAMPOS.z
 },{queue:false,duration:8000*nx.RUNTIME,easing:'swing',
   step: function(now) {
       if(nx.cinemaStop){ $(this).stop(); console.log('stopped'); nx.spaceSeqIdx[1]={on:1}; return;}
          nx.camz.freeCam.position.x = this.cx;
          nx.camz.freeCam.position.y = this.cy;
          nx.camz.freeCam.position.z = this.cz;
          nx.camz.freeCam.setTarget(new BABYLON.Vector3(this.fx,this.fy,this.fz))
      },complete:function(){
       //SEQUENTIAL-ANMS-.
} });

Additional features (above): STOP, FFWD, and SLOWMO, as well.

CPU .

Could it be GPU?, as BABYLON.ANM;

Idk. My code is useless. But the concept is not.

BABYLON could make it cosmic.

Animation-Factory

BABYLON.anm({from},{to},idx=>,done:=>});

  • seems cool2me. <-shrug->
  • it is unique

(ping) @Deltakosh waddya think? : ]

Does aFalcon have ping-power? : )

BABYLON Animation Factory 2020.

It’ll happen.

:eagle:

(NOTE: I try to say clear concepts, good words, few jokes, re-write often. Working on better writing - still. : )