• Content Count

  • Joined

  • Last visited

Everything posted by Ecco

  1. Ecco

    Pixi.js Showcase

    ..hi happy to let you know that for my project, cryptocurrency game, im using Pixi, for all pony animations as well as all mini games available to users, which will be released as part of the project. I hope you like it. :) Linky -> :
  2. Ecco

    Pixi.js Showcase

    ..just finished animation and tests on placeholders(forest image is not mine, im using it as a reference only) ..more to be shared soon..
  3. ..hi guys..i hope you are all doing well..this time i have 2 questions.. 1) How to force browser to go maximized size 2) How to force browser to go to fullscreen Thank you very much.
  4. ..hi guys.. Im following tutorials from here and i cant see any examples with how to load/manage sound in PIXI. Can you point me in right direction, please. EDIT: I got it here..
  5. ..hi guys.. ...what would be a way to 'mirror' Spine created character ?? Basically if character need to move right-left, how would i flip it so its facing direction of motion(along X axis) ??
  6. hi Ivan. to say works, and it doesn't work at all (everything stuck/freeze), which is a random thing. I thought its because im trying to access loaded entity handler, before is actually loaded. So, i have created new loader for every loaded spine animation and added 'once' so i will trace when its actually loaded ANIMATION_LOADER.push(new PIXI.loaders.Loader()); ANIMATION_LOADER[ANIMATION_LOADER.length-1].add('character', spineJSON_filename).load(onAssetsLoaded).once('complete',this.complete,this);, onAssetsLoaded looks like this function onAssetsLoaded(loader,resources) { ANIMATION_SPINE.push(new PIXI.spine.Spine(resources.character.spineData)); ANIMATION_SPINE[ANIMATION_SPINE.length-1].skeleton.setSlotsToSetupPose(); ANIMATION_SPINE[ANIMATION_SPINE.length-1].skeleton.setSkinByName(ANIMATION_DEFAULT_SKIN); ANIMATION_SPINE[ANIMATION_SPINE.length-1].x = 100;//RND(100,window.innerWidth+100); ANIMATION_SPINE[ANIMATION_SPINE.length-1].y = RND(280,window.innerHeight-250); ANIMATION_SPINE[ANIMATION_SPINE.length-1].scale.set(1.0); ANIMATION_SPINE[ANIMATION_SPINE.length-1].state.setAnimation(0, 'walk', true); GAME.stage.addChild(ANIMATION_SPINE[ANIMATION_SPINE.length-1]); } and function complete looks like function complete(loader,resources) { ANIMATION_IS_LOADED.push(true); }, im using ANIMATION_IS_LOADED , which has same index as ANIMATION_SPINE to track is it loaded or not, before i can access animation handle. Function for setting position, im calling in a game loop, looks like this function ANIMATION_SET_POSITION(characterID,x_,y_) { if(ANIMATION_IS_LOADED[characterID]) { ANIMATION_SPINE[characterID].x=x_; ANIMATION_SPINE[characterID].y=y_; } }, this, sort of fixed my problem...however, i would like to know, what would be another way to know for sure that whatever is thrown at loader is actually loaded ? What would be other method of loading media, kind a 'manually' where program will not go on to next instruction until is previous one completed(media loaded) ??
  7. Hi guys.. Im trying to load multiple SPINE animations and each store in an array. Problem is that, i cant access loaded SPINE animations created as an array inside onAssetsLoaded function. Arrays are defined outside of onAssetsLoaded function, which is why im confused. Here it is.. var ANIMATION_SPINE=[]; //declared outside of any function ..then i load animated character like this, PIXI.loader.add('character', spineJSON_filename).load(onAssetsLoaded); ..and onAssetsLoaded function looks like this.. function onAssetsLoaded(loader,res) { ANIMATION_SPINE.push(new PIXI.spine.Spine(res.character.spineData)); ANIMATION_SPINE[ANIMATION_SPINE.length-1].skeleton.setSkinByName( 'skin1'); ANIMATION_SPINE[ANIMATION_SPINE.length-1].x = 600; ANIMATION_SPINE[ANIMATION_SPINE.length-1].y = 600; ANIMATION_SPINE[ANIMATION_SPINE.length-1].skeleton.setSlotsToSetupPose(); ANIMATION_SPINE[ANIMATION_SPINE.length-1].scale.set(1.0); ANIMATION_SPINE[ANIMATION_SPINE.length-1].state.setAnimation(0, 'walk', true); GAME.stage.addChild(ANIMATION_SPINE[ANIMATION_SPINE.length-1]); } ..after this, i see my character on the screen and its properly animated..however, i cant access ANIMATION_SPINE (i want to change animations, or skins, etc, in runtime) array outside of onAssetsLoaded() even its declared outside of any to do this? How to store animations inside array from where i can access them globally ?? Thank you in advance guys.