Hi guys
I want to change my texture to an image which user uploaded, is there anyone could kindly show me a good way to implement it?
Thanks a lot.
Charles
Is this question too easy? nobody answer me?
Anyway, I found a similar topic here.
I’m trying to load textures from the web at runtime to replace the current texture on a model’s material diffuse node. So far I’ve tried…
Texture.prototype.initialize = function() {
app = pc.Application.getApplication();
var url = "../test.jpg";
app.assets.loadFromUrl(url, "texture", function (err, asset) {
var texture = asset._resources[0];
var entity = app.root.findByName("Modal");
entity.model.model.meshInstances[1].material.diffuseMap = texture;
…
Let’s say solved…