add
TypeScriptadd(joint: SKPhysicsJoint): voidSwift declarationfunc add(_ joint: SKPhysicsJoint)class · SDK 27.1
class SKPhysicsWorldadd(joint: SKPhysicsJoint): voidSwift declarationfunc add(_ joint: SKPhysicsJoint)bodyAlongRayStartEnd(start: { x: number; y: number }, end: { x: number; y: number }): (SKPhysicsBody) | nullSwift declarationfunc body(alongRayStart start: CGPoint, end: CGPoint) -> SKPhysicsBody?bodyAt(point: { x: number; y: number }): (SKPhysicsBody) | nullSwift declarationfunc body(at point: CGPoint) -> SKPhysicsBody?bodyIn(rect: { x: number; y: number; width: number; height: number }): (SKPhysicsBody) | nullSwift declarationfunc body(in rect: CGRect) -> SKPhysicsBody?static init(): SKPhysicsWorldSwift declarationinit()removeAllJoints(): voidSwift declarationfunc removeAllJoints()remove(joint: SKPhysicsJoint): voidSwift declarationfunc remove(_ joint: SKPhysicsJoint)sampleFields(position: SDKHandle): SDKHandleSwift declarationfunc sampleFields(at position: vector_float3) -> vector_float3get contactDelegate(): (SDKHandle) | nullSwift declarationunowned(unsafe) var contactDelegate: (any SKPhysicsContactDelegate)? { get set }set contactDelegate(value: (Implements<SKPhysicsContactDelegate> | SDKHandle) | null)Swift declarationunowned(unsafe) var contactDelegate: (any SKPhysicsContactDelegate)? { get set }get gravity(): { dx: number; dy: number }Swift declarationvar gravity: CGVector { get set }set gravity(value: { dx: number; dy: number })Swift declarationvar gravity: CGVector { get set }get speed(): numberSwift declarationvar speed: CGFloat { get set }set speed(value: number)Swift declarationvar speed: CGFloat { get set }3 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SKPhysicsWorld.enumerateBodies(at:using:)
synchronous callback requires a nonescaping JS-thread call
SKPhysicsWorld.enumerateBodies(in:using:)
synchronous callback requires a nonescaping JS-thread call
SKPhysicsWorld.enumerateBodies(alongRayStart:end:using:)
synchronous callback requires a nonescaping JS-thread call