shapeCastResult.js 603 B

123456789101112131415161718192021222324
  1. import { CastingResult } from "./castingResult.js";
  2. /**
  3. * Class representing a contact point produced in a shape cast
  4. */
  5. export class ShapeCastResult extends CastingResult {
  6. constructor() {
  7. super(...arguments);
  8. this._hitFraction = 0;
  9. }
  10. /**
  11. * Gets the hit fraction along the casting ray
  12. */
  13. get hitFraction() {
  14. return this._hitFraction;
  15. }
  16. /**
  17. * Sets the hit fraction along the casting ray
  18. * @param fraction
  19. */
  20. setHitFraction(fraction) {
  21. this._hitFraction = fraction;
  22. }
  23. }
  24. //# sourceMappingURL=shapeCastResult.js.map