Preparing search index...
The search index is not available
TypeSpriteJS Game Engine - API
TypeSpriteJS Game Engine - API
CollisionRect
Class CollisionRect
Hierarchy
CollisionShape
CollisionRect
Index
Constructors
constructor
Properties
h
w
x
y
Accessors
bottom
left
right
shape
Type
top
Methods
contains
copy
create
Quadrant
enclose
Point
intersects
set
Values
Constructors
constructor
new
Collision
Rect
(
x
?:
number
, y
?:
number
, w
?:
number
, h
?:
number
)
:
CollisionRect
Parameters
x:
number
= 0
y:
number
= 0
w:
number
= 0
h:
number
= 0
Returns
CollisionRect
Properties
h
h
:
number
= 0
w
w
:
number
= 0
x
x
:
number
= 0
y
y
:
number
= 0
Accessors
bottom
get
bottom
(
)
:
number
Returns
number
left
get
left
(
)
:
number
Returns
number
right
get
right
(
)
:
number
Returns
number
shape
Type
get
shapeType
(
)
:
ShapeType
Returns
ShapeType
top
get
top
(
)
:
number
Returns
number
Methods
contains
contains
(
other
:
CollisionShape
)
:
boolean
true if the other object is completely inside the rectangle
Parameters
other:
CollisionShape
Returns
boolean
copy
copy
(
)
:
CollisionRect
Returns
CollisionRect
create
Quadrant
create
Quadrant
(
index
:
number
)
:
CollisionRect
Parameters
index:
number
Returns
CollisionRect
enclose
Point
enclose
Point
(
x
:
number
, y
:
number
)
:
void
Parameters
x:
number
y:
number
Returns
void
intersects
intersects
(
other
:
CollisionShape
)
:
boolean
Parameters
other:
CollisionShape
Returns
boolean
set
Values
set
Values
(
x
:
number
, y
:
number
, w
:
number
, h
:
number
)
:
CollisionRect
Parameters
x:
number
y:
number
w:
number
h:
number
Returns
CollisionRect
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
Type
SpriteJS
Game
Engine -
API
Collision
Rect
constructor
h
w
x
y
bottom
left
right
shape
Type
top
contains
copy
create
Quadrant
enclose
Point
intersects
set
Values
Generated using
TypeDoc
true if the other object is completely inside the rectangle