Search the Community

Showing results for tags 'cube'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 9 results

  1. I have a cube with a simple texture...how can the textures in the faces have the same rotation? For example, the front face is rendered ok(lines are vertical), but the sides are rotated(lines are horizontal), I want them all with the lines vertical, like the original texture. http://www.babylonjs-playground.com/#LS6QNX Thanks!
  2. MacOS Sierra and Skybox / Cube texture bug

    Hey, I just upgraded to OSX Sierra and this bit of code does not work anymore on chrome : /* --- Skybox --- */ var skyboxObject = BABYLON.Mesh.CreateBox("skyBox", 10000.0, scene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox" + sceneKey, scene); skyboxMaterial.backFaceCulling = false; skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture(taskObject.ASSETS_FOLDER + "/textures/fantasy/Sky", scene, ["_px.png", "_py.png", "_pz.png", "_nx.png", "_ny.png", "_nz.png"]); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE; skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skyboxObject.material = skyboxMaterial; skyboxObject.rotation.x = Math.PI; I get this : Only one side of the cube. No error in the console. I will try to get more information on this, I have been swamped these past few days... sorry. This bug is not present in safari.
  3. I'm loading textures via AssetsManager and saving references to them before the scene is rendered. When creating a CubeTexture I'd like to pass it references to the already loaded textures (via the constructor or any other way), instead of urls of the textures, If I pass to CubeTexture urls of the textures then they are being loaded all over again before being displayed, which I'd like to avoid. For instance instead of this constructor: constructor(rootUrl: string, scene: Scene, extensions?: string[], noMipmap?: boolean, files?: string[]); It'd be nice to have something like this: constructor(textures: BABYLON.Texture[], scene: Scene, noMipmap?: boolean); Does such a thing exist in one way or another or is it a feature request? Are the textures supposed to be loaded all over again when their urls are passed to CubeTexture after the textures have already been loaded via AssetManager from the same urls? Is it a bug? Am I doing something wrong?
  4. Question is about my half complete game. Here is my game: http://www.babylonjs-playground.com/#KBHU0#12 Use Arrow Keys to turn the cube. Game objective is to align the cube to catch the same color slab. Question: When the slab hit the cube (function checkHit()), how do I decide if the color of slab and the that side of the cube is the same? I am new to game development. Any suggestions on my code is very welcome. Another question: Press Up (watch direction of turn), then press Left, now again Up - notice that direction is reversed. How to correct this (to keep the same direction)? -Kaushik
  5. Hello, I have started using Babylon.js yesterday and i was playing around a bit, i wanted to make a cube with different textures for each face (well, to be precise it will have a different texture for top and bottom, then the same texture for all the sides) but when i do that with some code i found on this forum ( http://www.html5gamedevs.com/topic/12392-having-different-textures-for-each-face-on-a-cube/ ), the textures are rotated into different directions for each couple of faces (top-bottom, front-back, left-right). You can see that here: http://www.babylonjs-playground.com/index.html#1QKKTU#2 the texture is supposed to have the yellow lines at the sides, the black thingie on the left and the blue dot in the bottom-right corner http://www.babylonjs-playground.com/textures/misc.jpg (used the one from materials playground sample). I have also noticed that when using the the "invertY" parameter on front and back this happens: - No parameters set Front flipped horizonatlly and vertically, back normal - Front: false Back: false Front flipped horizontally, back flipped vertically - Front: true Back: false Front flipped horizonatlly and vertically, back normal - Front: false Back: true Front flipped horizonatlly, back flipped vertically - Front: true Back: true Front flipped horizonatlly and vertically, back normal Now, did I do something wrong/didn't understand how it works (I admit i just copy/pasted the code for multimaterial texture) or is this the expected behavior?
  6. CEWBS - Fast Voxels in Motion Github/Download: https://github.com/TriBlade9/CEWBSDemo: http://triblade9.wc.lt/CEWBS [Middle-click: grab/release mouse (Click in the center), F: fly/walk, Left-click: break voxel, Right-click: place voxel]CEWBS is a MIT-Licensed library for BabylonJS which provides a VoxelMesh object for creating optimized (greedy) voxel meshes. It currently provides methods to create, update, poll, color, and pick voxels. (See README.md) The goal is to separate voxel meshes from the world 'grid' by allowing them to be rotated, scaled, moved, affected by collisions, physics, and generally treated as normal meshes. while still letting them be manipulated and accessed easily. (In the demo, the voxel mesh you are standing on is rotating, along with it's children.) The speed of the mesher is such that you can create a fast animation (Changing the blocks every frame) in a 16x16x16 mesh with almost no impact on FPS. (Demonstrated in the demo) Textures, Ambient Occlusion, and per-voxel lighting are currently not supported due to the difficulty of implementing them alongside the meshers. Feel free to help out with those. Projects Using CEWBS: None, yet. Enjoy! Sorry for the rushed post, I'll flesh it out more later.
  7. Cube Fall

    Cube Fall A remastered version of Cube Fall with new gameplay mechanics, updated graphics, new features, and smoother gameplay. Tap and drag cubes into rows to increase your multiplier, start a combo, and score tons of points! Clear the board and place cubes in power bars to score massive points! For the best experience play Cube Fall on your mobile device! Play Cube Fall Please post any feedback bellow! It's highly appreciated.
  8. Cube Fall

    Cube Fall is a game about placing cubes, making rows, and scoring hundreds of thousands of points! Red cubes constantly fall from the sky. You have to tap and drag them to form rows. When a row is made it explodes, gives bonus points, increases your multiplier, and starts a combo. Get multiple rows in row to increase your combo even further! If a red cube hits the ground, in will lock a row, end your combo, and reset your multiplier. As cubes are placed, red cubes fall faster and spawn more often. Along with this, there also is a timer counting down! To earn more time you must combo rows, otherwise you will run out of time. Every minute a glowing row will appear. Place blocks in the row to get bonus points! Live as long as possible and score hundreds of thousands of points, maybe even millions! Want a bit more of a challenge? Then increase the speed! Play Cube Fall! Check Out My Blog!
  9. Heres the second tutorial for using Metrix.js along with Three.js, this tutorial explains the basics of how the Metrix.js entity system works and how to create objects/entities. In the tutorial you will learn how to create a Metrix.Object and a update callback to go with it to rotate the cube from our last tutorial. You can checkout the tutorial here http://www.psych.gs/wordpressblog/metrix-js-tutorial-1-entitiesobjects-and-rotating-the-cube/ And heres what you should have once you finish the tutorial