Dropboxing 3D objects

@pac A lot of the info I’m giving you can be found in the reference. I tell all the new people to look thru the reference, not memorize it, just to familiarize yourself with the commands. Then when you have a problem you might remember seeing something that you can use.

@pac - sometimes if I have large arrays I wish to save I put the array in a function held in a separate tab. The project holding it has the default main tab (ie not used), save it and declare it as a dependency then call the arrays function in setup() from the main project. You can build up data arrays like that, I find them useful.

Thanks. Dave.

Some the volex thing is working great for the players. But I need to be able to set up a map. It would be easiest if I could do in the volex player. But I looked through it and could not find an array or any thing to save to save the map. And I did try save the scene.volex.

So if you know where it keeps it’s data for the terrain that would be very useful.

Thanks Pac

Okay update I found how to save but not load.

Ugh!!!

@pac What command did you use to save what you wanted.

@pac take a look at the Froggy example for how to load voxel models.

model = scene:entity()
vm = model:add(craft.volume, 1,1,1)
vm:load("YourProject:ModelNameHere")

@Simeon - could you point me to a reference which describes the Voxel model format. So far I haven’t been able to find one I can digest.

@Bri_G going to /cc @John here

EnableSaving(tag)

It is there with the voxels in the reference.

No EnableStorage sorry :smiley:

I have not been able to locate the load for this function. An I looking at the wrong thing or what. Should I just be using the volume:load?

Okay thanks @Bri_G

@pac I made a comment but after I thought about it more, I decided that it wasn’t what you were after. Maybe the EnableStorage will work but you just load it with the saved name like you load any other craft object.

So @dave1707 I woke up this morning thinking about if I could turn normal head phone in to noise canceling. I learned that not completely but for how much it’s worth I am going to post it.

The only thing I ask is that no one else pick this put changes it and publishes it so please don’t do that. But fell free to use this info in your games and other programs.

Pac


-- NoiseCancel

-- Use this function to perform your initial setup
function setup()
    print("Hello World!")
    MusicVolume = 1
         music("Game Music One:Runner Blade",true,MusicVolume)
      
  mic.start()
end

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(40, 40, 50)

    -- This sets the line thickness
    strokeWidth(5)

    -- Do your drawing here
    
  MusicVolume = (mic.amplitude * 10)

 music.volume = MusicVolume + 2
 end  

Is this how you load all objects in codea?

self.volume:load(“Documents:Water002”)

Thanks.

@pac - I think that’s just for voxels.

Hey I need to add my own stuff to a class. Like you know how there is self.x = x I need to add my own self. Variable so how do you do this?

@pac Just type self.yourVariableName = whatever in the init function of the class.

I don’t know. It’s your code. The easiest answer is you did something wrong.