GameLib D3 Files
parent
1f3027d1fb
commit
bc8e04638b
|
@ -0,0 +1,24 @@
|
|||
function Game() {}
|
||||
|
||||
/**
|
||||
* Games are collections of scenes and physics worlds
|
||||
* @param id
|
||||
* @param name
|
||||
* @param path
|
||||
* @param scenes THREE.Scene[]
|
||||
* @param worlds GameLib.D3.Physics.World[]
|
||||
* @constructor
|
||||
*/
|
||||
Game = function(
|
||||
id,
|
||||
name,
|
||||
path,
|
||||
scenes,
|
||||
worlds
|
||||
) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.path = path;
|
||||
this.scenes = scenes;
|
||||
this.worlds = worlds;
|
||||
};
|
|
@ -0,0 +1,77 @@
|
|||
function Physics(
|
||||
GameLib.D3
|
||||
) {
|
||||
this.GameLib.D3 = GameLib.D3;
|
||||
}
|
||||
|
||||
Physics.GameLib.D3.Physics = function(
|
||||
id,
|
||||
name,
|
||||
world,
|
||||
rigidBodies,
|
||||
physicsEngineType,
|
||||
physics
|
||||
) {
|
||||
this.physics = physics;
|
||||
};
|
||||
|
||||
Physics.GameLib.D3.Physics.TYPE_CANNON = 0x1;
|
||||
Physics.GameLib.D3.Physics.TYPE_AMMO = 0x2;
|
||||
Physics.GameLib.D3.Physics.TYPE_GOBLIN = 0x3;
|
||||
|
||||
Physics.GameLib.D3.Physics.World = function(
|
||||
id,
|
||||
name,
|
||||
gravity
|
||||
) {
|
||||
this.id = id;
|
||||
|
||||
this.name = name;
|
||||
|
||||
if (typeof gravity == 'undefined'){
|
||||
gravity = 9.8;
|
||||
}
|
||||
this.gravity = gravity;
|
||||
|
||||
};
|
||||
|
||||
Physics.GameLib.D3.Physics.RigidVehicle = function() {
|
||||
|
||||
};
|
||||
|
||||
Physics.GameLib.D3.Physics.RigidBody = function(
|
||||
id,
|
||||
name,
|
||||
position,
|
||||
rotation,
|
||||
scale,
|
||||
shapes
|
||||
) {
|
||||
this.position = new this.Vector3(0,0,0);
|
||||
};
|
||||
|
||||
Physics.GameLib.D3.Physics.Shape = function() {};
|
||||
|
||||
Physics.GameLib.D3.Physics.Shape.ConvexHull = function(
|
||||
id,
|
||||
name
|
||||
) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
};
|
||||
|
||||
Physics.GameLib.D3.Physics.Shape.TriangleMesh = function(
|
||||
id,
|
||||
name
|
||||
) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @var shape Physics.GameLib.D3.Physics.Shape.TriangleMesh
|
||||
*/
|
||||
Physics.GameLib.D3.Physics.Shape.TriangleMesh.prototype.generateViewMesh = function(normalLength, scale) {
|
||||
|
||||
};
|
Loading…
Reference in New Issue