Skip to content

Commit

Permalink
shadow geometry WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed May 7, 2024
1 parent d58dc9a commit 852f2eb
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/shapes/Object/ObjectGeometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,38 @@ import { makeBoundingBoxFromPoints } from '../../util/misc/boundingBoxFromPoints
import { ObjectTransformations } from './ObjectTransformations';
import { ViewportBBox } from '../../BBox/ViewportBBox';
import { Intersection } from '../../Intersection';
import type { Shadow } from '../../Shadow';

export class ObjectGeometry<
EventSpec extends ObjectEvents = ObjectEvents
> extends ObjectTransformations<EventSpec> {
declare shadow?: Shadow;

// @TODO: shadow geometry
// getShadowData() {
// if (!this.shadow) {
// return;
// }

// const {offsetX,offsetY,blur,nonScaling} = this.shadow;
// var sx = 1,
// sy = 1;
// if (!nonScaling) {
// var scaling = this.getTotalObjectScaling();
// sx = scaling.x;
// sy = scaling.y;
// }
// const shadowOffset = new Point(
// this.shadow.offsetX * sx,
// this.shadow.offsetY * sy
// ),
// blurOffset = new Point(blur * sx, blur * sy);
// return {
// offset: shadowOffset,
// blur: blurOffset,
// };
// }

/**
* Checks if object intersects with the scene rect formed by {@link tl} and {@link br}
*/
Expand Down

0 comments on commit 852f2eb

Please sign in to comment.