Numa

Members
  • Content Count

    138
  • Joined

  • Last visited

  • Days Won

    1

Numa last won the day on March 1 2017

Numa had the most liked content!

1 Follower

About Numa

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. oh right, that makes sense! that's it, beautiful thank you
  2. reflectivity yes: var baseMaterial = new BABYLON.PBRMaterial("baseMaterial", scene); baseMaterial.reflectionTexture = hdrTexture; baseMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.CUBIC_MODE; baseMaterial.directIntensity = 1.8; baseMaterial.specularIntensity = 1; baseMaterial.environmentIntensity = 0.2; baseMaterial.cameraExposure = 1.4; baseMaterial.cameraContrast = 0.95; baseMaterial.microSurface = 0.27; baseMaterial.reflectivityColor = new BABYLON.Color3(0.2, 0.2, 0.2); baseMaterial.emissiveColor = new BABYLON.Color3(0.1, 0.1, 0.1); baseMaterial.useRadianceOverAlpha = false; I'll use visibility instead of alpha then
  3. Thanks, I'll try to reproduce it in a playground. It might have to do with animations (I don't set alpha to 0, I animate it). For now my workaround is to call material.disableLighting = true.
  4. Hi there, I'm fading out meshes by setting material.alpha = 0; However they still appear in the scene. I checked and their alpha is definitely set to 0. Bug? Feature? Thanks
  5. Thanks everyone, it's fixed now clientX/clientY did the trick. All I needed to detect was that the mouse was out so I could fire a mouse up event, no need for any babylon/mesh info. @Wingnut Interesting test scene here's the working code: var OnPointerMove = function (e) { if (!pointerIsDown) return; if (e.clientX > engine.getRenderWidth() || e.clientY > engine.getRenderHeight() || e.clientX < 0 || e.clientY < 0) { // Create pointerUp event var pointerUpEvent = document.createEvent("MouseEvents"); pointerUpEvent.initMouseEvent("pointerup"); canvas.dispatchEvent(pointerUpEvent); } } Also when I said "messages" I meant actual messages, that you can use to communicate between an iframe and its parent (but as I said I couldn't use that, as my iframes might end up on random domains and I can't authorize them manually one by one^^). Here's how they work: document.getElementById('myIframe').contentWindow.postMessage('myMessage', '*'); you then authorize on your iframe's page by checking the origin: window.addEventListener('message', function(event) { // Check origin of the data if (~event.origin.indexOf('https://www.myFriendlyDomain.com'){ // The data sent with postMessage is stored in event.data if (event.data === 'myMessage'){ doSomething() } } else { // The data hasn't been sent from a trusted source, don't use it. return; } });
  6. Hi there, it looks like the "pointerout" event is not fired while the mouse is clicked, is that expected? How would I go about detecting when the mouse is dragged (and released) outside the canvas? My canvas is in an iframe which is in an outside domain, so I can't send messages back and forth. Any ideas?
  7. Numa

    JigSpace

    Thanks everyone
  8. Numa

    JigSpace

    sent I'll have a look at blending animations^^
  9. Numa

    JigSpace

    Thanks, glad you like it That would be awesome yes! If you want me to send you a well-worded short description let me know. It's a lot better now The engine has improved a lot, and we're getting better at it too. Part of our problems came from us having to learn a completely new library and its conventions/documentation. The 2D labels were a massive challenge until @Nockawa released canvas2D. One area that we think could be improved and would make a big difference for us is the animation/tweening. In unity we use http://dotween.demigiant.com/, having a similar tweening class in babylon would be amazing. Three.js has https://github.com/tweenjs/tween.js Besides that it's been great!
  10. Numa

    JigSpace

    Hi there, I thought I'd share what we've been working on. JigSpace is a platform for creating and sharing 3D, step by step instruction for anything. Kind of a 3D powerpoint! To create these instructions we have a very simple web editor based on Unity, and for viewing them we use Babylon. It works on computers and phones but also in VR and AR (we have dedicated apps for android/ios/oculus/hololens) Here's a link to our library: https://jig.space/explore.html We decided to use Babylon for speed and portability and it has been fantastic. It's a young engine so of course we ran into hurdles along the way but always received great help from the community. Let me know what you think!
  11. This looks great @NasimiAsl, let me know when I can start using this
  12. thanks, I had a look and from what I can tell it only affect this function, which to be honest looks like minified code var isInArrayUV = (arr: Array<{ normals: Array<number>; idx: Array<number>; uv: Array<number> }>, obj: Array<number>) => { if (!arr[obj[0]]) arr[obj[0]] = { normals: [], idx: [], uv: [] }; var idx = arr[obj[0]].normals.indexOf(obj[1]); if (idx != 1 && (obj[2] == arr[obj[0]].uv[idx])) { return arr[obj[0]].idx[idx]; } return -1; }; Do we know who wrote the obj loader? I'd love to understand what this does
  13. Yes it looks like the change only takes effect if you reapply the vertex data (I can see it on another model where it affects the lighting) I'm wondering how this even runs in the playground, there is a typo line 31, "inices" instead of "indices". If you fix the typo, it doesn't smooth I got excited for a moment