world also

beta.r3js.org
-=yb4f310 2017-09-01 17:06:04 +02:00
parent cea919a55d
commit 42de37c1dc
3 changed files with 63 additions and 55 deletions

View File

@ -95,57 +95,59 @@ GameLib.Component.prototype.toString = function() {
return this.id;
};
GameLib.Component.COMPONENT_PATH_FOLLOWING = 0x1;
GameLib.Component.COMPONENT_MATERIAL = 0x2;
GameLib.Component.COMPONENT_RENDERER = 0x3;
GameLib.Component.COMPONENT_LOOK_AT = 0x4;
GameLib.Component.COMPONENT_CAMERA = 0x5;
GameLib.Component.COMPONENT_FOLLOW = 0x6;
GameLib.Component.COMPONENT_MESH = 0x7;
GameLib.Component.COMPONENT_SPLINE = 0x8;
GameLib.Component.COMPONENT_LIGHT = 0x9;
GameLib.Component.COMPONENT_INPUT_DRIVE = 0xa;
GameLib.Component.COMPONENT_COMPOSER = 0xb;
GameLib.Component.COMPONENT_RENDER_TARGET = 0xc;
GameLib.Component.COMPONENT_PASS = 0xd;
GameLib.Component.COMPONENT_SCENE = 0xe;
GameLib.Component.COMPONENT_RAYCASTER = 0xf;
GameLib.Component.COMPONENT_INPUT_EDITOR = 0x10;
GameLib.Component.COMPONENT_EDITOR = 0x11;
GameLib.Component.COMPONENT_VIEWPORT = 0x12;
GameLib.Component.COMPONENT_SYSTEM = 0x13;
GameLib.Component.COMPONENT_GRAPHICS = 0x14;
GameLib.Component.COMPONENT_HELPER = 0x15;
GameLib.Component.COMPONENT_CUSTOM_CODE = 0x16;
GameLib.Component.COMPONENT_MOUSE = 0x17;
GameLib.Component.COMPONENT_SKELETON = 0x18;
GameLib.Component.COMPONENT_TEXTURE = 0x19;
GameLib.Component.COMPONENT_ENTITY_MANAGER = 0x1a;
GameLib.Component.COMPONENT_DOM_ELEMENT = 0x1b;
GameLib.Component.COMPONENT_IMAGE_FACTORY = 0x1c;
GameLib.Component.COMPONENT_STATS = 0x1d;
GameLib.Component.COMPONENT_GUI = 0x1e;
GameLib.Component.COMPONENT_IMAGE = 0x1f;
GameLib.Component.COMPONENT_ENTITY = 0x20;
GameLib.Component.COMPONENT_MESH_SPHERE = 0x21;
GameLib.Component.COMPONENT_MESH_PLANE = 0x22;
GameLib.Component.COMPONENT_MESH_CURVE = 0x23;
GameLib.Component.COMPONENT_WORLD = 0x24;
GameLib.Component.COMPONENT_BROADPHASE = 0x25;
GameLib.Component.COMPONENT_SOLVER = 0x26;
GameLib.Component.COMPONENT_RIGID_BODY = 0x27;
GameLib.Component.COMPONENT_SHAPE = 0x28;
GameLib.Component.COMPONENT_SHAPE_BOX = 0x29;
GameLib.Component.COMPONENT_SHAPE_SPHERE = 0x2a;
GameLib.Component.COMPONENT_SHAPE_TRI_MESH = 0x2b;
GameLib.Component.COMPONENT_SHAPE_CONVEX_HULL = 0x2c;
GameLib.Component.COMPONENT_SHAPE_CYLINDER = 0x2d;
GameLib.Component.COMPONENT_SHAPE_HEIGHT_MAP = 0x2e;
GameLib.Component.COMPONENT_SHAPE_PLANE = 0x2f;
GameLib.Component.COMPONENT_CONTROLS = 0x30;
GameLib.Component.COMPONENT_CONTROLS_EDITOR = 0x31;
GameLib.Component.COMPONENT_CONTROLS_FLY = 0x32;
GameLib.Component.COMPONENT_FRICTION_MATERIAL = 0x33;
GameLib.Component.COMPONENT_PATH_FOLLOWING = 0x1;
GameLib.Component.COMPONENT_MATERIAL = 0x2;
GameLib.Component.COMPONENT_RENDERER = 0x3;
GameLib.Component.COMPONENT_LOOK_AT = 0x4;
GameLib.Component.COMPONENT_CAMERA = 0x5;
GameLib.Component.COMPONENT_FOLLOW = 0x6;
GameLib.Component.COMPONENT_MESH = 0x7;
GameLib.Component.COMPONENT_SPLINE = 0x8;
GameLib.Component.COMPONENT_LIGHT = 0x9;
GameLib.Component.COMPONENT_INPUT_DRIVE = 0xa;
GameLib.Component.COMPONENT_COMPOSER = 0xb;
GameLib.Component.COMPONENT_RENDER_TARGET = 0xc;
GameLib.Component.COMPONENT_PASS = 0xd;
GameLib.Component.COMPONENT_SCENE = 0xe;
GameLib.Component.COMPONENT_RAYCASTER = 0xf;
GameLib.Component.COMPONENT_INPUT_EDITOR = 0x10;
GameLib.Component.COMPONENT_EDITOR = 0x11;
GameLib.Component.COMPONENT_VIEWPORT = 0x12;
GameLib.Component.COMPONENT_SYSTEM = 0x13;
GameLib.Component.COMPONENT_GRAPHICS = 0x14;
GameLib.Component.COMPONENT_HELPER = 0x15;
GameLib.Component.COMPONENT_CUSTOM_CODE = 0x16;
GameLib.Component.COMPONENT_MOUSE = 0x17;
GameLib.Component.COMPONENT_SKELETON = 0x18;
GameLib.Component.COMPONENT_TEXTURE = 0x19;
GameLib.Component.COMPONENT_ENTITY_MANAGER = 0x1a;
GameLib.Component.COMPONENT_DOM_ELEMENT = 0x1b;
GameLib.Component.COMPONENT_IMAGE_FACTORY = 0x1c;
GameLib.Component.COMPONENT_STATS = 0x1d;
GameLib.Component.COMPONENT_GUI = 0x1e;
GameLib.Component.COMPONENT_IMAGE = 0x1f;
GameLib.Component.COMPONENT_ENTITY = 0x20;
GameLib.Component.COMPONENT_MESH_SPHERE = 0x21;
GameLib.Component.COMPONENT_MESH_PLANE = 0x22;
GameLib.Component.COMPONENT_MESH_CURVE = 0x23;
GameLib.Component.COMPONENT_WORLD = 0x24;
GameLib.Component.COMPONENT_BROADPHASE = 0x25;
GameLib.Component.COMPONENT_SOLVER = 0x26;
GameLib.Component.COMPONENT_RIGID_BODY = 0x27;
GameLib.Component.COMPONENT_SHAPE = 0x28;
GameLib.Component.COMPONENT_SHAPE_BOX = 0x29;
GameLib.Component.COMPONENT_SHAPE_SPHERE = 0x2a;
GameLib.Component.COMPONENT_SHAPE_TRI_MESH = 0x2b;
GameLib.Component.COMPONENT_SHAPE_CONVEX_HULL = 0x2c;
GameLib.Component.COMPONENT_SHAPE_CYLINDER = 0x2d;
GameLib.Component.COMPONENT_SHAPE_HEIGHT_MAP = 0x2e;
GameLib.Component.COMPONENT_SHAPE_PLANE = 0x2f;
GameLib.Component.COMPONENT_CONTROLS = 0x30;
GameLib.Component.COMPONENT_CONTROLS_EDITOR = 0x31;
GameLib.Component.COMPONENT_CONTROLS_FLY = 0x32;
GameLib.Component.COMPONENT_FRICTION_MATERIAL = 0x33;
GameLib.Component.COMPONENT_FRICTION_CONTACT_MATERIAL = 0x34;
/**
* Returns string name for component number
@ -206,6 +208,7 @@ GameLib.Component.GetComponentName = function(number) {
case 0x31 : return 'GameLib.D3.Controls.Editor';
case 0x32 : return 'GameLib.D3.Controls.Fly';
case 0x33 : return 'GameLib.D3.FrictionMaterial';
case 0x34 : return 'GameLib.D3.FrictionContactMaterial';
break;
}

View File

@ -79,9 +79,9 @@ GameLib.D3.World.prototype.createInstance = function() {
GameLib.D3.World.prototype.updateInstance = function() {
this.instance.broadphase = this.broadphase.instance;
this.instance.solver = this.solver.instance;
this.instance.gravity.x = this.gravity.x;
this.instance.gravity.y = this.gravity.y;
this.instance.gravity.z = this.gravity.z;
this.instance.gravity.x = this.gravity.x;
this.instance.gravity.y = this.gravity.y;
this.instance.gravity.z = this.gravity.z;
};
/**

View File

@ -949,9 +949,14 @@ GameLib.System.GUI.prototype.buildControl = function(folder, componentTemplate,
controllers.push(folder.add(object, property, -255, 255, 1));
} else if (
property === 'aspect'
) {
) {
controllers.push(folder.add(object, property, 0, 5, 0.001));
} else if (
property === 'heightMapScale' ||
property === 'intensity'
) {
controllers.push(folder.add(object, property, 0, 10, 0.001));
} else if (
property === 'widthSegments' ||
property === 'heightSegments'
) {