jeremyc

Members
  • Content Count

    7
  • Joined

  • Last visited

About jeremyc

  • Rank
    Newbie
  • Birthday 10/05/1976

Profile Information

  • Gender
    Male
  • Location
    St Louis
  • Interests
    Web stuff
  1. I've been trying to add a animation end callback function to David Rousset's very handy animateCameraPositionAndRotation function http://blogs.msdn.co...babylon-js.aspx but I can't seem to get a animation end callback to work. The camera animation works great but at the end of it nothing happens. I'm trying to use "isStopped" but I just can't get it to fire when the animation ends. I'm not even sure I'm barking up the right tree. And to be honest my javascript understanding of object methods and event listeners is marginal. Ive tried 1. if (animCamRotation.isStopped()) { alert('stopped'); } (inside the animateCameraPositionAndRotation function) 2. if (animCamRotation.isStopped()) { alert('stopped'); } (inside the engine.runRenderLoop) 3. And a few others that broke the script entirely Am I in the balpark at all? Here is the function var animateCameraPositionAndRotation = function (freeCamera, fromPosition, toPosition, fromRotation, toRotation) { var animCamPosition = new BABYLON.Animation("animCam", "position", 30, BABYLON.Animation.ANIMATIONTYPE_VECTOR3, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keysPosition = []; keysPosition.push({ frame: 0, value: fromPosition }); keysPosition.push({ frame: 10, value: toPosition }); animCamPosition.setKeys(keysPosition); animCamRotation = new BABYLON.Animation("animCam", "rotation", 30, BABYLON.Animation.ANIMATIONTYPE_VECTOR3, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE); var keysRotation = []; keysRotation.push({ frame: 0, value: fromRotation }); keysRotation.push({ frame: 10, value: toRotation }); animCamRotation.setKeys(keysRotation); freeCamera.animations.push(animCamPosition); freeCamera.animations.push(animCamRotation); scene.beginAnimation(freeCamera, 0, 10, false); };
  2. Thanks for the suggestions. I want to use BJS with PHP variables and drop them into javascript variables from current posts. So I think what I'm going to resort to is just restricting thier post ability to a strict format that has been pre styled with drawText lengths in mind. No big deal. They get a 3D walkthrough theme...so they can deal with the style restrictions. Thanks again for the suggestions.
  3. I'm just curious. This would be asking a LOT I know. Is there a way to project a HTML formated 2d division upon a BJS mesh face? This ability would be invaluable in a CMS (like WordPress ) That would incorporate BJS into the theme. For instance, one could project current posts against the wall of a walk around gallery. This way the client could update content as usual and it would just drop into the 3D rendered scene? I know I can use draw text but I would have to do some javascript magic to format it correctly against the mesh face.
  4. Sorry, I think someone did it for me. I'll remember next time.
  5. I'm new to BJS and so this question might be a no brainer for the ninjas but I can't find the answer combing through the forums and the online tutorials. I'd like to use the "BABYLON.SceneLoader.Load" but I don't know how to isolate the imported items individualy. When I use "BABYLON.SceneLoader.ImportMesh" I can just set "whatever = newMeshes[0];" and then reposition it, apply gravity... you know ...whatever you want with BJS calls. There has to be a command I can use to isolate the meshes,lights,and cameras that were imported in (preferabley by name). I just don't know the command set up and I can't find a example of someone using "SceneLoader.Load" and then changing individual items from that scene. Like I said, this is probably 101 to most here. Any help would be greatly appreciated. Thanks.