Open scarletsky opened 6 years ago
Good idea!
i would also like that. but something i can run
var func = ({type}) => type === 'model' ;
app.assets._assets.filter(func).map(asset => ( saveToDisk(asset.toOBJ()));
Here i would like to be able to save obj files of 'models' to disk
I'm sure @Maksims wrote an Editor plugin that did that a few years back. I don't know what happened to the code though...
It is good for all assets to have
toJSON
method, so that we can save and init the asset by data easily.Here is my
StandardMaterial.prototype.toJSON
implementation:And the constants:
We can call it by:
We can add the same interface to other type of assets. 😃