boyofgreen

Members
  • Content Count

    16
  • Joined

  • Last visited

About boyofgreen

  • Rank
    Member

Recent Profile Visitors

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

  1. That seems to have fixed it! I'll do some heavy testing tonight, but I'm sure it is fine. You are awesome as always! Next time I see you I'll go into more depth as to what I am doing, of course I would love for Babylon to do more of my work for me
  2. I'll try it out. so remember the app I previewed to you about a year ago, well I am still working on it and getting close. The scenario is that when you are recording a story, you can also record an audio track for each page of your story. The architectureI have in place right now isn't really great. Basically I do this: 1. record voice track with get user media 2. pull the wave immediately out and set it to a "preview" audio element and pass the wav into a Babylonjs audio object 3. concert the wav to an mp3 in a separate thread 4. save the mp3 into an indexedDB (for later use) and then update the Babylonjs audio object with the mp3 file. It's a bit of a mess right now, I convert it to mp3 so that it doesn't take up as much space, but it takes quite a while to convert it (several minutes sometimes). I'm going to let you know how the sample works.
  3. Hello Friends, I recently upgraded to the RC version of BJS 3 and am now seeing an error that isn't present in v2. I am creating an audio file and setting the src to a blob URL that I have just created with getUserMedia (it's a wave): var newUrl = (window.URL || window.webkitURL).createObjectURL(blob); var audioEl = new Audio(); audioEl.controls = true; audioEl.src = newUrl; document.getElementById('curTrackContainer').appendChild(audioEl); audioObj[i].sound.dispose(); audioObj[i].sound = new BABYLON.Sound(newName+i, newUrl, scene, null, { loop: false, autoplay: false }); The audio file plays okay from the audio element, but when I try to have babylon play it, I get this error: BJS - [21:52:42]: Error while trying to play audio: Sampled15010375539220, TypeMismatchError babylon.customRC.js (6025,13) This method works fine in version 2.5 but breaks in 3.0. Any help would be appreciated, if we know what has changed in that space. Thanks, Jeff
  4. oh, I am the wrong person then. I love flexbox, start around 6 min. to see my flexbox masterpiece:
  5. Hi All, I have a mesh that is a background, and you can move the other meshes on top of it (and a record the movement). It's very similar to this example: http://playground.babylonjs.com/#U0YL2#0 what I would like to do is keep the smaller mesh contained within the larger one. Ideally, I would like to allow users to move the smaller mesh outside the larger one, but not completely off of it (there would still be like a 25px edge of the mesh so you could still touch it and move it). I am sure I can just compare the xy of the smaller mesh and compare it to the area of the larger mesh, but I'm wondering if there is something that is already being computed that I can use. Thanks, Jeff
  6. I recently ran into this same problem and did some testing on dispose() to see if it was leaving any assets behind on meshes. I never found anything artifacts left after dispose. what ended up being my problem were a few times I was updating an mesh with a new asset. this left the old one orphaned in memory and was never GCed. I went back and disposed() before changing the asset and it took care of my leak. Best of luck!
  7. it wll be a while before the new grid spec is in edge. I would also recommend flex box, which you can set for vertical (column) or horizontal (row) layouts. however if grid is the way you want to go, there is an old implementation in edge / ie https://msdn.microsoft.com/en-us/library/windows/apps/hh466340.aspx
  8. you and me both jermoe! thanks for the answers I'll implement tonight and see that does the trick. thanks, jeff
  9. its about memory. I can clear the canvas no problem, but I need to get the assets all out of memory thanks, jeff
  10. I am clearing my scene entirely, where I use completely new sounds and new plans/textures. What is the proper way to do this? I'm first going through each of my planes and removing the plane and animations for each of them: item.plane.dispose(); item.animateR.reset(); item.animateX.reset(); item.animateY.reset(); and do the same for the sounds. Then I go to the scene and do the following: scene.dispose(); scene.disposeSounds(); The problem is I still see a lot of memory being used up, even after I do this and have an empty canvas on the screen. Am I missing a step or going about this wrong? Thanks, Jeff
  11. today, I do not believe that "play" takes a second parameter, but I'll take a look to make sure. I also have an idea for the change, I'll do a PR and you can look at it.
  12. Right now I am using the following to make this work (item is the key where the file started in the past, keyIndex is my index tracking, kps is 60) if(item < keyIndex){ var audioEndKeyFrame = item+(Math.round(curSound.sound._audioBuffer.duration)*kps); if(audioEndKeyFrame > keyIndex){ var keyFramePlayPoint = (keyIndex-item)/kps; curSound.sound.isPaused = true; curSound.sound._startOffset = keyFramePlayPoint; curSound.sound.play(0); }
  13. also, I don't see a way to play a sound file from a particular point in the audio file. I thought "time" would do that, but it just sets a delay. I want to play the sound 5 seconds into the sound file (think audio sprites). Is there an API for that?
  14. Hi. I remember meeting a French guy who was very close with his brother (he talked about him a lot) and worked on the audio for Babylon.js. I have a question for him. I am looking at my audio files and trying to determine if they should be playing at any particular keyframe based on them being set to Play at an earlier key frame. Right now I'm looking at the soundFile._audioBuffer.duration and then doing some math to determine if it should be playing part way through at the current key frame. Two questions: 1. is there an easier way to do this? 2. is the "duration" accurate or is there a better way to get duration of a sound file? Thanks, Jeff
  15. Unless there is a better suggestion, I think I found the answer: http://doc.babylonjs.com/tutorials/Animations#attach-events-to-animations looks like I can add events to the animation that will fire the audio. I' open to better ideas if there are any.