Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
done spritesheet shader and coppercube basic logo animation |
||||
|
|
||||
|
i like it |
||||
|
Looks good. Did you make the spritesheet shader or buy it off just_in_case ? |
||||
|
Robo, i write all by myself, never use any code from other user i think thats good way to improve my coding level (cuz im not programmer) |
||||
|
You should sell it on itchio then if it works well - ie you just input number vertically and horizontally and it gets the texture number you want from that....I will buy it off you if its not too expensive (like $1-2 or something like that). Default animated textures in CC are a pain to have to split up a from a sprite sheet and then load each image into CC - its slower and less performance than just having a single texture.... post the link below if you could...cheers. |
||||
|
Robo, there nothing to sell, in "before first drawing do something" execute js:
and call shader(x_length,y_length,x_frame,y_frame) inside of "every few seconds do something" (x_frame and y_frame is yor frame so you can call this part of image in any way you want) |
||||
|
Very cool 'samgrady' - thanks for that. I haven't had much time for shaders of late - it worked ! Step 1 - I just created some global variables on first load: var partX = 0; var partY = 0; var maxX = 4; // horizontal images var maxY = 4; // vertical images Step 2 - then just ran this little bit of code every 100ms: if (partX == maxX) { partX = 0; partY += 1; if (partY == maxY) {partY = 0; }} shader(maxX, maxY, partX, partY); partX += 1; and badda boom !! - she's a goer !! I also just changed line 42 from 0 to 13 for transparent... Cheers ! |
||||
|
Robo, i'm just start to study shader so glad to help) |
|