8000 Mouse down not working in Chrome 24.0.1312.57 · Issue #11 · evanw/lightgl.js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Mouse down not working in Chrome 24.0.1312.57 #11
Open
@kylepaulsen

Description

@kylepaulsen

This could be a bug with chrome... I'm not sure because it's really weird.
I think chrome 24.0.1312.57 is garbage collecting your canvas reference or something. In your first person camera example, try putting a setTimeout wrapper with 1 second of delay around your gl settings block like this:

setTimeout(function(){
  gl.fullscreen();
  gl.animate();
  gl.enable(gl.CULL_FACE);
  gl.enable(gl.POLYGON_OFFSET_FILL);
  gl.polygonOffset(1, 1);
  gl.clearColor(0.8, 0.8, 0.8, 1);
  gl.enable(gl.DEPTH_TEST);
}, 1000);

The mouse look no longer works. I'm not trying to use a setTimeout but I think my code is slow. I did some investigating and noticed that when I leaked the canvas element var to the window or to the GL object at around here:
https://github.com/evanw/lightgl.js/blob/master/src/main.js#L213
everything worked just fine again. That's why I think it's some sort of garbage collecting issue.

I love the library by the way. I just thought I'd let you know of this strange situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0