PlayCanvas Editor Feedback

I have a small thing, which might be a bit special to Germans as german keyboards have a comma instead of a dot at the numpad.
The problem is that the editor automatically converts any comma separated value to zero.
As I am using an international keyboard at work & a german one at home I get constantly annoyed by that fact. Silly me is always using entering stuff atleast once wrong after I get home from work :wink:
Therefore, I would highly appreciate it, if you could handle comas as dots :slight_smile:

2 Likes

Playing with the editor a bit and trying to set up a simple scene I find that the skybox tools could use a little bit of love. First and foremost, I would love to be able to use a sphere map as all of the HDRs I have are in that format. This is already possible with environment maps on a model so I imagine it wouldnā€™t be too difficult. The other small nitpick is that it would be nice to be able to set a rotation for the skybox. Most tools that have IBL allow this as it makes it much easier to get the right lighting without messing up your coordinate system.

2 Likes

These features make sense, and Iā€™d really want them too. Do you think rotating the skybox at runtime is useful or is it enough to bake rotation in the cubemap itself? Setting rotation once doesnā€™t cost anything, but runtime dynamic rotation means adding some trig to all skybox/reflection/refraction/ambient code, can be costly.

Can you please add a revert ability. Like if you (Insert bad word here) up your edit and want to go back to your published save that you know is still good.

Weā€™re working on it. :wink:

So this might sound kind of ambitious but since we have community written typings any chance we could get typescript support in the code editor :grin:?

RE: Cubemaps / skyboxes. Being able to bring in spherical HDRā€™s would be great. Rotation at run time isnā€™t needed in most cases, but rotation would be great to line them up with lighting.

The ability to make the reflections from them less blurry would be great too, we are doing interiors and I canā€™t get the reflections to look mirror like at all.

Being able to have a cubemap in the sky box and not have it blur other cubemaps used in materials

Actually whoops just realized this has already been implemented externally :sweat_smile:

Iā€™m not sure if I should write here, but Iā€™m having some difficulty with the code editor.
I created some custom namespace/object structure to organize my session data and logic.
Sometimes the editor stops suggesting me namespace and object names.

I defined something like this inside a script:

window.MyGame = {};
MyGame.Namespace1 = {};

Then in another file, I have an object like:

MyGame.Namespace1.MyClass = (function(){
...
return {
  method1: privateMethod1,
  ...
};
})();

Inside other PlayCanvasā€™s scripts or classes, I type MyGame. but nothing appears.
Sometimes instead it works.

Also, Iā€™m not sure what is the ā€œParseā€ button in the editor when I select a script.
Most of the time it gives me an error that MyGame is not defined.
But when I play the game everything is working as expected.

Parsing a script should only be done for a regular PlayCanvas script (the one that calls pc.createScript at the top). What parse does is it reads the scripts and tries to extract the properties of the PlayCanvas script in order to show them in the Editor, like Script Attributes, the script name (which is the string passed to pc.createScript) etc.

If your file does not try to create a PlayCanvas script and is just executing regular JavaScript then you donā€™t need to parse it.

1 Like

Regarding the autocomplete we are using Tern (https://github.com/ternjs/tern) and we provide our own PlayCanvas bindings to it in order to help it understand the PlayCanvas API. Tern also work with your regular JavaScript code or at least it tries to work . It might be worth checking out Tern to see whatā€™s wrong in some cases and autocomplete doesnā€™t work.

Thanks, Iā€™ll give a look.
Anyway, I realized that somehow the declaration of the main namespace was missing window.

Very weird. Could be because I had the code editor opened in two independent browsers and some older code got saved over the new one?

Anyway, after fixing it, the parsing started to work, but it doesnā€™t list all the classes I created.
Then after a while, it listed a few more, while some other are still missing, even if they have the same syntax. How you feed Tern? I mean, it parses all the script files when the project is loaded?
Now, after a refresh it just doesnā€™t list anything againā€¦

On a related note, is there a way to annotate properties so that the code editor provides auto completion for script attributes?

We can possibly do that in the background itā€™s something to look into.

1 Like

When you open a script in the Code Editor it is passed into Tern.

Cubemaps, could we get sliders for the positioning of the cubemap, typing in numbers is a total PITA.
Rotation would be great too, sometimes the cubemaps are 180 or 90 degrees depending on models being in different orientations to the cubemaps

Reflection probes like Unity / Unreal (Even baked ones) would make this workflow so much better.

1 Like

on my first project there were 2 editors the scene editor and the script one where you can drag pieces of script to the entity and connect with paths, but now i cant do that on my projects, its like only the scene editor, and I donā€™t know how to code without the drag and drop piecesā€¦

also I canā€™t figure out how to create a custom model, I thought we could sculpt our own 3D models on here

its nice to see people from everywhere on here instead of just USA citizens. ^^ Though I myself am from the USA my friend lives in Germany.

The code editor can be accessed by double clicking on a script asset or the Code Editor bottom on the far left of the scene editor

You canā€™t create custom models in PlayCanvas. You can only import models. Look at https://clara.io/ for 3D modelling in a browser.