ray cast vehicle.
- wheels aren't rotated correctly. the code is broken atm.beta.r3js.org
parent
239e416220
commit
c38d302407
|
@ -0,0 +1,42 @@
|
||||||
|
GameLib.D3.ComponentMeshPermutation = function(
|
||||||
|
componentId,
|
||||||
|
positionOffset,
|
||||||
|
quaternionOffset
|
||||||
|
) {
|
||||||
|
this.componentId = componentId || GameLib.D3.Tools.RandomId();
|
||||||
|
this.parentEntity = null;
|
||||||
|
|
||||||
|
this.positionOffset = positionOffset || new GameLib.D3.Vector3(0, 0, 0);
|
||||||
|
this.quaternionOffset = quaternionOffset || new GameLib.D3.Quaternion(0, 0, 0, 1);
|
||||||
|
|
||||||
|
// Todo: this should be executed somewhere in game-lib-z, so that we don't execute it on every construction of an object.
|
||||||
|
GameLib.D3.Utils.Extend(GameLib.D3.ComponentMeshPermutation, GameLib.D3.ComponentInterface);
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////// Methods to override //////////////////////////
|
||||||
|
GameLib.D3.ComponentMeshPermutation.prototype.onLateUpdate = function(
|
||||||
|
deltaTime,
|
||||||
|
parentEntity
|
||||||
|
) {
|
||||||
|
|
||||||
|
if(parentEntity && parentEntity.mesh) {
|
||||||
|
var quaternion = new THREE.Quaternion();
|
||||||
|
quaternion.copy(parentEntity.mesh.quaternion);
|
||||||
|
|
||||||
|
var quaternionCopy = quaternion.clone();
|
||||||
|
|
||||||
|
var position = new THREE.Vector3();
|
||||||
|
position.copy(parentEntity.mesh.position);
|
||||||
|
|
||||||
|
var offsetQuaternion = new THREE.Quaternion();
|
||||||
|
offsetQuaternion.copy(this.quaternionOffset);
|
||||||
|
quaternion = quaternion.multiply(offsetQuaternion).normalize();
|
||||||
|
|
||||||
|
var offsetPosition = new THREE.Vector3();
|
||||||
|
offsetPosition.copy(this.positionOffset);
|
||||||
|
position = position.add(offsetPosition.applyQuaternion(quaternionCopy));
|
||||||
|
|
||||||
|
parentEntity.mesh.position.copy(position);
|
||||||
|
parentEntity.mesh.quaternion.copy(quaternion);
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,24 @@
|
||||||
|
GameLib.D3.ComponentRaycastVehicleControls = function(
|
||||||
|
componentId
|
||||||
|
) {
|
||||||
|
this.componentId = componentId || GameLib.D3.Tools.RandomId();
|
||||||
|
this.parentEntity = null;
|
||||||
|
|
||||||
|
// Todo: this should be executed somewhere in game-lib-z, so that we don't execute it on every construction of an object.
|
||||||
|
GameLib.D3.Utils.Extend(GameLib.D3.ComponentRaycastVehicleControls, GameLib.D3.ComponentInterface);
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////// Methods to override //////////////////////////
|
||||||
|
GameLib.D3.ComponentRaycastVehicleControls.prototype.onUpdate = function(
|
||||||
|
deltaTime,
|
||||||
|
parentEntity
|
||||||
|
) {
|
||||||
|
this.parentEntity.mesh.material.color = new THREE.Color(Math.random(), Math.random(), Math.random());
|
||||||
|
};
|
||||||
|
|
||||||
|
GameLib.D3.ComponentRaycastVehicleControls.prototype.onRegistered = function(
|
||||||
|
parentScene
|
||||||
|
) {
|
||||||
|
// Hook in document.eventlisteners
|
||||||
|
// save values & in the update method we just apply them on the vehicle itself
|
||||||
|
};
|
|
@ -10,8 +10,19 @@ GameLib.D3.Entity = function(
|
||||||
|
|
||||||
this.componentIds = componentIds;
|
this.componentIds = componentIds;
|
||||||
|
|
||||||
|
// constructed at runtime
|
||||||
this.parentScene = null;
|
this.parentScene = null;
|
||||||
this.mesh = null;
|
this.mesh = null;
|
||||||
|
|
||||||
|
// todo:
|
||||||
|
// add position, rotation & scale properties to entity itself!
|
||||||
|
|
||||||
|
this.permutate = {
|
||||||
|
offset : {
|
||||||
|
position : null,
|
||||||
|
quaternion : null
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -23,6 +23,8 @@ GameLib.D3.RaycastVehicle = function(
|
||||||
this.wheels = wheels;
|
this.wheels = wheels;
|
||||||
|
|
||||||
this.instance = this.createInstance();
|
this.instance = this.createInstance();
|
||||||
|
|
||||||
|
GameLib.D3.Utils.Extend(GameLib.D3.RaycastVehicle, GameLib.D3.ComponentInterface);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +45,7 @@ GameLib.D3.RaycastVehicle.prototype.addWheel = function (
|
||||||
wheel
|
wheel
|
||||||
) {
|
) {
|
||||||
this.wheels.push(wheel);
|
this.wheels.push(wheel);
|
||||||
this.instance.addWheel(wheel.instance);
|
wheel.wheelIndex = this.instance.addWheel(wheel.instance);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,4 +55,22 @@ GameLib.D3.RaycastVehicle.prototype.addWheel = function (
|
||||||
*/
|
*/
|
||||||
GameLib.D3.RaycastVehicle.prototype.getWheelInfo = function() {
|
GameLib.D3.RaycastVehicle.prototype.getWheelInfo = function() {
|
||||||
return this.instance.wheelInfos;
|
return this.instance.wheelInfos;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Override component methods //
|
||||||
|
GameLib.D3.RaycastVehicle.prototype.onUpdate = function(
|
||||||
|
deltaTime,
|
||||||
|
parentEntity
|
||||||
|
) {
|
||||||
|
/*for (var i = 0; i < this.getWheelInfo().length; i++) {
|
||||||
|
this.instance.updateWheelTransform(i);
|
||||||
|
}*/
|
||||||
|
};
|
||||||
|
|
||||||
|
GameLib.D3.RaycastVehicle.prototype.onRegistered = function(
|
||||||
|
parentScene
|
||||||
|
) {
|
||||||
|
|
||||||
};
|
};
|
|
@ -18,7 +18,6 @@ GameLib.D3.RaycastWheel = function(
|
||||||
deltaRotation,
|
deltaRotation,
|
||||||
rollInfluence,
|
rollInfluence,
|
||||||
maxSuspensionForce,
|
maxSuspensionForce,
|
||||||
isFrontWheel,
|
|
||||||
clippedInvContactDotSuspension,
|
clippedInvContactDotSuspension,
|
||||||
suspensionRelativeVelocity,
|
suspensionRelativeVelocity,
|
||||||
suspensionForce,
|
suspensionForce,
|
||||||
|
@ -33,147 +32,144 @@ GameLib.D3.RaycastWheel = function(
|
||||||
|
|
||||||
this.componentId = GameLib.D3.Tools.RandomId();
|
this.componentId = GameLib.D3.Tools.RandomId();
|
||||||
|
|
||||||
if(typeof chassisConnectionPointLocal == 'undefined') {
|
if(typeof chassisConnectionPointLocal == 'undefined' || chassisConnectionPointLocal == null) {
|
||||||
chassisConnectionPointLocal = new this.engine.instance.Vec3();
|
chassisConnectionPointLocal = new this.engine.instance.Vec3();
|
||||||
}
|
}
|
||||||
this.chassisConnectionPointLocal = chassisConnectionPointLocal;
|
this.chassisConnectionPointLocal = chassisConnectionPointLocal;
|
||||||
|
|
||||||
if(typeof chassisConnectionPointWorld == 'undefined') {
|
if(typeof chassisConnectionPointWorld == 'undefined' || chassisConnectionPointWorld == null) {
|
||||||
chassisConnectionPointWorld = new this.engine.instance.Vec3();
|
chassisConnectionPointWorld = new this.engine.instance.Vec3();
|
||||||
}
|
}
|
||||||
this.chassisConnectionPointWorld = chassisConnectionPointWorld;
|
this.chassisConnectionPointWorld = chassisConnectionPointWorld;
|
||||||
|
|
||||||
if(typeof directionLocal == 'undefined') {
|
if(typeof directionLocal == 'undefined' || directionLocal == null) {
|
||||||
directionLocal = new this.engine.instance.Vec3();
|
directionLocal = new this.engine.instance.Vec3();
|
||||||
}
|
}
|
||||||
this.directionLocal = directionLocal;
|
this.directionLocal = directionLocal;
|
||||||
|
|
||||||
if(typeof directionWorld == 'undefined') {
|
if(typeof directionWorld == 'undefined' || directionWorld == null) {
|
||||||
directionWorld = new this.engine.instance.Vec3();
|
directionWorld = new this.engine.instance.Vec3();
|
||||||
}
|
}
|
||||||
this.directionWorld = directionWorld;
|
this.directionWorld = directionWorld;
|
||||||
|
|
||||||
if(typeof axleLocal == 'undefined') {
|
if(typeof axleLocal == 'undefined' || axleLocal == null) {
|
||||||
axleLocal = new this.engine.instance.Vec3();
|
axleLocal = new this.engine.instance.Vec3();
|
||||||
}
|
}
|
||||||
this.axleLocal = axleLocal;
|
this.axleLocal = axleLocal;
|
||||||
|
|
||||||
if(typeof axleWorld == 'undefined') {
|
if(typeof axleWorld == 'undefined' || axleWorld == null) {
|
||||||
axleWorld = new this.engine.instance.Vec3();
|
axleWorld = new this.engine.instance.Vec3();
|
||||||
}
|
}
|
||||||
this.axleWorld = axleWorld;
|
this.axleWorld = axleWorld;
|
||||||
|
|
||||||
if(typeof suspensionRestLength == 'undefined') {
|
if(typeof suspensionRestLength == 'undefined' || suspensionRestLength == null) {
|
||||||
suspensionRestLength = 1;
|
suspensionRestLength = 1;
|
||||||
}
|
}
|
||||||
this.suspensionRestLength = suspensionRestLength;
|
this.suspensionRestLength = suspensionRestLength;
|
||||||
|
|
||||||
if(typeof suspensionMaxLength == 'undefined') {
|
if(typeof suspensionMaxLength == 'undefined' || suspensionMaxLength == null) {
|
||||||
suspensionMaxLength = 2;
|
suspensionMaxLength = 2;
|
||||||
}
|
}
|
||||||
this.suspensionMaxLength = suspensionMaxLength;
|
this.suspensionMaxLength = suspensionMaxLength;
|
||||||
|
|
||||||
if(typeof radius == 'undefined') {
|
if(typeof radius == 'undefined' || radius == null) {
|
||||||
radius = 1;
|
radius = 1;
|
||||||
}
|
}
|
||||||
this.radius = radius;
|
this.radius = radius;
|
||||||
|
|
||||||
if(typeof suspensionStiffness == 'undefined') {
|
if(typeof suspensionStiffness == 'undefined' || suspensionStiffness == null) {
|
||||||
suspensionStiffness = 100;
|
suspensionStiffness = 100;
|
||||||
}
|
}
|
||||||
this.suspensionStiffness = suspensionStiffness;
|
this.suspensionStiffness = suspensionStiffness;
|
||||||
|
|
||||||
if(typeof dampingCompression == 'undefined') {
|
if(typeof dampingCompression == 'undefined' || dampingCompression == null) {
|
||||||
dampingCompression = 10;
|
dampingCompression = 10;
|
||||||
}
|
}
|
||||||
this.dampingCompression = dampingCompression;
|
this.dampingCompression = dampingCompression;
|
||||||
|
|
||||||
if(typeof dampingRelaxation == 'undefined') {
|
if(typeof dampingRelaxation == 'undefined' || dampingRelaxation == null) {
|
||||||
dampingRelaxation = 10;
|
dampingRelaxation = 10;
|
||||||
}
|
}
|
||||||
this.dampingRelaxation = dampingRelaxation;
|
this.dampingRelaxation = dampingRelaxation;
|
||||||
|
|
||||||
if(typeof frictionSlip == 'undefined') {
|
if(typeof frictionSlip == 'undefined' || frictionSlip == null) {
|
||||||
frictionSlip = 10000;
|
frictionSlip = 10000;
|
||||||
}
|
}
|
||||||
this.frictionSlip = frictionSlip;
|
this.frictionSlip = frictionSlip;
|
||||||
|
|
||||||
if(typeof steering == 'undefined') {
|
if(typeof steering == 'undefined' || steering == null) {
|
||||||
steering = 0;
|
steering = 0;
|
||||||
}
|
}
|
||||||
this.steering = steering;
|
this.steering = steering;
|
||||||
|
|
||||||
if(typeof rotation == 'undefined') {
|
if(typeof rotation == 'undefined' || rotation == null) {
|
||||||
rotation = 0;
|
rotation = 0;
|
||||||
}
|
}
|
||||||
this.rotation = rotation;
|
this.rotation = rotation;
|
||||||
|
|
||||||
if(typeof deltaRotation == 'undefined') {
|
if(typeof deltaRotation == 'undefined' || deltaRotation == null) {
|
||||||
deltaRotation = 0;
|
deltaRotation = 0;
|
||||||
}
|
}
|
||||||
this.deltaRotation = deltaRotation;
|
this.deltaRotation = deltaRotation;
|
||||||
|
|
||||||
if(typeof rollInfluence == 'undefined') {
|
if(typeof rollInfluence == 'undefined' || rollInfluence == null) {
|
||||||
rollInfluence = 0.01;
|
rollInfluence = 0.01;
|
||||||
}
|
}
|
||||||
this.rollInfluence = rollInfluence;
|
this.rollInfluence = rollInfluence;
|
||||||
|
|
||||||
if(typeof maxSuspensionForce == 'undefined') {
|
if(typeof maxSuspensionForce == 'undefined' || maxSuspensionForce == null) {
|
||||||
maxSuspensionForce = Number.MAX_VALUE;
|
maxSuspensionForce = Number.MAX_VALUE;
|
||||||
}
|
}
|
||||||
this.maxSuspensionForce = maxSuspensionForce;
|
this.maxSuspensionForce = maxSuspensionForce;
|
||||||
|
|
||||||
if(typeof isFrontWheel == 'undefined') {
|
if(typeof clippedInvContactDotSuspension == 'undefined' || clippedInvContactDotSuspension == null) {
|
||||||
isFrontWheel = true;
|
|
||||||
}
|
|
||||||
this.isFrontWheel = isFrontWheel;
|
|
||||||
|
|
||||||
if(typeof clippedInvContactDotSuspension == 'undefined') {
|
|
||||||
clippedInvContactDotSuspension = 1;
|
clippedInvContactDotSuspension = 1;
|
||||||
}
|
}
|
||||||
this.clippedInvContactDotSuspension = clippedInvContactDotSuspension;
|
this.clippedInvContactDotSuspension = clippedInvContactDotSuspension;
|
||||||
|
|
||||||
if(typeof suspensionRelativeVelocity == 'undefined') {
|
if(typeof suspensionRelativeVelocity == 'undefined' || suspensionRelativeVelocity == null) {
|
||||||
suspensionRelativeVelocity = 0;
|
suspensionRelativeVelocity = 0;
|
||||||
}
|
}
|
||||||
this.suspensionRelativeVelocity = suspensionRelativeVelocity;
|
this.suspensionRelativeVelocity = suspensionRelativeVelocity;
|
||||||
|
|
||||||
if(typeof suspensionForce == 'undefined') {
|
if(typeof suspensionForce == 'undefined' || suspensionForce == null) {
|
||||||
suspensionForce = 0;
|
suspensionForce = 0;
|
||||||
}
|
}
|
||||||
this.suspensionForce = suspensionForce;
|
this.suspensionForce = suspensionForce;
|
||||||
|
|
||||||
if(typeof skidInfo == 'undefined') {
|
if(typeof skidInfo == 'undefined' || skidInfo == null) {
|
||||||
skidInfo = 0;
|
skidInfo = 0;
|
||||||
}
|
}
|
||||||
this.skidInfo = skidInfo;
|
this.skidInfo = skidInfo;
|
||||||
|
|
||||||
if(typeof suspensionLength == 'undefined') {
|
if(typeof suspensionLength == 'undefined' || suspensionLength == null) {
|
||||||
suspensionLength = 0;
|
suspensionLength = 0;
|
||||||
}
|
}
|
||||||
this.suspensionLength = suspensionLength;
|
this.suspensionLength = suspensionLength;
|
||||||
|
|
||||||
if(typeof maxSuspensionTravel == 'undefined') {
|
if(typeof maxSuspensionTravel == 'undefined' || maxSuspensionTravel == null) {
|
||||||
maxSuspensionTravel = 1;
|
maxSuspensionTravel = 1;
|
||||||
}
|
}
|
||||||
this.maxSuspensionTravel = maxSuspensionTravel;
|
this.maxSuspensionTravel = maxSuspensionTravel;
|
||||||
|
|
||||||
if(typeof useCustomSlidingRotationalSpeed == 'undefined') {
|
if(typeof useCustomSlidingRotationalSpeed == 'undefined' || useCustomSlidingRotationalSpeed == null) {
|
||||||
useCustomSlidingRotationalSpeed = false;
|
useCustomSlidingRotationalSpeed = false;
|
||||||
}
|
}
|
||||||
this.useCustomSlidingRotationalSpeed = useCustomSlidingRotationalSpeed;
|
this.useCustomSlidingRotationalSpeed = useCustomSlidingRotationalSpeed;
|
||||||
|
|
||||||
if(typeof customSlidingRotationalSpeed == 'undefined') {
|
if(typeof customSlidingRotationalSpeed == 'undefined' || customSlidingRotationalSpeed == null) {
|
||||||
customSlidingRotationalSpeed = -0.1;
|
customSlidingRotationalSpeed = -0.1;
|
||||||
}
|
}
|
||||||
this.customSlidingRotationalSpeed = customSlidingRotationalSpeed;
|
this.customSlidingRotationalSpeed = customSlidingRotationalSpeed;
|
||||||
|
|
||||||
this.instance = this.createInstance();
|
this.instance = this.createInstance();
|
||||||
|
|
||||||
|
// this gets assigned at runtime, when the wheel gets added to a vehicle
|
||||||
|
this.wheelIndex = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
GameLib.D3.RaycastWheel.prototype.createInstance = function() {
|
GameLib.D3.RaycastWheel.prototype.createInstance = function() {
|
||||||
|
return {
|
||||||
return new this.engine.instance.WheelInfo({
|
|
||||||
chassisConnectionPointLocal : this.chassisConnectionPointLocal,
|
chassisConnectionPointLocal : this.chassisConnectionPointLocal,
|
||||||
chassisConnectionPointWorld : this.chassisConnectionPointWorld,
|
chassisConnectionPointWorld : this.chassisConnectionPointWorld,
|
||||||
directionLocal : this.directionLocal,
|
directionLocal : this.directionLocal,
|
||||||
|
@ -192,7 +188,6 @@ GameLib.D3.RaycastWheel.prototype.createInstance = function() {
|
||||||
deltaRotation : this.deltaRotation,
|
deltaRotation : this.deltaRotation,
|
||||||
rollInfluence : this.rollInfluence,
|
rollInfluence : this.rollInfluence,
|
||||||
maxSuspensionForce : this.maxSuspensionForce,
|
maxSuspensionForce : this.maxSuspensionForce,
|
||||||
isFrontWheel : this.isFrontWheel,
|
|
||||||
clippedInvContactDotSuspension : this.clippedInvContactDotSuspension,
|
clippedInvContactDotSuspension : this.clippedInvContactDotSuspension,
|
||||||
suspensionRelativeVelocity : this.suspensionRelativeVelocity,
|
suspensionRelativeVelocity : this.suspensionRelativeVelocity,
|
||||||
suspensionForce : this.suspensionForce,
|
suspensionForce : this.suspensionForce,
|
||||||
|
@ -201,6 +196,6 @@ GameLib.D3.RaycastWheel.prototype.createInstance = function() {
|
||||||
maxSuspensionTravel : this.maxSuspensionTravel,
|
maxSuspensionTravel : this.maxSuspensionTravel,
|
||||||
useCustomSlidingRotationalSpeed : this.useCustomSlidingRotationalSpeed,
|
useCustomSlidingRotationalSpeed : this.useCustomSlidingRotationalSpeed,
|
||||||
customSlidingRotationalSpeed : this.customSlidingRotationalSpeed
|
customSlidingRotationalSpeed : this.customSlidingRotationalSpeed
|
||||||
});
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -120,11 +120,11 @@ GameLib.D3.RigidBody.prototype.addShape = function(
|
||||||
offset,
|
offset,
|
||||||
orientation
|
orientation
|
||||||
) {
|
) {
|
||||||
if (!offset) {
|
if (!offset || typeof offset == 'undefined') {
|
||||||
offset = new GameLib.D3.Vector3(0,0,0);
|
offset = new GameLib.D3.Vector3(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!orientation) {
|
if (!orientation || typeof orientation == 'undefined') {
|
||||||
orientation = new GameLib.D3.Vector4(0,0,0,1);
|
orientation = new GameLib.D3.Vector4(0,0,0,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ GameLib.D3.RigidBody.prototype.addShape = function(
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////// Methods to override //////////////////////////
|
///////////////////////// Methods to override //////////////////////////
|
||||||
GameLib.D3.RigidBody.prototype.onLateUpdate = function(
|
GameLib.D3.RigidBody.prototype.onUpdate = function(
|
||||||
deltaTime,
|
deltaTime,
|
||||||
parentEntity
|
parentEntity
|
||||||
) {
|
) {
|
||||||
|
@ -153,40 +153,10 @@ GameLib.D3.RigidBody.prototype.onLateUpdate = function(
|
||||||
var quaternion = new THREE.Quaternion();
|
var quaternion = new THREE.Quaternion();
|
||||||
quaternion.copy(this.instance.quaternion);
|
quaternion.copy(this.instance.quaternion);
|
||||||
|
|
||||||
var quaternionCopy = quaternion.clone();
|
|
||||||
|
|
||||||
var position = new THREE.Vector3();
|
var position = new THREE.Vector3();
|
||||||
position.copy(this.instance.position);
|
position.copy(this.instance.position);
|
||||||
|
|
||||||
// todo: create mesh superset with permutate field
|
|
||||||
// permutate : {
|
|
||||||
// offset : {
|
|
||||||
// quaternion : new Quaternion(),
|
|
||||||
// position : new Vec3()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/*if(mesh.permutate) {
|
|
||||||
if(mesh.permutate.offset) {
|
|
||||||
if(mesh.permutate.offset.quaternion) {
|
|
||||||
var offsetQuaternion = new THREE.Quaternion();
|
|
||||||
offsetQuaternion.copy(mesh.permutate.offset.quaternion);
|
|
||||||
quaternion = quaternion.multiply(offsetQuaternion).normalize();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mesh.permutate.offset.position) {
|
|
||||||
var offsetPosition = new THREE.Vector3();
|
|
||||||
offsetPosition.copy(mesh.permutate.offset.position);
|
|
||||||
//position = position.add(offsetPosition);
|
|
||||||
position = position.add(offsetPosition.applyQuaternion(quaternionCopy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
parentEntity.mesh.position.copy(position);
|
parentEntity.mesh.position.copy(position);
|
||||||
parentEntity.mesh.quaternion.copy(quaternion);
|
parentEntity.mesh.quaternion.copy(quaternion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
|
@ -10,6 +10,12 @@ GameLib.D3.Utils.Extend = function(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GameLib.D3.Utils.UndefinedOrNull = function (
|
||||||
|
variable
|
||||||
|
) {
|
||||||
|
return typeof variable == 'undefined' || variable == null;
|
||||||
|
};
|
||||||
|
|
||||||
GameLib.D3.Utils.Raycast = function (
|
GameLib.D3.Utils.Raycast = function (
|
||||||
from,
|
from,
|
||||||
to,
|
to,
|
||||||
|
|
Loading…
Reference in New Issue