Skip to main content

Ricochet2DOptions

@zylem/game-lib


@zylem/game-lib / behavior / Ricochet2DOptions

Interface: Ricochet2DOptions

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:183

Properties​

maxAngleDeg​

maxAngleDeg: number

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:210

Maximum deflection angle in degrees for angled mode. Default: 60


maxSpeed​

maxSpeed: number

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:193

Maximum speed after reflection. Default: 20


minSpeed​

minSpeed: number

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:188

Minimum speed after reflection. Default: 2


reflectionMode​

reflectionMode: "simple" | "angled"

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:205

Reflection mode:

  • 'simple': Basic axis inversion
  • 'angled': Paddle-style deflection based on contact point Default: 'angled'

speedMultiplier​

speedMultiplier: number

Defined in: node_modules/.pnpm/@zylem+behaviors@0.8.9_@types+react@19.3.0_react@19.3.0_three@0.185.1/node_modules/@zylem/behaviors/dist/ricochet-2d.d.ts:198

Speed multiplier applied during angled reflection. Default: 1.05