• Content Count

  • Joined

  • Last visited

About focomoso

  • Rank
    Advanced Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Los Angeles, CA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Did this make it into the stable version? I'm trying to use getRawFontSize() in v3.2.0-alpha10, but it's throwing an error. Or is there another way to get the actual width of GUI text?
  2. Thanks guys. This is one of the reasons why Babylon is such a great solution. The community is so active. Proactive, even...
  3. Hi, I'm trying to evaluate Babylon for use as a 2d charting engine. So far so good, but one of the things we'll need to be able to do is add and remove text labels on the fly. I have a tiny demo here: Notice how the label flashes at the bottom right corner for a brief moment every time the label is added to the advanced texture and before it's linked to the mesh. First, is there a way around this? I've tried linking to the mesh before adding, but then the label doesn't actually link. Second, is there a better way to do this? I've tried setting the label.text = "" and it works, but the performance is not as good when we remove the labels entirely. Thanks for any help, James
  4. Also, the original csg.js file from OpenJSCad has moved here:
  5. I'm revisiting this as I have some time now. I'm just collecting a bunch of resources here so I (and hopefully others) can keep them handy: Overview of algorythms: c++ CSG (as a .wasm, perhaps): GPU based csg:
  6. Strange... I went to do a pr to make this change myself and the version babylonjs@3.1.0-alpha3.6 already has this in, but when I get the package with npm, it's not there...
  7. I did some more digging and it seems that the framework I'm using (React) cleans up the canvas while the dispose method is being called. All we need to fix this is to add an if (this._renderingCanvas) {} around the _renderCanvas.removeEventListener calls.
  8. I updated to 3.1.0-alpha3.6 and am now getting the error: "Uncaught TypeError: Cannot read property 'removeEventListener' of null" when I call engine.dispose(). The line in question is: this._renderingCanvas.removeEventListener("focus", this._onCanvasFocus); The canvas has been disposed of elsewhere and Edit: the canvas is still defined when the dispone() is called. I need to dispose of the context because this app opens and closes the gl canvas repeatedly and will evntually give a "Too many active WebGL contexts." warning. Is there a way to dispose of the context without calling .dispose()? Or is there a way to have the .dispose() method only try to remove listeners if the canvas is still defined? Thanks
  9. Also found this: That suggests sending {preserveDrawingBuffer: true} as an option, but this isn't working either...
  10. I just want to chime in here and point out that I'm seeing the same issue. For some reason canvas.toDataURL() is returning a blank png image. @IIerpos Can you think of anything that may be causing this?
  11. I've done some digging and it seems that canvas.toDataURL() is the culprit. It's returning a blank png image. This isn't babylon.js's fault per se, but can anyone think why that might be happening? I get the same issue on chrome and firefox. Thanks
  12. Unfortunately seeing the same issue with 3.1.0-alpha3.6
  13. Completely off the top of my head, but you may want to look at rendering html into a canvas and then grabbing that image and applying it as a texture:
  14. It seems to work fine in the PG. Not sure what my app could be doing that's any different. Could the fact that I'm using 3.0.0 be an issue?
  15. Tools.CreateScreenshot is returning an entirely transparent image: CreateScreenshotUsingRenderTarget: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAARElEQVQoU2P8////fwYiAOMAKwwPD2cAORWEG/fuZah3dkZx9erVqxkYQ0JC/gsJCTG8e/cOw0uMjIxwsYH2DBHhzQAAK0005fzJ758AAAAASUVORK5CYII= CreateScreenshot: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAF0lEQVQoU2NkIBIwEqmOYVQh3pAiOngACmkAC5eMKzgAAAAASUVORK5CYII= Edit: I found this thread: but there seems not to be a resolution. Thanks