Cocos Creator
手册文档
API 参考
Cocos Creator 3D
手册文档
API 参考
Cocos2d-x
手册文档
API 参考
Version: 3.1
Version: 3.5
Version: 3.4
Version: 3.3
Version: 3.2
Version: 3.0
Version: 2.4
Version: 2.3
Version: 2.2
Version: 2.1
Version: 2.0
Version: 1.10
Version: 1.9
Search
Preparing search index...
The search index is not available
CocosCreatorAPI
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
physics2d
IPhysicsWorld
Interface IPhysicsWorld
Hierarchy
IPhysicsWorld
Implemented by
b2PhysicsWorld
Index
Properties
debug
Draw
Flags
impl
set
Allow
Sleep
set
Gravity
Methods
draw
Debug
raycast
step
sync
Physics
ToScene
sync
Scene
ToPhysics
testAABB
test
Point
Properties
debug
Draw
Flags
debug
Draw
Flags
:
number
Readonly
impl
impl
:
any
set
Allow
Sleep
set
Allow
Sleep
:
(
v
:
boolean
)
=>
void
Type declaration
(
v
:
boolean
)
:
void
Parameters
v:
boolean
Returns
void
set
Gravity
set
Gravity
:
(
v
:
IVec2Like
)
=>
void
Type declaration
(
v
:
IVec2Like
)
:
void
Parameters
v:
IVec2Like
Returns
void
Methods
draw
Debug
draw
Debug
(
)
:
void
Returns
void
raycast
raycast
(
p1
:
IVec2Like
, p2
:
IVec2Like
, type
:
ERaycast2DType
, mask
:
number
)
:
RaycastResult2D
[]
Parameters
p1:
IVec2Like
p2:
IVec2Like
type:
ERaycast2DType
mask:
number
Returns
RaycastResult2D
[]
step
step
(
deltaTime
:
number
, velocityIterations
?:
undefined
|
number
, positionIterations
?:
undefined
|
number
)
:
void
Parameters
deltaTime:
number
Optional
velocityIterations:
undefined
|
number
Optional
positionIterations:
undefined
|
number
Returns
void
sync
Physics
ToScene
sync
Physics
ToScene
(
)
:
void
Returns
void
sync
Scene
ToPhysics
sync
Scene
ToPhysics
(
)
:
void
Returns
void
testAABB
testAABB
(
rect
:
Rect
)
:
readonly
Collider2D
[]
Parameters
rect:
Rect
Returns
readonly
Collider2D
[]
test
Point
test
Point
(
p
:
Vec2
)
:
readonly
Collider2D
[]
Parameters
p:
Vec2
Returns
readonly
Collider2D
[]
Globals
physics2d
box2d
IPhysics
World
debug
Draw
Flags
impl
set
Allow
Sleep
set
Gravity
draw
Debug
raycast
step
sync
Physics
ToScene
sync
Scene
ToPhysics
testAABB
test
Point
Generated using
TypeDoc