@John did you notice my comment about the fps being dependent only on the number of 3D models declared and independent of the number actually displayed on screen? Any thoughts about that?
Thanks to everyone who logged crashes with TestFlight, it’s really helping me track this down.
@Simeon - trying to set up a new simple 3D example and I placed an obj and mtl file in a folder within the Codea root together with graphic images. The model is a cube and the images the faces. The model folder was named Cube.
I can see it with the fileapp but can not see it from the assets command in Codea. I renamed the folder Cube.assets and it is still not visible and the selector command for assets doesn’t pick up the obj file present. Also the files in the document dialogue within Codea have all but disappeared - when 200 was introduced there were a whole lot more assets visible in ordered list - virtually all gone. Is this file problem associated with the asset filing in 200.
@Bri_G hmm if you made the folder in Codea’s documents folder (i.e., where your projects are located) then it should be accessible as assets.documents.FolderName
I’ve just put out 201 to try to address the crashing, perhaps it will work with that.
@Simeon I loaded version 201, but I never had any crashes (other than my own mistakes) with the previous versions. Will look for other problems.
@Simeon - loaded 201 up and ran OK, so far no issues. As @dave1707 mentioned will take me some time to get used to asset prompts. Found one of my own issues causing problem in a dependency function assets() !!!
Hope my ramblings didn’t cause too much of a distraction.
@Simeon Trying to convert some of my projects to use the new assets.
The old way gave me a table of names from Dropbox
lst=assetList("Dropbox")
The new way creates a keyed table, (name,path)
lst=assets.documents.Dropbox.all
Is there a way that I can only get the name, with and without the .ext name, something like
lst=assets.documents.Dropbox.all.”name” name only
lst=assets.documents.Dropbox.all.”name.ext” name with extension
If not, then I’ll just have to add a little more code to pull the name from lst.
Something else I’m running into is my projects are listed in alpha order. So now when I create a table of my projects with the new assets, instead of the list in alpha order, it’s random because of the keyed table.
Using temp=assets.documents.all how do I get just my projects and not what’s in Craft or Examples.
OK, I’m not getting what’s in Craft or Examples, but I’m getting the folder names Craft and Examples and others along with .png files. I guess what I need to do is just pull out any name with a .codea extension and then drop the extension.
@Simeon @dave1707 - starting to get used to this new addressing regime, photo of failing project attached. A little confused in some respects - namely I built a cube .obj which has 6 images allocated by a .mtl - separate images. I can get cube to display but don’t know how to texture the separate faces unless I build one texture and rebuild texture map. Oh, also the graphics have been excluded as they need to be on a 4:3 ratio.
@Simeon @dave1707 - figured out the 4:3 ratio as it’s for a single texture which, thanks to @dave1707’s cube project, I’ve been able to adapt and address see pic.
@Simeon @John By setting offscreen objects inactive i was able to increase from 12 fps to 20 fps. In the process i notice there is not a vec3:angleBetween(), so was obliged to use the vec3:dot().
Just a heads up that there will be a breaking change in the next beta
- “assets” is renamed “asset”, might be a good test of find and replace to fix this in your projects (search “assets.” → replace “asset.”)
@Simeon Too bad the search and replace didn’t work across all projects. I have about 300+ lines to change assets to asset. Also, as I’m making changes, I’m running across several types of asset where they’re not being highlighted correctly. Some are highlighted with light blue, some with light grey, and some not at all. When I get done changing assets to asset, I’ll show an example of the different highlights.
These lines give different colored highlighting.
tab=asset.documents.all
bkupFile=readText(asset.documents.Dropbox..name)
sprite(asset.builtin.Planet_Cute.Character_Princess_Girl)
@dave1707 sorry to make work for you, I just won’t have a chance to change it once Codea 3.1 is released
The highlighting there is intentional, regarding the text colours: any property or function on the asset (key, path, name, ext, type, updated) should be highlighted in the grey colour while the asset path itself is highlighted in aqua
The light grey vs blue bubbles around the function parameters for readText
and sprite
are how they were in previous versions of Codea. I’m thinking to change that, but at the moment they are still as they were
@Simeon - I have encountered a slight problem, don’t know if it’s been mentioned before, with the new asset system on 201. If you get a list of assets listed just above the keyboard it’s possible for thelist to exceed the width of the iPad screen and it doesn’t seem to scroll.
@Bri_G We seem to be thinking the same. About a screen or two from the bottom of page 1 of this discussion, I mentioned that I would like the autocomplete to scroll.
@Simeon I don’t know how much control you have with this forum format, but the page numbers at the bottom that lets you go to different pages of a discussion doesn’t work. I have to use the page numbers at the top of the discussion. The other problem with the numbers is page 1 doesn’t have the numbers at the top. So if I go to page 1 of this discussion, I can’t get back to page 2 unless I close the discussion and come back in.
@Bri_G scrolling the list is something I want to add, though first I’ll be sorting assets by type (i.e., if you are in the sprite
function you should get image types etc.)
@dave1707 I’ll look into the forum page numbers issue, drives me crazy too
@Simeon - thanks for that, a quick question. Is the post tags system set up by you ir an external database. I ask because I pit craft in repeatedly and, even though I selected craft from a drop down list it put the top of the top item of the search options list in - Minecraft. Not really what I wanted - settled for Codea craft in the end.
@Bri_G oh weird, no I didn’t configure it. Wonder if it looks it up externally or something
@Simeon - could be browser related, I’ve been using Opera recently.
@Simeon I ran across this line that doesn’t cause an asset warning. Don’t know if it should or not but it doesn’t follow the asset structure.
m.texture="SpaceCute:Collision Circle"
Also, something else I ran into while going thru my projects one by one. When I tapped on the next project to open it, another project nowheres near it opened. At first I thought it was my fault, but it happened several more times and the project that opened was several rows and columns away from where I tapped.