Fix physics
This commit is contained in:
parent
37954e2ef1
commit
f9f6825776
51 changed files with 832 additions and 541 deletions
|
|
@ -1,19 +1,54 @@
|
|||
import { vec2 } from 'gl-matrix';
|
||||
import { rgb255 } from './helper/rgb255';
|
||||
|
||||
export const settings = {
|
||||
lightCutoffDistance: 600,
|
||||
hitDetectionCirclePointCount: 32,
|
||||
hitDetectionMaxOverlap: 0.01,
|
||||
physicsMaxStep: 5,
|
||||
gravitationalForce: vec2.fromValues(0, -200),
|
||||
maxVelocityX: 500,
|
||||
maxVelocityY: 750,
|
||||
maxAccelerationX: 16000,
|
||||
maxAccelerationY: 5500,
|
||||
targetPhysicsDeltaTimeInMilliseconds: 15,
|
||||
gravitationalForce: vec2.fromValues(0, -3000),
|
||||
maxVelocityX: 4800,
|
||||
maxVelocityY: 3650,
|
||||
polygonEdgeCount: 8,
|
||||
projectileSpeed: 2000,
|
||||
projectileStartOffset: 150,
|
||||
playerColorIndexOffset: 3,
|
||||
worldLeftEdge: -5000,
|
||||
worldRightEdge: 5000,
|
||||
backgroundGradient: [rgb255(255, 117, 129), rgb255(136, 117, 255)],
|
||||
playerColors: [
|
||||
rgb255(107, 48, 188),
|
||||
rgb255(56, 254, 220),
|
||||
rgb255(197, 17, 17),
|
||||
rgb255(24, 24, 24),
|
||||
rgb255(245, 245, 88),
|
||||
rgb255(80, 239, 58),
|
||||
rgb255(18, 127, 45),
|
||||
rgb255(240, 125, 13),
|
||||
rgb255(214, 227, 241),
|
||||
rgb255(0, 161, 161),
|
||||
rgb255(250, 161, 151),
|
||||
rgb255(235, 84, 185),
|
||||
rgb255(114, 73, 30),
|
||||
rgb255(75, 75, 75),
|
||||
rgb255(107, 48, 188),
|
||||
rgb255(56, 254, 220),
|
||||
rgb255(197, 17, 17),
|
||||
rgb255(24, 24, 24),
|
||||
rgb255(245, 245, 88),
|
||||
rgb255(80, 239, 58),
|
||||
rgb255(18, 127, 45),
|
||||
rgb255(240, 125, 13),
|
||||
rgb255(214, 227, 241),
|
||||
rgb255(0, 161, 161),
|
||||
rgb255(250, 161, 151),
|
||||
rgb255(235, 84, 185),
|
||||
rgb255(114, 73, 30),
|
||||
rgb255(75, 75, 75),
|
||||
],
|
||||
maxAccelerationX: 200000,
|
||||
maxAccelerationY: 20500,
|
||||
targetPhysicsDeltaTimeInMilliseconds: 20,
|
||||
minPhysicsSleepTime: 4,
|
||||
velocityAttenuation: 0.5,
|
||||
frictionMinVelocity: 400,
|
||||
velocityAttenuation: 0.33,
|
||||
inViewAreaSize: 1920 * 1080 * 3,
|
||||
defaultJumpEnergy: 0.75,
|
||||
defaultJumpEnergy: 0.25,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue