mirror of
https://github.com/Heretek-AI/GDevelop-Heretek.git
synced 2026-10-12 02:02:42 +00:00
Add new 3D physics-based vehicle behavior (#7479)
* You can now simulate realistic 3D cars using the new Vehicle behavior powered by the 3D physics engine. * Advanced details can be customized: from wheel setup and gear ratios to engine torque, steering, brakes, anti-roll bars, and drivetrain (front/rear). * The default setup offers a semi-realistic, arcade-style driving feel. For smoother gameplay, explore the example projects to see how fine-tuning makes a big difference. * Jolt physics engine was upgraded to version 0.34.0.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -305,7 +305,14 @@ namespace gdjs {
|
||||
private shapeDimensionA: float;
|
||||
private shapeDimensionB: float;
|
||||
private shapeDimensionC: float;
|
||||
private shapeOffsetX: float;
|
||||
private shapeOffsetY: float;
|
||||
shapeOffsetZ: float;
|
||||
private massCenterOffsetX: float;
|
||||
private massCenterOffsetY: float;
|
||||
private massCenterOffsetZ: float;
|
||||
private density: float;
|
||||
massOverride: float;
|
||||
friction: float;
|
||||
restitution: float;
|
||||
linearDamping: float;
|
||||
@@ -313,7 +320,7 @@ namespace gdjs {
|
||||
gravityScale: float;
|
||||
private layers: integer;
|
||||
private masks: integer;
|
||||
private shapeScale: number = 1;
|
||||
shapeScale: number = 1;
|
||||
|
||||
/**
|
||||
* Array containing the beginning of contacts reported by onContactBegin. Each contact
|
||||
@@ -348,7 +355,10 @@ namespace gdjs {
|
||||
/**
|
||||
* When set to `true` the shape will be recreated before the next physics step.
|
||||
*/
|
||||
private _needToRecreateShape: boolean = false;
|
||||
_needToRecreateShape: boolean = false;
|
||||
|
||||
_shapeHalfWidth: float = 0;
|
||||
_shapeHalfHeight: float = 0;
|
||||
/**
|
||||
* Used by {@link gdjs.PhysicsCharacter3DRuntimeBehavior} to convert coordinates.
|
||||
*/
|
||||
@@ -392,7 +402,14 @@ namespace gdjs {
|
||||
this.shapeDimensionA = behaviorData.shapeDimensionA;
|
||||
this.shapeDimensionB = behaviorData.shapeDimensionB;
|
||||
this.shapeDimensionC = behaviorData.shapeDimensionC;
|
||||
this.shapeOffsetX = behaviorData.shapeOffsetX || 0;
|
||||
this.shapeOffsetY = behaviorData.shapeOffsetY || 0;
|
||||
this.shapeOffsetZ = behaviorData.shapeOffsetZ || 0;
|
||||
this.massCenterOffsetX = behaviorData.massCenterOffsetX || 0;
|
||||
this.massCenterOffsetY = behaviorData.massCenterOffsetY || 0;
|
||||
this.massCenterOffsetZ = behaviorData.massCenterOffsetZ || 0;
|
||||
this.density = behaviorData.density;
|
||||
this.massOverride = behaviorData.massOverride || 0;
|
||||
this.friction = behaviorData.friction;
|
||||
this.restitution = behaviorData.restitution;
|
||||
this.linearDamping = Math.max(0, behaviorData.linearDamping);
|
||||
@@ -634,6 +651,39 @@ namespace gdjs {
|
||||
}
|
||||
|
||||
createShape(): Jolt.Shape {
|
||||
if (
|
||||
this.massCenterOffsetX === 0 &&
|
||||
this.massCenterOffsetY === 0 &&
|
||||
this.massCenterOffsetZ === 0
|
||||
) {
|
||||
return this.createShapeWithoutMassCenterOffset();
|
||||
}
|
||||
const rotatedShapeSettings =
|
||||
this._createNewShapeSettingsWithoutMassCenterOffset();
|
||||
const shapeScale = this.shapeScale * this._sharedData.worldInvScale;
|
||||
const offsetCenterShapeSettings =
|
||||
new Jolt.OffsetCenterOfMassShapeSettings(
|
||||
this.getVec3(
|
||||
this.massCenterOffsetX * shapeScale,
|
||||
this.massCenterOffsetY * shapeScale,
|
||||
this.massCenterOffsetZ * shapeScale
|
||||
),
|
||||
rotatedShapeSettings
|
||||
);
|
||||
const shape = offsetCenterShapeSettings.Create().Get();
|
||||
Jolt.destroy(offsetCenterShapeSettings);
|
||||
return shape;
|
||||
}
|
||||
|
||||
createShapeWithoutMassCenterOffset(): Jolt.Shape {
|
||||
const rotatedShapeSettings =
|
||||
this._createNewShapeSettingsWithoutMassCenterOffset();
|
||||
const shape = rotatedShapeSettings.Create().Get();
|
||||
Jolt.destroy(rotatedShapeSettings);
|
||||
return shape;
|
||||
}
|
||||
|
||||
private _createNewShapeSettingsWithoutMassCenterOffset(): Jolt.RotatedTranslatedShapeSettings {
|
||||
let width = this.owner3D.getWidth() * this._sharedData.worldInvScale;
|
||||
let height = this.owner3D.getHeight() * this._sharedData.worldInvScale;
|
||||
let depth = this.owner3D.getDepth() * this._sharedData.worldInvScale;
|
||||
@@ -679,6 +729,8 @@ namespace gdjs {
|
||||
convexRadius
|
||||
);
|
||||
quat = this.getQuat(0, 0, 0, 1);
|
||||
this._shapeHalfWidth = boxWidth / 2;
|
||||
this._shapeHalfHeight = boxHeight / 2;
|
||||
this._shapeHalfDepth = boxDepth / 2;
|
||||
} else if (this.shape === 'Capsule') {
|
||||
const radius =
|
||||
@@ -694,8 +746,12 @@ namespace gdjs {
|
||||
radius
|
||||
);
|
||||
quat = this._getShapeOrientationQuat();
|
||||
this._shapeHalfWidth =
|
||||
this.shapeOrientation === 'X' ? capsuleDepth / 2 : radius;
|
||||
this._shapeHalfHeight =
|
||||
this.shapeOrientation === 'Y' ? capsuleDepth / 2 : radius;
|
||||
this._shapeHalfDepth =
|
||||
this.shapeOrientation !== 'Z' ? radius : capsuleDepth / 2;
|
||||
this.shapeOrientation === 'Z' ? capsuleDepth / 2 : radius;
|
||||
} else if (this.shape === 'Cylinder') {
|
||||
const radius =
|
||||
shapeDimensionA > 0
|
||||
@@ -716,8 +772,12 @@ namespace gdjs {
|
||||
convexRadius
|
||||
);
|
||||
quat = this._getShapeOrientationQuat();
|
||||
this._shapeHalfWidth =
|
||||
this.shapeOrientation === 'X' ? cylinderDepth / 2 : radius;
|
||||
this._shapeHalfHeight =
|
||||
this.shapeOrientation === 'Y' ? cylinderDepth / 2 : radius;
|
||||
this._shapeHalfDepth =
|
||||
this.shapeOrientation !== 'Z' ? radius : cylinderDepth / 2;
|
||||
this.shapeOrientation === 'Z' ? cylinderDepth / 2 : radius;
|
||||
} else {
|
||||
// Create a 'Sphere' by default.
|
||||
const radius =
|
||||
@@ -728,17 +788,20 @@ namespace gdjs {
|
||||
: onePixel;
|
||||
shapeSettings = new Jolt.SphereShapeSettings(radius);
|
||||
quat = this.getQuat(0, 0, 0, 1);
|
||||
this._shapeHalfWidth = radius;
|
||||
this._shapeHalfHeight = radius;
|
||||
this._shapeHalfDepth = radius;
|
||||
}
|
||||
shapeSettings.mDensity = this.density;
|
||||
const rotatedShapeSettings = new Jolt.RotatedTranslatedShapeSettings(
|
||||
this.getVec3(0, 0, 0),
|
||||
return new Jolt.RotatedTranslatedShapeSettings(
|
||||
this.getVec3(
|
||||
this.shapeOffsetX * shapeScale,
|
||||
this.shapeOffsetY * shapeScale,
|
||||
this.shapeOffsetZ * shapeScale
|
||||
),
|
||||
quat,
|
||||
shapeSettings
|
||||
);
|
||||
const rotatedShape = rotatedShapeSettings.Create().Get();
|
||||
Jolt.destroy(rotatedShapeSettings);
|
||||
return rotatedShape;
|
||||
}
|
||||
|
||||
private _getShapeOrientationQuat(): Jolt.Quat {
|
||||
@@ -933,7 +996,7 @@ namespace gdjs {
|
||||
);
|
||||
}
|
||||
|
||||
getPhysicsPosition(result: Jolt.RVec3): Jolt.RVec3 {
|
||||
_getPhysicsPosition(result: Jolt.RVec3): Jolt.RVec3 {
|
||||
result.Set(
|
||||
this.owner3D.getCenterXInScene() * this._sharedData.worldInvScale,
|
||||
this.owner3D.getCenterYInScene() * this._sharedData.worldInvScale,
|
||||
@@ -942,7 +1005,7 @@ namespace gdjs {
|
||||
return result;
|
||||
}
|
||||
|
||||
getPhysicsRotation(result: Jolt.Quat): Jolt.Quat {
|
||||
_getPhysicsRotation(result: Jolt.Quat): Jolt.Quat {
|
||||
const threeObject = this.owner3D.get3DRendererObject();
|
||||
result.Set(
|
||||
threeObject.quaternion.x,
|
||||
@@ -953,7 +1016,7 @@ namespace gdjs {
|
||||
return result;
|
||||
}
|
||||
|
||||
moveObjectToPhysicsPosition(physicsPosition: Jolt.RVec3): void {
|
||||
_moveObjectToPhysicsPosition(physicsPosition: Jolt.RVec3): void {
|
||||
this.owner3D.setCenterXInScene(
|
||||
physicsPosition.GetX() * this._sharedData.worldScale
|
||||
);
|
||||
@@ -965,7 +1028,7 @@ namespace gdjs {
|
||||
);
|
||||
}
|
||||
|
||||
moveObjectToPhysicsRotation(physicsRotation: Jolt.Quat): void {
|
||||
_moveObjectToPhysicsRotation(physicsRotation: Jolt.Quat): void {
|
||||
const threeObject = this.owner3D.get3DRendererObject();
|
||||
threeObject.quaternion.x = physicsRotation.GetX();
|
||||
threeObject.quaternion.y = physicsRotation.GetY();
|
||||
@@ -1103,6 +1166,18 @@ namespace gdjs {
|
||||
this._needToRecreateShape = true;
|
||||
}
|
||||
|
||||
getMassOverride(): float {
|
||||
return this.massOverride;
|
||||
}
|
||||
|
||||
setMassOverride(mass: float): void {
|
||||
if (this.massOverride === mass) {
|
||||
return;
|
||||
}
|
||||
this.massOverride = mass;
|
||||
this._needToRecreateBody = true;
|
||||
}
|
||||
|
||||
getFriction(): float {
|
||||
return this.friction;
|
||||
}
|
||||
@@ -1784,8 +1859,8 @@ namespace gdjs {
|
||||
const shape = behavior.createShape();
|
||||
const bodyCreationSettings = new Jolt.BodyCreationSettings(
|
||||
shape,
|
||||
behavior.getPhysicsPosition(_sharedData.getRVec3(0, 0, 0)),
|
||||
behavior.getPhysicsRotation(_sharedData.getQuat(0, 0, 0, 1)),
|
||||
behavior._getPhysicsPosition(_sharedData.getRVec3(0, 0, 0)),
|
||||
behavior._getPhysicsRotation(_sharedData.getQuat(0, 0, 0, 1)),
|
||||
behavior.bodyType === 'Static'
|
||||
? Jolt.EMotionType_Static
|
||||
: behavior.bodyType === 'Kinematic'
|
||||
@@ -1806,6 +1881,12 @@ namespace gdjs {
|
||||
bodyCreationSettings.mLinearDamping = behavior.linearDamping;
|
||||
bodyCreationSettings.mAngularDamping = behavior.angularDamping;
|
||||
bodyCreationSettings.mGravityFactor = behavior.gravityScale;
|
||||
if (behavior.massOverride > 0) {
|
||||
bodyCreationSettings.mOverrideMassProperties =
|
||||
Jolt.EOverrideMassProperties_CalculateInertia;
|
||||
bodyCreationSettings.mMassPropertiesOverride.mMass =
|
||||
behavior.massOverride;
|
||||
}
|
||||
|
||||
const bodyInterface = _sharedData.bodyInterface;
|
||||
const body = bodyInterface.CreateBody(bodyCreationSettings);
|
||||
@@ -1824,8 +1905,8 @@ namespace gdjs {
|
||||
// If the body is null, we just don't do anything
|
||||
// (but still run the physics simulation - this is independent).
|
||||
if (_body !== null && _body.IsActive()) {
|
||||
behavior.moveObjectToPhysicsPosition(_body.GetPosition());
|
||||
behavior.moveObjectToPhysicsRotation(_body.GetRotation());
|
||||
behavior._moveObjectToPhysicsPosition(_body.GetPosition());
|
||||
behavior._moveObjectToPhysicsRotation(_body.GetRotation());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1847,8 +1928,8 @@ namespace gdjs {
|
||||
) {
|
||||
_sharedData.bodyInterface.SetPositionAndRotationWhenChanged(
|
||||
body.GetID(),
|
||||
this.behavior.getPhysicsPosition(_sharedData.getRVec3(0, 0, 0)),
|
||||
this.behavior.getPhysicsRotation(_sharedData.getQuat(0, 0, 0, 1)),
|
||||
this.behavior._getPhysicsPosition(_sharedData.getRVec3(0, 0, 0)),
|
||||
this.behavior._getPhysicsRotation(_sharedData.getQuat(0, 0, 0, 1)),
|
||||
Jolt.EActivation_Activate
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -323,7 +323,7 @@ namespace gdjs {
|
||||
this._dontClearInputsBetweenFrames = true;
|
||||
}
|
||||
|
||||
getPhysicsPosition(result: Jolt.RVec3): Jolt.RVec3 {
|
||||
_getPhysicsPosition(result: Jolt.RVec3): Jolt.RVec3 {
|
||||
const physics3D = this.getPhysics3D();
|
||||
if (!physics3D) {
|
||||
result.Set(0, 0, 0);
|
||||
@@ -343,7 +343,7 @@ namespace gdjs {
|
||||
return result;
|
||||
}
|
||||
|
||||
getPhysicsRotation(result: Jolt.Quat): Jolt.Quat {
|
||||
_getPhysicsRotation(result: Jolt.Quat): Jolt.Quat {
|
||||
// Characters body should not rotate around X and Y.
|
||||
const rotation = result.sEulerAngles(
|
||||
this.getVec3(0, 0, gdjs.toRad(this.owner3D.getAngle()))
|
||||
@@ -358,7 +358,7 @@ namespace gdjs {
|
||||
return result;
|
||||
}
|
||||
|
||||
moveObjectToPhysicsPosition(physicsPosition: Jolt.RVec3): void {
|
||||
_moveObjectToPhysicsPosition(physicsPosition: Jolt.RVec3): void {
|
||||
const physics3D = this.getPhysics3D();
|
||||
if (!physics3D) {
|
||||
return;
|
||||
@@ -376,7 +376,7 @@ namespace gdjs {
|
||||
);
|
||||
}
|
||||
|
||||
moveObjectToPhysicsRotation(physicsRotation: Jolt.Quat): void {
|
||||
_moveObjectToPhysicsRotation(physicsRotation: Jolt.Quat): void {
|
||||
const threeObject = this.owner3D.get3DRendererObject();
|
||||
threeObject.quaternion.x = physicsRotation.GetX();
|
||||
threeObject.quaternion.y = physicsRotation.GetY();
|
||||
@@ -1503,7 +1503,8 @@ namespace gdjs {
|
||||
const { behavior } = physics3D;
|
||||
const { _slopeMaxAngle, owner3D, _sharedData } = this.characterBehavior;
|
||||
|
||||
const shape = behavior.createShape();
|
||||
// Jolt doesn't support center of mass offset for characters.
|
||||
const shape = behavior.createShapeWithoutMassCenterOffset();
|
||||
|
||||
const settings = new Jolt.CharacterVirtualSettings();
|
||||
// Characters innerBody are Kinematic body, they don't allow other
|
||||
@@ -1542,10 +1543,10 @@ namespace gdjs {
|
||||
);
|
||||
const character = new Jolt.CharacterVirtual(
|
||||
settings,
|
||||
this.characterBehavior.getPhysicsPosition(
|
||||
this.characterBehavior._getPhysicsPosition(
|
||||
_sharedData.getRVec3(0, 0, 0)
|
||||
),
|
||||
behavior.getPhysicsRotation(_sharedData.getQuat(0, 0, 0, 1)),
|
||||
behavior._getPhysicsRotation(_sharedData.getQuat(0, 0, 0, 1)),
|
||||
_sharedData.physicsSystem
|
||||
);
|
||||
Jolt.destroy(settings);
|
||||
@@ -1622,6 +1623,19 @@ namespace gdjs {
|
||||
contactNormal,
|
||||
settings
|
||||
) => {};
|
||||
characterContactListener.OnContactPersisted = (
|
||||
inCharacter,
|
||||
inBodyID2,
|
||||
inSubShapeID2,
|
||||
inContactPosition,
|
||||
inContactNormal,
|
||||
ioSettings
|
||||
) => {};
|
||||
characterContactListener.OnContactRemoved = (
|
||||
inCharacter,
|
||||
inBodyID2,
|
||||
inSubShapeID2
|
||||
) => {};
|
||||
characterContactListener.OnCharacterContactAdded = (
|
||||
character,
|
||||
otherCharacter,
|
||||
@@ -1630,6 +1644,19 @@ namespace gdjs {
|
||||
contactNormal,
|
||||
settings
|
||||
) => {};
|
||||
characterContactListener.OnCharacterContactPersisted = (
|
||||
inCharacter,
|
||||
inOtherCharacter,
|
||||
inSubShapeID2,
|
||||
inContactPosition,
|
||||
inContactNormal,
|
||||
ioSettings
|
||||
) => {};
|
||||
characterContactListener.OnCharacterContactRemoved = (
|
||||
inCharacter,
|
||||
inOtherCharacter,
|
||||
inSubShapeID2
|
||||
) => {};
|
||||
characterContactListener.OnContactSolve = (
|
||||
character,
|
||||
bodyID2,
|
||||
@@ -1666,10 +1693,10 @@ namespace gdjs {
|
||||
return;
|
||||
}
|
||||
// We can't rely on the body position because of mCharacterPadding.
|
||||
this.characterBehavior.moveObjectToPhysicsPosition(
|
||||
this.characterBehavior._moveObjectToPhysicsPosition(
|
||||
character.GetPosition()
|
||||
);
|
||||
this.characterBehavior.moveObjectToPhysicsRotation(
|
||||
this.characterBehavior._moveObjectToPhysicsRotation(
|
||||
character.GetRotation()
|
||||
);
|
||||
}
|
||||
@@ -1697,7 +1724,7 @@ namespace gdjs {
|
||||
behavior._objectOldRotationZ !== owner3D.getAngle()
|
||||
) {
|
||||
character.SetRotation(
|
||||
this.characterBehavior.getPhysicsRotation(
|
||||
this.characterBehavior._getPhysicsRotation(
|
||||
_sharedData.getQuat(0, 0, 0, 1)
|
||||
)
|
||||
);
|
||||
@@ -1710,7 +1737,7 @@ namespace gdjs {
|
||||
return;
|
||||
}
|
||||
character.SetPosition(
|
||||
this.characterBehavior.getPhysicsPosition(
|
||||
this.characterBehavior._getPhysicsPosition(
|
||||
_sharedData.getRVec3(0, 0, 0)
|
||||
)
|
||||
);
|
||||
@@ -1732,7 +1759,7 @@ namespace gdjs {
|
||||
if (!character) {
|
||||
return;
|
||||
}
|
||||
const shape = behavior.createShape();
|
||||
const shape = behavior.createShapeWithoutMassCenterOffset();
|
||||
const isShapeValid = character.SetShape(
|
||||
shape,
|
||||
Number.MAX_VALUE,
|
||||
|
||||
+94
-9
@@ -26,6 +26,7 @@ declare namespace Jolt {
|
||||
size(): number;
|
||||
}
|
||||
class ArrayVec3 {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): Vec3;
|
||||
@@ -36,6 +37,7 @@ declare namespace Jolt {
|
||||
data(): Vec3MemRef;
|
||||
}
|
||||
class ArrayQuat {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): Quat;
|
||||
@@ -46,6 +48,7 @@ declare namespace Jolt {
|
||||
data(): QuatMemRef;
|
||||
}
|
||||
class ArrayMat44 {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): Mat44;
|
||||
@@ -56,6 +59,7 @@ declare namespace Jolt {
|
||||
data(): Mat44MemRef;
|
||||
}
|
||||
class ArrayBodyID {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): BodyID;
|
||||
@@ -66,6 +70,7 @@ declare namespace Jolt {
|
||||
data(): BodyIDMemRef;
|
||||
}
|
||||
class ArrayBodyPtr {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): Body;
|
||||
@@ -431,6 +436,13 @@ declare namespace Jolt {
|
||||
function _emscripten_enum_SoftBodySharedSettings_ELRAType_SoftBodySharedSettings_ELRAType_None(): SoftBodySharedSettings_ELRAType;
|
||||
function _emscripten_enum_SoftBodySharedSettings_ELRAType_SoftBodySharedSettings_ELRAType_EuclideanDistance(): SoftBodySharedSettings_ELRAType;
|
||||
function _emscripten_enum_SoftBodySharedSettings_ELRAType_SoftBodySharedSettings_ELRAType_GeodesicDistance(): SoftBodySharedSettings_ELRAType;
|
||||
const MeshShapeSettings_EBuildQuality_FavorRuntimePerformance: number;
|
||||
const MeshShapeSettings_EBuildQuality_FavorBuildSpeed: number;
|
||||
type MeshShapeSettings_EBuildQuality =
|
||||
| typeof MeshShapeSettings_EBuildQuality_FavorRuntimePerformance
|
||||
| typeof MeshShapeSettings_EBuildQuality_FavorBuildSpeed;
|
||||
function _emscripten_enum_MeshShapeSettings_EBuildQuality_MeshShapeSettings_EBuildQuality_FavorRuntimePerformance(): MeshShapeSettings_EBuildQuality;
|
||||
function _emscripten_enum_MeshShapeSettings_EBuildQuality_MeshShapeSettings_EBuildQuality_FavorBuildSpeed(): MeshShapeSettings_EBuildQuality;
|
||||
class Vec3MemRef {}
|
||||
class QuatMemRef {}
|
||||
class Mat44MemRef {}
|
||||
@@ -444,6 +456,7 @@ declare namespace Jolt {
|
||||
constructor(inV: Float3);
|
||||
constructor(inX: number, inY: number, inZ: number);
|
||||
sZero(): Vec3;
|
||||
sOne(): Vec3;
|
||||
sAxisX(): Vec3;
|
||||
sAxisY(): Vec3;
|
||||
sAxisZ(): Vec3;
|
||||
@@ -505,6 +518,7 @@ declare namespace Jolt {
|
||||
constructor();
|
||||
constructor(inX: number, inY: number, inZ: number);
|
||||
sZero(): RVec3;
|
||||
sOne(): RVec3;
|
||||
sAxisX(): RVec3;
|
||||
sAxisY(): RVec3;
|
||||
sAxisZ(): RVec3;
|
||||
@@ -552,6 +566,7 @@ declare namespace Jolt {
|
||||
constructor(inV: Vec3, inW: number);
|
||||
constructor(inX: number, inY: number, inZ: number, inW: number);
|
||||
sZero(): Vec4;
|
||||
sOne(): Vec4;
|
||||
sReplicate(inV: number): Vec4;
|
||||
sMin(inLHS: Vec4, inRHS: Vec4): Vec4;
|
||||
sMax(inLHS: Vec4, inRHS: Vec4): Vec4;
|
||||
@@ -1427,6 +1442,9 @@ declare namespace Jolt {
|
||||
get_mPerTriangleUserData(): boolean;
|
||||
set_mPerTriangleUserData(mPerTriangleUserData: boolean): void;
|
||||
mPerTriangleUserData: boolean;
|
||||
get_mBuildQuality(): MeshShapeSettings_EBuildQuality;
|
||||
set_mBuildQuality(mBuildQuality: MeshShapeSettings_EBuildQuality): void;
|
||||
mBuildQuality: MeshShapeSettings_EBuildQuality;
|
||||
}
|
||||
class MeshShape extends Shape {
|
||||
GetTriangleUserData(inSubShapeID: SubShapeID): number;
|
||||
@@ -2523,6 +2541,8 @@ declare namespace Jolt {
|
||||
GetGravityFactor(inBodyID: BodyID): number;
|
||||
SetUseManifoldReduction(inBodyID: BodyID, inUseReduction: boolean): void;
|
||||
GetUseManifoldReduction(inBodyID: BodyID): boolean;
|
||||
SetCollisionGroup(inBodyID: BodyID, inCollisionGroup: CollisionGroup): void;
|
||||
GetCollisionGroup(inBodyID: BodyID): CollisionGroup;
|
||||
AddForce(
|
||||
inBodyID: BodyID,
|
||||
inForce: Vec3,
|
||||
@@ -2624,9 +2644,9 @@ declare namespace Jolt {
|
||||
get_mLinearCastMaxPenetration(): number;
|
||||
set_mLinearCastMaxPenetration(mLinearCastMaxPenetration: number): void;
|
||||
mLinearCastMaxPenetration: number;
|
||||
get_mManifoldToleranceSq(): number;
|
||||
set_mManifoldToleranceSq(mManifoldToleranceSq: number): void;
|
||||
mManifoldToleranceSq: number;
|
||||
get_mManifoldTolerance(): number;
|
||||
set_mManifoldTolerance(mManifoldTolerance: number): void;
|
||||
mManifoldTolerance: number;
|
||||
get_mMaxPenetrationDistance(): number;
|
||||
set_mMaxPenetrationDistance(mMaxPenetrationDistance: number): void;
|
||||
mMaxPenetrationDistance: number;
|
||||
@@ -2983,6 +3003,7 @@ declare namespace Jolt {
|
||||
AddHit(inResult: number): void;
|
||||
}
|
||||
class ArrayRayCastResult {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): RayCastResult;
|
||||
@@ -3040,6 +3061,7 @@ declare namespace Jolt {
|
||||
AddHit(inResult: number): void;
|
||||
}
|
||||
class ArrayCollidePointResult {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): CollidePointResult;
|
||||
@@ -3114,6 +3136,7 @@ declare namespace Jolt {
|
||||
AddHit(inResult: number): void;
|
||||
}
|
||||
class ArrayCollideShapeResult {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): CollideShapeResult;
|
||||
@@ -3188,6 +3211,7 @@ declare namespace Jolt {
|
||||
AddHit(inResult: number): void;
|
||||
}
|
||||
class ArrayShapeCastResult {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): ShapeCastResult;
|
||||
@@ -3618,6 +3642,7 @@ declare namespace Jolt {
|
||||
mMaxDistance: number;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsVertex {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsVertex;
|
||||
@@ -3627,6 +3652,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsFace {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsFace;
|
||||
@@ -3636,6 +3662,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsEdge {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsEdge;
|
||||
@@ -3645,6 +3672,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsDihedralBend {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsDihedralBend;
|
||||
@@ -3654,6 +3682,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsVolume {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsVolume;
|
||||
@@ -3663,6 +3692,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsInvBind {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsInvBind;
|
||||
@@ -3672,6 +3702,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsSkinned {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsSkinned;
|
||||
@@ -3681,6 +3712,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsLRA {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsLRA;
|
||||
@@ -3708,6 +3740,7 @@ declare namespace Jolt {
|
||||
mLRAMaxDistanceMultiplier: number;
|
||||
}
|
||||
class ArraySoftBodySharedSettingsVertexAttributes {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodySharedSettingsVertexAttributes;
|
||||
@@ -3856,6 +3889,7 @@ declare namespace Jolt {
|
||||
readonly mVelocityOffset: number;
|
||||
}
|
||||
class ArraySoftBodyVertex {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): SoftBodyVertex;
|
||||
@@ -3923,8 +3957,18 @@ declare namespace Jolt {
|
||||
set_mShape(mShape: Shape): void;
|
||||
mShape: Shape;
|
||||
}
|
||||
class CharacterID {
|
||||
constructor();
|
||||
GetValue(): number;
|
||||
IsInvalid(): boolean;
|
||||
sNextCharacterID(): CharacterID;
|
||||
sSetNextCharacterID(inNextValue: number): void;
|
||||
}
|
||||
class CharacterVirtualSettings extends CharacterBaseSettings {
|
||||
constructor();
|
||||
get_mID(): CharacterID;
|
||||
set_mID(mID: CharacterID): void;
|
||||
mID: CharacterID;
|
||||
get_mMass(): number;
|
||||
set_mMass(mMass: number): void;
|
||||
mMass: number;
|
||||
@@ -3967,6 +4011,9 @@ declare namespace Jolt {
|
||||
get_mInnerBodyShape(): Shape;
|
||||
set_mInnerBodyShape(mInnerBodyShape: Shape): void;
|
||||
mInnerBodyShape: Shape;
|
||||
get_mInnerBodyIDOverride(): BodyID;
|
||||
set_mInnerBodyIDOverride(mInnerBodyIDOverride: BodyID): void;
|
||||
mInnerBodyIDOverride: BodyID;
|
||||
get_mInnerBodyLayer(): number;
|
||||
set_mInnerBodyLayer(mInnerBodyLayer: number): void;
|
||||
mInnerBodyLayer: number;
|
||||
@@ -4008,6 +4055,19 @@ declare namespace Jolt {
|
||||
inContactNormal: number,
|
||||
ioSettings: number
|
||||
): void;
|
||||
OnContactPersisted(
|
||||
inCharacter: number,
|
||||
inBodyID2: number,
|
||||
inSubShapeID2: number,
|
||||
inContactPosition: number,
|
||||
inContactNormal: number,
|
||||
ioSettings: number
|
||||
): void;
|
||||
OnContactRemoved(
|
||||
inCharacter: number,
|
||||
inBodyID2: number,
|
||||
inSubShapeID2: number
|
||||
): void;
|
||||
OnCharacterContactAdded(
|
||||
inCharacter: number,
|
||||
inOtherCharacter: number,
|
||||
@@ -4016,6 +4076,19 @@ declare namespace Jolt {
|
||||
inContactNormal: number,
|
||||
ioSettings: number
|
||||
): void;
|
||||
OnCharacterContactPersisted(
|
||||
inCharacter: number,
|
||||
inOtherCharacter: number,
|
||||
inSubShapeID2: number,
|
||||
inContactPosition: number,
|
||||
inContactNormal: number,
|
||||
ioSettings: number
|
||||
): void;
|
||||
OnCharacterContactRemoved(
|
||||
inCharacter: number,
|
||||
inOtherCharacter: number,
|
||||
inSubShapeID2: number
|
||||
): void;
|
||||
OnContactSolve(
|
||||
inCharacter: number,
|
||||
inBodyID2: number,
|
||||
@@ -4091,9 +4164,9 @@ declare namespace Jolt {
|
||||
get_mBodyB(): BodyID;
|
||||
set_mBodyB(mBodyB: BodyID): void;
|
||||
mBodyB: BodyID;
|
||||
get_mCharacterB(): CharacterVirtual;
|
||||
set_mCharacterB(mCharacterB: CharacterVirtual): void;
|
||||
mCharacterB: CharacterVirtual;
|
||||
get_mCharacterIDB(): CharacterID;
|
||||
set_mCharacterIDB(mCharacterIDB: CharacterID): void;
|
||||
mCharacterIDB: CharacterID;
|
||||
get_mSubShapeIDB(): SubShapeID;
|
||||
set_mSubShapeIDB(mSubShapeIDB: SubShapeID): void;
|
||||
mSubShapeIDB: SubShapeID;
|
||||
@@ -4103,6 +4176,9 @@ declare namespace Jolt {
|
||||
get_mIsSensorB(): boolean;
|
||||
set_mIsSensorB(mIsSensorB: boolean): void;
|
||||
mIsSensorB: boolean;
|
||||
get_mCharacterB(): CharacterVirtual;
|
||||
set_mCharacterB(mCharacterB: CharacterVirtual): void;
|
||||
mCharacterB: CharacterVirtual;
|
||||
get_mUserData(): number;
|
||||
set_mUserData(mUserData: number): void;
|
||||
mUserData: number;
|
||||
@@ -4120,6 +4196,7 @@ declare namespace Jolt {
|
||||
mCanPushCharacter: boolean;
|
||||
}
|
||||
class ArrayCharacterVirtualContact {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): CharacterVirtualContact;
|
||||
@@ -4234,6 +4311,7 @@ declare namespace Jolt {
|
||||
inRotation: Quat,
|
||||
inSystem: PhysicsSystem
|
||||
);
|
||||
GetID(): CharacterID;
|
||||
SetListener(inListener: CharacterContactListener): void;
|
||||
SetCharacterVsCharacterCollision(
|
||||
inCharacterVsCharacterCollision: CharacterVsCharacterCollision
|
||||
@@ -4265,6 +4343,8 @@ declare namespace Jolt {
|
||||
GetUserData(): number;
|
||||
SetUserData(inUserData: number): void;
|
||||
GetInnerBodyID(): BodyID;
|
||||
StartTrackingContactChanges(): void;
|
||||
FinishTrackingContactChanges(): void;
|
||||
CancelVelocityTowardsSteepSlopes(inDesiredVelocity: Vec3): Vec3;
|
||||
Update(
|
||||
inDeltaTime: number,
|
||||
@@ -4326,6 +4406,7 @@ declare namespace Jolt {
|
||||
SetInnerBodyShape(inShape: Shape): void;
|
||||
GetTransformedShape(): TransformedShape;
|
||||
HasCollidedWith(inBodyID: BodyID): boolean;
|
||||
HasCollidedWithCharacterID(inCharacterID: CharacterID): boolean;
|
||||
HasCollidedWithCharacter(inCharacter: CharacterVirtual): boolean;
|
||||
GetActiveContacts(): ArrayCharacterVirtualContact;
|
||||
}
|
||||
@@ -4340,6 +4421,7 @@ declare namespace Jolt {
|
||||
GetValue(inX: number): number;
|
||||
}
|
||||
class ArrayFloat {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): number;
|
||||
@@ -4350,6 +4432,7 @@ declare namespace Jolt {
|
||||
data(): FloatMemRef;
|
||||
}
|
||||
class ArrayUint {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): number;
|
||||
@@ -4360,6 +4443,7 @@ declare namespace Jolt {
|
||||
data(): UintMemRef;
|
||||
}
|
||||
class ArrayUint8 {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): number;
|
||||
@@ -4370,6 +4454,7 @@ declare namespace Jolt {
|
||||
data(): Uint8MemRef;
|
||||
}
|
||||
class ArrayVehicleAntiRollBar {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): VehicleAntiRollBar;
|
||||
@@ -4378,6 +4463,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArrayWheelSettings {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): WheelSettings;
|
||||
@@ -4386,6 +4472,7 @@ declare namespace Jolt {
|
||||
clear(): void;
|
||||
}
|
||||
class ArrayVehicleDifferentialSettings {
|
||||
constructor();
|
||||
empty(): boolean;
|
||||
size(): number;
|
||||
at(inIndex: number): VehicleDifferentialSettings;
|
||||
@@ -4457,6 +4544,7 @@ declare namespace Jolt {
|
||||
inWheelRight: Vec3,
|
||||
inWheelUp: Vec3
|
||||
): RMat44;
|
||||
GetAntiRollBars(): ArrayVehicleAntiRollBar;
|
||||
SetNumStepsBetweenCollisionTestActive(inSteps: number): void;
|
||||
GetNumStepsBetweenCollisionTestActive(): number;
|
||||
SetNumStepsBetweenCollisionTestInactive(inSteps: number): void;
|
||||
@@ -4819,9 +4907,6 @@ declare namespace Jolt {
|
||||
}
|
||||
class VehicleControllerSettings {}
|
||||
class VehicleController {
|
||||
GetRefCount(): number;
|
||||
AddRef(): void;
|
||||
Release(): void;
|
||||
GetConstraint(): VehicleConstraint;
|
||||
}
|
||||
class WheeledVehicleController extends VehicleController {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1196,6 +1196,7 @@ interface MeasurementUnit {
|
||||
[Const, Ref] MeasurementUnit STATIC_GetPixel();
|
||||
[Const, Ref] MeasurementUnit STATIC_GetPixelSpeed();
|
||||
[Const, Ref] MeasurementUnit STATIC_GetPixelAcceleration();
|
||||
[Const, Ref] MeasurementUnit STATIC_GetAngularSpeed();
|
||||
[Const, Ref] MeasurementUnit STATIC_GetNewton();
|
||||
|
||||
long STATIC_GetDefaultMeasurementUnitsCount();
|
||||
|
||||
@@ -830,6 +830,7 @@ typedef ExtensionAndMetadata<ExpressionMetadata> ExtensionAndExpressionMetadata;
|
||||
#define STATIC_GetPixel GetPixel
|
||||
#define STATIC_GetPixelSpeed GetPixelSpeed
|
||||
#define STATIC_GetPixelAcceleration GetPixelAcceleration
|
||||
#define STATIC_GetAngularSpeed GetAngularSpeed
|
||||
#define STATIC_GetNewton GetNewton
|
||||
#define STATIC_GetDefaultMeasurementUnitsCount GetDefaultMeasurementUnitsCount
|
||||
#define STATIC_GetDefaultMeasurementUnitAtIndex GetDefaultMeasurementUnitAtIndex
|
||||
|
||||
Vendored
+1
@@ -987,6 +987,7 @@ export class MeasurementUnit extends EmscriptenObject {
|
||||
static getPixel(): MeasurementUnit;
|
||||
static getPixelSpeed(): MeasurementUnit;
|
||||
static getPixelAcceleration(): MeasurementUnit;
|
||||
static getAngularSpeed(): MeasurementUnit;
|
||||
static getNewton(): MeasurementUnit;
|
||||
static getDefaultMeasurementUnitsCount(): number;
|
||||
static getDefaultMeasurementUnitAtIndex(index: number): MeasurementUnit;
|
||||
|
||||
@@ -17,6 +17,7 @@ declare class gdMeasurementUnit {
|
||||
static getPixel(): gdMeasurementUnit;
|
||||
static getPixelSpeed(): gdMeasurementUnit;
|
||||
static getPixelAcceleration(): gdMeasurementUnit;
|
||||
static getAngularSpeed(): gdMeasurementUnit;
|
||||
static getNewton(): gdMeasurementUnit;
|
||||
static getDefaultMeasurementUnitsCount(): number;
|
||||
static getDefaultMeasurementUnitAtIndex(index: number): gdMeasurementUnit;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m7 0-6 3.5v7l6 3.5 6-3.5v-7z" fill="#55b1e0" style="paint-order:normal"/><path d="m7.001 0.289 5.75 3.355v6.711l-5.75 3.355-5.75-3.355v-6.711z" fill="#2e388a" style="paint-order:normal"/><path d="m9.595 4.129c-0.075-0.2212-0.285-0.3788-0.5325-0.3788h-4.125c-0.2475 0-0.4538 0.1575-0.5325 0.3788l-0.78 2.246v3c0 0.2062 0.1688 0.375 0.375 0.375h0.375c0.2062 0 0.375-0.1688 0.375-0.375v-0.375h4.5v0.375c0 0.2062 0.1688 0.375 0.375 0.375h0.375c0.2062 0 0.375-0.1688 0.375-0.375v-3zm-4.658 3.746c-0.3112 0-0.5625-0.2512-0.5625-0.5625s0.2512-0.5625 0.5625-0.5625 0.5625 0.2512 0.5625 0.5625-0.2512 0.5625-0.5625 0.5625zm4.125 0c-0.3112 0-0.5625-0.2512-0.5625-0.5625s0.2512-0.5625 0.5625-0.5625 0.5625 0.2512 0.5625 0.5625-0.2512 0.5625-0.5625 0.5625zm-4.688-1.875 0.5625-1.688h4.125l0.5625 1.688z" fill="#55b1e0" stroke-width=".375"/></svg>
|
||||
|
After Width: | Height: | Size: 1001 B |
@@ -17,7 +17,7 @@ const gd: libGDevelop = global.gd;
|
||||
|
||||
type Props = BehaviorEditorProps;
|
||||
|
||||
const areAdvancedPropertiesModified = (behavior: gdBehavior) => {
|
||||
export const areAdvancedPropertiesModified = (behavior: gdBehavior) => {
|
||||
const behaviorMetadata = gd.MetadataProvider.getBehaviorMetadata(
|
||||
gd.JsPlatform.get(),
|
||||
behavior.getTypeName()
|
||||
|
||||
@@ -16,6 +16,12 @@ import useForceUpdate from '../../../Utils/UseForceUpdate';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import ButtonGroup from '@material-ui/core/ButtonGroup';
|
||||
import { NumericProperty, UnitAdornment } from '../Physics2Editor';
|
||||
import {
|
||||
Accordion,
|
||||
AccordionHeader,
|
||||
AccordionBody,
|
||||
} from '../../../UI/Accordion';
|
||||
import { areAdvancedPropertiesModified } from '../BehaviorPropertiesEditor';
|
||||
|
||||
type Props = BehaviorEditorProps;
|
||||
|
||||
@@ -57,6 +63,11 @@ const Physics3DEditor = (props: Props) => {
|
||||
const { behavior, onBehaviorUpdated } = props;
|
||||
const forceUpdate = useForceUpdate();
|
||||
|
||||
const areAdvancedPropertiesExpandedByDefault = React.useMemo(
|
||||
() => areAdvancedPropertiesModified(behavior),
|
||||
[behavior]
|
||||
);
|
||||
|
||||
const updateBehaviorProperty = React.useCallback(
|
||||
(property, value) => {
|
||||
behavior.updateProperty(property, value);
|
||||
@@ -244,6 +255,18 @@ const Physics3DEditor = (props: Props) => {
|
||||
)
|
||||
}
|
||||
/>
|
||||
<NumericProperty
|
||||
id="physics3d-parameter-mass-override"
|
||||
properties={properties}
|
||||
propertyName={'massOverride'}
|
||||
step={0.1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty(
|
||||
'massOverride',
|
||||
parseFloat(newValue) > 0 ? newValue : '0'
|
||||
)
|
||||
}
|
||||
/>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'gravityScale'}
|
||||
@@ -356,6 +379,72 @@ const Physics3DEditor = (props: Props) => {
|
||||
disabled={isStatic}
|
||||
/>
|
||||
</Line>
|
||||
<Accordion
|
||||
defaultExpanded={areAdvancedPropertiesExpandedByDefault}
|
||||
noMargin
|
||||
>
|
||||
<AccordionHeader noMargin>
|
||||
<Text size="sub-title">
|
||||
<Trans>Advanced properties</Trans>
|
||||
</Text>
|
||||
</AccordionHeader>
|
||||
<AccordionBody disableGutters>
|
||||
<Column expand noMargin>
|
||||
<ResponsiveLineStackLayout>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'shapeOffsetX'}
|
||||
step={1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty('shapeOffsetX', newValue)
|
||||
}
|
||||
/>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'shapeOffsetY'}
|
||||
step={1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty('shapeOffsetY', newValue)
|
||||
}
|
||||
/>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'shapeOffsetZ'}
|
||||
step={1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty('shapeOffsetZ', newValue)
|
||||
}
|
||||
/>
|
||||
</ResponsiveLineStackLayout>
|
||||
<ResponsiveLineStackLayout>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'massCenterOffsetX'}
|
||||
step={1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty('massCenterOffsetX', newValue)
|
||||
}
|
||||
/>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'massCenterOffsetY'}
|
||||
step={1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty('massCenterOffsetY', newValue)
|
||||
}
|
||||
/>
|
||||
<NumericProperty
|
||||
properties={properties}
|
||||
propertyName={'massCenterOffsetZ'}
|
||||
step={1}
|
||||
onUpdate={newValue =>
|
||||
updateBehaviorProperty('massCenterOffsetZ', newValue)
|
||||
}
|
||||
/>
|
||||
</ResponsiveLineStackLayout>
|
||||
</Column>
|
||||
</AccordionBody>
|
||||
</Accordion>
|
||||
</Column>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -292,7 +292,7 @@ const propertyKeywordCouples: Array<Array<string>> = [
|
||||
['Width', 'Height', 'Depth'],
|
||||
['Top', 'Bottom'],
|
||||
['Left', 'Right'],
|
||||
['Front', 'Back'],
|
||||
['Back', 'Front'],
|
||||
['Up', 'Down'],
|
||||
['Min', 'Max'],
|
||||
['Low', 'High'],
|
||||
@@ -305,6 +305,12 @@ const propertyKeywordCouples: Array<Array<string>> = [
|
||||
['JumpSpeed', 'JumpSustainTime'],
|
||||
['XGrabTolerance', 'YGrabOffset'],
|
||||
['MaxSpeed', 'SlopeMaxAngle'],
|
||||
['Beginning', 'End'],
|
||||
['Start', 'End'],
|
||||
['Rear', 'Front'],
|
||||
['1', '2'],
|
||||
['3', '4'],
|
||||
['5', '6'],
|
||||
];
|
||||
|
||||
const uncapitalize = str => {
|
||||
|
||||
Reference in New Issue
Block a user