Jump to content

Search the Community

Showing results for tags 'tween.js'.

  • 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'm trying to develop a globe in three.js. Pretty much got everything I want working but I'm have trouble getting a camera to rotate from one position to another when I click a button. I know that the cordinates are correct because if I use some simple code the camera jumps to the new position when I do this camera.position.set(posX,posY,posZ); camera.lookAt(new THREE.Vector3(0,0,0)); So give that my destination is correct I struggling to understand why the following function that uses tween.js doesn't work. I'd appreciate any help as I'm really struggling with this var from = { x : camera.position.x, y : camera.position.y, z : camera.position.z }; var to = { x : posX, y : posY, z : posZ }; var tween = new TWEEN.Tween(from) .to(to,600) .easing(TWEEN.Easing.Linear.None) .onUpdate(function () { camera.position.set(this.x, this.y, this.z); camera.lookAt(new THREE.Vector3(0,0,0)); }) .onComplete(function () { camera.lookAt(new THREE.Vector3(0,0,0)); }) .start(); Many thanks
×
×
  • Create New...