• Content Count

  • Joined

  • Last visited

  1. Это моя вина. Я плохо знаю английский (
  2. background-blend-mode: serve as a simple example.
  3. Sorry. But you do not understand me. With understand. With CSS you can not communicate through the canvas. So I can be spliced and have filters in the library Babylon.js
  4. Hello The CSS has interesting films background-blend-mode: screen; Is there an analogue in Babylon.js. Such that they can be attached to the chamber.
  5. How to make the shadow more accurate? untitled1.rar
  6. Спасибо больше. За исчерпывающий ответ. Я старюсь изучить babylon используя документацию. Но это затруднительно для меня так как я не в совершенстве владею знаниями английского.
  7. Hello. How do I get access, tankard? For example to move it via js.
  8. So I did not wait for an answer and wrote a script that controls your character . I would be grateful if you are familiar with it and improve it. I hope it will be useful to you . 2d game
  9. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns="" > <head> <title>Гейм</title> <script type="text/javascript" src=""></script> <script type="text/javascript" src="hand-1.3.7.js"></script> <script type="text/javascript" src="cannon.min.js"></script> </head> <body> <canvas id="canvas" style="position:absolute; width: 100%; height: 100%;"></canvas> <script type="text/javascript"> var canvas = document.getElementById("canvas"); var engine = new BABYLON.Engine(canvas, true); var player; var keyPlayer; //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! window.onkeyup = function (event) { if (event.keyCode == 32) { player.playAnimation(22, 32, false, 100); } else { player.stopAnimation(); player.cellIndex = 44; keyPlayer = ""; } } window.onkeydown = function (event) { if (event.keyCode == 65 && keyPlayer != event.keyCode) { player.playAnimation(0, 9, true, 100); } keyPlayer = event.keyCode; } //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function createScene() { var scene = new BABYLON.Scene(engine); scene.clearColor = new BABYLON.Color3(0, 1, 1); var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene); camera.setTarget(BABYLON.Vector3.Zero()); camera.attachControl(canvas, false); var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene); light.intensity = .5; var spriteManagerTrees = new BABYLON.SpriteManager("treesManagr", "08-2.png", 2, 64, scene); player = new BABYLON.Sprite("player", spriteManagerTrees); player.cellIndex = 44; return scene; }; var scene = createScene(); engine.runRenderLoop(function () { scene.render(); }); window.addEventListener("resize", function () { engine.resize(); }); </script> </body> </html> Here is the code that controls the 2d sprite.
  10. Hello. I can not understand the character configuration management. Character moves forward by means of "w" key. I along with "w" press and release "space". triggered event "keyup" and the event is "keydown" reset how to fix this problem? Make it so that the event "keydown" will not be reset?