encima / encima/jsc3d

Viewer not updating properly

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
HTML
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing changesize in Chrome and Firefox with the supplied snippet, then inspect the mesh initialization and viewer.update flow. Compare how vertexBuffer and related buffers are handled across browsers. Done means the mesh updates and renders correctly after the button click in Chrome as well as Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.