I download a FBX model from the editor. After downloading, it contains the corresponding JSON files and images. I use this method to load the model. My code is as follows:
var url = "../FYPlaycanvas/paint_whit/paint_whit.json";
app.assets.loadFromUrl(url, "model", function (err, asset) {
self.car = new pc.Entity();
self.car.addComponent("model", {
type: "asset",
asset: -10,
castShadows: true,
isStatic: false,
castShadowsLightmap: true,
receiveShadows: true,
lightmapped: false
});
app.root.addChild(self.car);
self.car.setEulerAngles(0, 180, 0);
});
but the effect is different from that of using the editor. I am very confused. could you can help me,please.
the model settings in editor is here:
Contrast pictures is here,The texture of the upper body is normal and the lower one is abnormal: