I want change the vertexBuffer of a mesh on a button click,here is my code ,its
not working in chrome but working in firefox;
function changesize(size)
{
$.ajax({
type: 'POST',
url: 'newpiont.php',
data: "part_id="+size,
success: function(result){
scene.removeChild(lowernormal);
var Allpoint = JSON.parse(result);
lowernormal.vertexBuffer = JSON.parse("[" + Allpoint['vertexBuffer'] + "]");
lowernormal.indexBuffer = JSON.parse("[" + Allpoint['indexBuffer'] + "]");
lowernormal.texCoordBuffer = JSON.parse("[" + Allpoint['texCoordBuffer'] + "]");
lowernormal.texCoordIndexBuffer = JSON.parse("[" + Allpoint['texCoordIndexBuffer'] + "]");
lowernormal.setMaterial(mat);
lowernormal.init();
scene.addChild(lowernormal);
viewer.update();
}
});
Original issue reported on code.google.com by prasen.b...@gmail.com on 31 Jul 2014 at 10:51
Original issue reported on code.google.com by
prasen.b...@gmail.com
on 31 Jul 2014 at 10:51