Tiling is not taken into account when displaying the contours of a material
Thanks for reporting, @redka. Iâve created a bug report about the selection outline of tiled textures with alpha test. I believe weâve fixed the Launch button in our codebase and will deploy it soon.
Not a major issue but is it possible to save this settings? I have to remember to switch off Auto-run every time I load the project and uploading non-POT textures.
Most of the times I forget and the texture are resized automatically.
Thanks!
Could save it in localStorage, so it would persist between sessions. But that applies to all assets, models including.
Yes, that will do if you find it appropriate, thanks @max.
When adding an HTML asset, and clicking on the asset to see itâs ID number, would it be sensible to allow clicking on that ID number at the top right and copy this value to the clipboard? At the moment text selection is disabled on that item so have to alt/tab to copy it into code.
Yeah, that text should probably be selectable. But do try to avoid inserting IDs into your scripts. When you fork projects, asset IDs change and your project will no longer work. Instead, you should really use script attributes (of type âassetâ) to wrangle assets.
Excellent, thanks Will.
Just to confirm, the best approach is doing something like this?
var asset = this.app.assets.find("mycssfile.css", "css");
// create element
var style = pc.createStyle(asset.resource || '');
document.head.appendChild(style);
// when asset resource loads/changes,
// update html of element
asset.on('load', function() {
style.innerHTML = asset.resource;
});
// make sure assets loads
this.app.assets.load(asset);
These doc pages seem to show the old way of doing it so might be worth updating to the non-ID approach?
http://developer.playcanvas.com/en/user-manual/assets/html/
http://developer.playcanvas.com/en/user-manual/assets/css/
You can also use an asset reference attribute in the script:
http://developer.playcanvas.com/en/user-manual/scripting/script-attributes/
http://developer.playcanvas.com/en/api/pc.ScriptAttributes.html
So in your case, to add script attributes for HTML and CSS assets, youâd do:
MyScript.attributes.add('html', { type: 'asset', assetType: 'html', array: false });
MyScript.attributes.add('css', { type: 'asset', assetType: 'css', array: false });
Iâm on chrome.
I thought I used to be able to select the id number of an asset to copy it but I no longer can. I would like to be able to. Specifically this is a texture.
Yeah, @rakberdin, this did use to work but we changed the Editor so you canât select arbitrary HTML elements in the interface (which can be annoying when click-dragging beyond the boundary of the 3D view). We were probably a bit overzealous in disabling any selection (except edit box contents). @max can probably relax this when he gets a moment.
Can confirm the regression of ID selection, we will fix that.
make it so people can add scripts to the store
I started learning PlayCanvas about a week ago, and the editor is great. Itâs the API thats putting me off. Everything is so deeply nested that itâs very difficult to figure out where anything is. Overuse of this
makes everything even more ambiguous (as ever), and the docs donât really help; theyâre disjointed and difficult to follow (when you can find docs for the correct API version). I donât normally struggle to learn APIs like I have with this one.
The User Manual starts with a short first page that links to the second. There is no third page. Youâre just left to wonder around from there, and figure it out for yourself. There are plenty of docs, but itâs all just scattered information.
The code editor is also kind of clunky. For example, if you select any text, it highlights all matching text, which is fine, but it does it by adding a 1px border, so the text jumps around in the editor, which is disorientating. It also warns against using ES6 features that are standard in modern browsers, and doesnât let you omit redundant, ugly semi-colons i.e function square(x) { return x * x }
is a syntax error. There are no options to change any of this. I canât even select a font size.
I didnât mean to be totally critical. I like the scene editor a lot. Itâs just the whole scripting experience was unusually horrible.
There is some relationship between things, but in terms of inheritance it is very flat though.
Indeed. As it is very individual to each of user. Some of users prefer âGetting Startedâ manual, which goes one page after the other. But the nature of gamedev is non-linear and each user very likely have different story, so need to get different pieces of information.
Looking for info - is essential skill for a developers every days life.
Thatâs easy to fix.
Modern, yes, but not all browsers that are WebGL friendly. Which means that if developer uses ES6 features, it means his WebGL app wont work on all WebGL capable platforms, which are still there. So that is why we do not encourage anyone to use it.
JSLint/Hint, is there for a reason.
Feedback is always useful. It is important we extract useful information from it.
If anyone is asked to use a tool, there is always âgetting used toâ stage, which takes some time. Some people are a bit more relaxed about it, some less.
Thank you for a feedback!
My earlier feedback was overly negative. Iâm sorry for that. I was frustrated, and nothing seemed to be working properly. That said, dismissing everything I wrote seems a bit unfair.
The condescension at the end there was slightly annoying, but I was a bit harsh to begin with, so fair play mate.
Game engines are just software. You can write linear guides that explain how they work. People write books on game development.
The docs do not introduce new users enough. I didnât expect the full OâReilly, but felt the docs could be improved by at least letting people know where to start. I donât think it is âvery individual to each of userâ. There are certain things that everyone needs to know, that are not even mentioned.
How is a new user supposed to know that pc
even exists for example? Why would they search for that, when they donât know it exists. Itâs not mentioned in the Manuals menus at all. There are lots of examples like that. The API is not even introduced.
My personal view is that we can definitely improve the API docs especially for new users. We have no intention making things unclear for developers! But itâs not an easy job to completely rewrite everything given that we have to juggle a lot of balls at the same time.
That said we are looking for ways to improve our learning resources - we recently overhauled our tutorials section. And we are always here to help so donât hesitate to ask if you face any difficulties.
Good point.
It is very easy to forget after long time using a thing, of how to look with ânaked eyesâ on things. So things experienced users get for granted, is so commonly learned, that they forget that initially it wasnât obvious. And new users feedback as youâve provided is a good reminder about that.
User Manual went through a lot of edits and additions in last years, and since then hasnât been re-structured, to ensure that information is presented in very smooth way. So indeed, there could be done big re-structure there, but it is loads and loads of work. Not mentioning that it has to be translated to Chinese, Japanese and Russian.
But, docs are actually open-source GitHub - playcanvas/developer.playcanvas.com: Developer resources website for PlayCanvas
So PRâs of specific features and pages are always welcome.
The editor does not say donât use ES6. It says to use the string âesversion: 6â, but it doesnât work. Besides, what if a user doesnât want to support those browsers?
I donât understand. I want to write this:
square(x) { return x * x }
And not this:
square(x) { return x * x; }
It doesnât let me. There are literally no editor options at all.
I know some frameworks are quite opinionated, but dictating what browsers users have to support, and making everyone use the same editor config??
You said the bug in the editor was easy to fix. Are you implying that I should fix it, or that itâll be done soon? I honestly didnât understand. Iâm happy to fix it, but it is a 5 second job for anyone who works on the code. If I stick with PlayCanvas (which I hope to, as I really like the scene editor), Iâm going to use TamperMonkey to overhaul my version of the editor anyway.
Câmon dude, Nothing I said was personal. Thatâs twice youâve put me down now.
I was struggling to figure out the API, the editor was throwing up a thousand messages that didnât help, and the text was jumping all over the place (I have an array of arrays, each full of the same few names, like [foo, foo, bar, foo, spam, fooâŚ], and it jumps a whole character sometimes). Your response was dismissive, and ignores genuine issues that make PlayCanvas less nice to use. Itâs not all to do with âgetting startedâ either. I will always want the editor to work correctly and support standard options.
Anyway, no hard feelings mate. Iâm sure we just got off on the wrong foot.