PlayCanvas Editor Feedback


#249

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:


#251

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.


#252

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.


#253

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.


#254

We’re working on it. :wink:


#255

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:?


#256

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


#257

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


#258

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.


#259

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.


#260

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.


#261

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…


#262

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


#263

We can possibly do that in the background it’s something to look into.


#264

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


#265

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.


#266

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…


#267

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


#268

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.


#269

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.