Jump to content

Search the Community

Showing results for tags 'isStopped'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  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); };
×
×
  • Create New...