Closed jcyuan closed 3 years ago
Hi!
What kind of extension do you want to implement? A new editor? A new scene object? A new view?
im gonna implement a Particle Eidtor plugin, so i think it will have a set of panel views. for example a panel view with a xy axis in it to control the xy acceleration xy etc.
im wondering what will be the plugin structure. is it like you provide me the Panel container, and i write with html tech in it?
A new editor is great.
Regarding the panels. It follows these concepts:
When an editor is active (as the focus) a set of views around it connects with the editor:
So I think for the Particle Editor you don't need to add extra panels (views). You only need to implement the editor and the connectors with the Outline, Blocks, and Inspector views.
I will make a starter plugin for you. I think for a Particle Editor, all your content will be rendered by an instance of Phaser. You don't need to add HTML, else Phaser objects. In this case, a particle emitter.
You only need to add HTML in the properties provider of the Inspector view. But it is not really HTML. I create all the using the DOM API. Also, the Inspector view provides helpers for creating common editors like text, buttons, viewers, menu.
I plan to support particle emitters but not for now. And I think I will add it as a new object of the scene editor. So you can add an emitter to the scene and edit it there. But that's great if you want to make a particle editor.
emmm, this sounds a little complex, actually in my mind it should like this:
and this is enough. (oh with a preview window of course, not in this pic)
I plan to support particle emitters but not for now. And I think I will add it as a new object of the scene editor. So you can add an emitter to the scene and edit it there. But that's great if you want to make a particle editor.
oh!! official editor? but i know you are busy... so probably this will take a lot of time.
and yes, what you said is my purpose, create / edit an particle and finally use it in the scene.
I will make a starter plugin for you. I think for a Particle Editor, all your content will be rendered by an instance of Phaser. You don't need to add HTML, else Phaser objects. In this case, a particle emitter.
You only need to add HTML in the properties provider of the Inspector view. But it is not really HTML. I create all the using the DOM API. Also, the Inspector view provides helpers for creating common editors like text, buttons, viewers, menu.
this sounds very good! because if all are Phaser stuffs this way will save a lot of time indeed.
Yes, it could be a bit complex but... it is how the editor works. I think if you are going to extend the editor you should follow certain rules or a certain workflow. In another case, you can create a separate tool! I mean, a separate tool is always a good idea. For example, for making maps you can use Tiled. For making texture atlases you can use Texture Packer. So you can create your own Particle Editor as a separate tool. And maybe we should think in how to integrate both tools, Phaser Editor 2D and the Particle Editor.
Actually. Look the Phaser Editor 2D is more about to create the scenes. So, you can create third-party tools for modeling certain objects. Later, you can create a Phaser Editor 2D plugin for allow adding the third-party objects into the scene. It also allows using the third-party tool in projects that are not using Phaser Editor 2D.
Actually. Look the Phaser Editor 2D is more about to create the scenes. So, you can create third-party tools for modeling certain objects. Later, you can create a Phaser Editor 2D plugin for allow adding the third-party objects into the scene. It also allows using the third-party tool in projects that are not using Phaser Editor 2D.
totoaly agree with this. Scene editor provides some thing like interface for allowing to import 3rd objects maybe. ok then, i'll make my own particle tools, then maybe with Prefab or UserComponent to initialize my 3rd particle object jsons.
Yes. You can load the particle json file in an asset pack and link it in using a prefab or user component. That's the simplest solution. Maybe later you can make a complete custom object for the scene so you can preview your particles in the scene. I can help with it. By the way, your tool can load the assets using the same asset pack files generated by Phaser Editor 2D.
Yes. You can load the particle json file in an asset pack and link it in using a prefab or user component. That's the simplest solution. Maybe later you can make a complete custom object for the scene so you can preview your particles in the scene. I can help with it. By the way, your tool can load the assets using the same asset pack files generated by Phaser Editor 2D.
how? i can make my own objects previewed instantly in the scene editor?? i was thinking if it's possible to have customized objects some special custom icons to tell them apart easier.
how? i can make my own objects previewed instantly in the scene editor??
Yes. Creating an scene object extension. Maybe I have to do something else for allowing it "animating", because right now the scene is repainted only when needed.
i was thinking if it's possible to have customized objects some special custom icons for telling them apart easier.
Maybe prefabs with no code-generation can help you. You can use a prefab as a black box, so you show whatever image in the prefab but using something different in runtime: https://help.phasereditor2d.com/v3/scene-editor/prefab-black-box.html
I got it! will do!
and before this, please help me to solve a key problem first... #122 please 😅
Actually, your tool can generate a screenshot image of the emitter and you can use it as reference in the black-box prefab. Well... your tool can generate a complete prefab :). It can generates a .scene
file, a pack.json
, and the screenshot file. So it prepares everything for Phaser Editor 2D.
Actually, your tool can generate a screenshot image of the emitter and you can use it as reference in the black-box prefab. Well... your tool can generate a complete prefab :). It can generates a
.scene
file, apack.json
, and the screenshot file. So it prepares everything for Phaser Editor 2D.
yes! good idea!!!
solution suggested, so close this.
Hi there, would like to try to write a plugin for V3 IDE but it seems the doc does not have this part yet so is it possible to provide a simple one to guide me please? thanks so much.