Jump to content

Search the Community

Showing results for tags 'animnation'.

  • 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 a newbie to the 3d dev world... WOW, the learning curve is HUGE! At any rate, I thought I would give Babylon.js a shot... I watched the learning series on Microsoft Virtual Academy with the two David's... In the materials example they show an example of creating 10 spheres in a circle surrounding a single sphere... That was the start of a simple idea I wanted to implement on a home page... I would like to create a wheel of objects that a user could spin... and a random object would stop center screen showing the result of the spin... I want a vertical spinning series of objects... Not like a money wheel or vertical roulette wheel, but more like a slot machine wheel, or think "the price is right wheel", where players spin the wheel to get closest to $1... My layout is very basic, and I simply need some assistance with how to go about animating something with physics... i.e. make the wheel look random and look realistic. Most of the examples I find show creation of scenes and objects, and perhaps some basic animation, but to create a game seems like it would be a huge undertaking. Assets (meshes) not withstanding, game logic seems like... well... formidable! I would also like some assistance with game code organization... Is there documentation on a logical order to store scripts and assets? * things I've determined from trial an error... The number of points should be evenly divisible by 360 in order for an object to be centered center screen... In this example the number of objects is 24, and the radius is 3... This centers an object center screen... If I use 16, and a radius of two this will also work for my needs... Now I would like to animate the spinning of this "wheel of objects", and have some sort of physics working to make the experience realistic... var createScene = function () { var scene = new BABYLON.Scene(engine); scene.clearColor = new BABYLON.Color3(0, 0, 0); var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 0, -6), scene); camera.setTarget(BABYLON.Vector3.Zero()); camera.attachControl(canvas, false); var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 0, 0), scene); var points = 24; var radius = 3; var slice = (2 * Math.PI) / points; for (var i = 0; i < points; i++) { angle = slice * i; var obj = BABYLON.Mesh.CreateBox("box" + i, .65, scene); obj.position.y = (0 + radius * Math.cos(angle)); obj.position.x = -1; obj.position.z = (0 + radius * Math.sin(angle)); } return scene }
×
×
  • Create New...