What is Wire Engine?

Wire engine is a game engine (wip) built around the ThreeJS rendering engine, it has it's own physics engine and system for handling game objects and unique functions for each.

How to use Wire Engine

You can host games created in the Wire engine on CablePost.co.uk. Here's an example:

<html> <head> <script src="https://engine.cablepost.co.uk/wire/0.01/core.php"></script> <script src="https://engine.cablepost.co.uk/wire/0.01/classes/spinningCube.js"></script> <script> var game; window.onload = function(){ game = new Game( { "1": new Level( { "default": new Camera(), }, { "skybox": new Skybox(), "cube": new GameObject("cube", new THREE.Vector3(0, 0, -10)), } ) } ); } </script> </head> <body> </body> </html>

And here is the result:

How about some physics

<html> <head> <script src="https://engine.cablepost.co.uk/wire/0.01/core.php"></script> <script src="https://engine.cablepost.co.uk/wire/0.01/classes/spinningCube.js"></script> <script> var game; window.onload = function(){ var game2 = new Game( { "1": new Level( { "default": new Camera(document.getElementById("fallingCubeExample"), new THREE.Vector3(0, 1, 0)) }, { "skybox": new Skybox(), "cube": new PhysicsObject("cube", new THREE.Vector3(0, 5, -15)), "ground": new GameObject("simpleGrass", new THREE.Vector3(0, 0, -15), new THREE.Vector3(0, 0, 0.3)), }, { }, { }, { "sun": new THREE.AmbientLight(0xFFFFFF) }, function(){ //This bit of code is run when the level is run, you can add in custom functionality here console.log("Hi there"); //code to check if the cube has fallen off the map this.checkCubeFall = function(){ if(this.gameObjects["cube"].position.y < -10){ this.gameObjects["cube"].position.set(0, 5, -15); this.gameObjects["cube"].rotation.set(0, 0, 0); } } this.updateCommands.push("checkCubeFall"); }, ) } ); } </script> </head> <body> </body> </html>

And here is the result:

A full list of available classes can be found here.
Click here for more on the basics of using Wire engine.