I am trying to colorize a model added to scene with no success.
This is the code i'm using:
var model = scene.primitives.add(
new Cesium.Model({
gltf : gltf_model,
modelMatrix : matrix,
color: Cesium.Color.BLUE
})
);
Thank you
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var model;
var hpr = new Cesium.HeadingPitchRoll(0, 0, 0);
var origin = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 0);
var modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(origin, hpr);
model = scene.primitives.add(Cesium.Model.fromGltf({
url : '../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck.glb',
modelMatrix : modelMatrix,
minimumPixelSize : 128,
color: Cesium.Color.RED
}));