Jump to content

Melon JS Particle Tester Broken


Growler
 Share

Recommended Posts

Hello, I wanted to use this particle creator/editor as I have many times before but it's down now: http://melonjs.github.io/melonJS/examples/particles/

Error throw in console is: Uncaught TypeError: context.beginPath is not a function

Seems you've updated its MelonJS to latest without making necessary changes? 

I'm on Melon JS 5.1 and don't have plans to upgrade for the time being. Can you restore the functionality of this please?

@obiot

 

Link to comment
Share on other sites

@obiot I just don't have time to read thru changes I need to make from 5.1 to latest. 

I guess the WebGL "Texture cache overflow: 16 texture units available." error is pretty annoying but not sure any Melon upgrades can solve that limitation. (I talk about it here: 

If you email me at [email protected] I can send you the game so you can check it out. Perhaps as you play maybe you can find some reasons I should upgrade?

Link to comment
Share on other sites

@obiot separately (I know I should probably start a new thread), do you know how can I maintain order of Tiled Layers?

As you can see from the tiled Layers image below, Player should always appear behind building overlap (since it's ordered below in Tiled) yet in game he appears in front.

Secondly, if I have to manually change the layering, how I can get access to the tiled layers within melonJS code?

1011921819_ScreenShot2019-04-01at11_44_23PM.png.663db2b4a4425eadc14aad38be789073.png

Link to comment
Share on other sites

2 hours ago, Growler said:

@obiot separately (I know I should probably start a new thread), do you know how can I maintain order of Tiled Layers?

As you can see from the tiled Layers image below, Player should always appear behind building overlap (since it's ordered below in Tiled) yet in game he appears in front.

Secondly, if I have to manually change the layering, how I can get access to the tiled layers within melonJS code?

1011921819_ScreenShot2019-04-01at11_44_23PM.png.663db2b4a4425eadc14aad38be789073.png

really ? sounds like a bug/regression to me, and I'm not seeing an issue with the Platformer example.... are you rendering all layer separately or using the preRender flag ? (http://melonjs.github.io/melonJS/docs/me.sys.html#.preRender)

as for manually changing the order ingame, you can use the getChildByName or getChildByType method of the wolrd container  :

for example:


// return the first layer with the name Spawn
var layer = me.game.world.getChildByName("Spawn")[0];

// return all layers object 
var layers = me.game.world.getChildByName(me.TMXLayer);

 

and then access the pos property of the layer and change the z or y value (based on the sorting method you are using)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...