One Logo Pool Ball
SpriteKit · IOS API REFERENCE

SKTexture

class · SDK 27.1

class SKTexture

Members (22)

static

preload

TypeScript
static preloadWithCompletionHandler(textures: Array<SKTexture>, completionHandler: (() => void)): void
Swift declaration
class func preload(_ textures: [SKTexture]) async
init · iOS 8.0+

init

TypeScript
static initNoiseWithSmoothnessSizeGrayscale(smoothness: number, size: { width: number; height: number }, grayscale: boolean): SKTexture
Swift declaration
convenience init(noiseWithSmoothness smoothness: CGFloat, size: CGSize, grayscale: Bool)
init · iOS 8.0+

init

TypeScript
static initVectorNoiseWithSmoothnessSize(smoothness: number, size: { width: number; height: number }): SKTexture
Swift declaration
convenience init(vectorNoiseWithSmoothness smoothness: CGFloat, size: CGSize)
init

init

TypeScript
static initCgImage(image: _CoreGraphics_CGImage): SKTexture
Swift declaration
convenience init(cgImage image: CGImage)
init

init

TypeScript
static initDataSize(pixelData: ArrayBuffer, size: { width: number; height: number }): SKTexture
Swift declaration
convenience init(data pixelData: Data, size: CGSize)
init

init

TypeScript
static initDataSizeFlipped(pixelData: ArrayBuffer, size: { width: number; height: number }, flipped: boolean): SKTexture
Swift declaration
convenience init(data pixelData: Data, size: CGSize, flipped: Bool)
init

init

TypeScript
static initDataSizeRowLengthAlignment(pixelData: ArrayBuffer, size: { width: number; height: number }, rowLength: number, alignment: number): SKTexture
Swift declaration
convenience init(data pixelData: Data, size: CGSize, rowLength: UInt32, alignment: UInt32)
init

init

TypeScript
static initImage(image: _UIKit_UIImage): SKTexture
Swift declaration
convenience init(image: UIImage)
init

init

TypeScript
static initImageNamed(name: string): SKTexture
Swift declaration
convenience init(imageNamed name: String)
init

init

TypeScript
static initRectIn(rect: { x: number; y: number; width: number; height: number }, texture: SKTexture): SKTexture
Swift declaration
convenience init(rect: CGRect, in texture: SKTexture)
method · iOS 9.0+

cgImage

TypeScript
cgImage(): _CoreGraphics_CGImage
Swift declaration
func cgImage() -> CGImage
method

preload

TypeScript
preloadCompletionHandler(completionHandler: (() => void)): void
Swift declaration
func preload() async
method

size

TypeScript
size(): { width: number; height: number }
Swift declaration
func size() -> CGSize
method

applying

TypeScript
applying(filter: _CoreImage_CIFilter): SKTexture
Swift declaration
func applying(_ filter: CIFilter) -> Self
method · iOS 8.0+

generatingNormalMap

TypeScript
generatingNormalMap(): SKTexture
Swift declaration
func generatingNormalMap() -> Self
method · iOS 8.0+

generatingNormalMap

TypeScript
generatingNormalMapWithSmoothnessContrast(smoothness: number, contrast: number): SKTexture
Swift declaration
func generatingNormalMap(withSmoothness smoothness: CGFloat, contrast: CGFloat) -> Self
method

textureRect

TypeScript
textureRect(): { x: number; y: number; width: number; height: number }
Swift declaration
func textureRect() -> CGRect
get

filteringMode

TypeScript
get filteringMode(): SKTextureFilteringMode
Swift declaration
var filteringMode: SKTextureFilteringMode { get set }
set

filteringMode

TypeScript
set filteringMode(value: SKTextureFilteringMode)
Swift declaration
var filteringMode: SKTextureFilteringMode { get set }
get

usesMipmaps

TypeScript
get usesMipmaps(): boolean
Swift declaration
var usesMipmaps: Bool { get set }
set

usesMipmaps

TypeScript
set usesMipmaps(value: boolean)
Swift declaration
var usesMipmaps: Bool { get set }
get

customPlaygroundQuickLook

TypeScript
get customPlaygroundQuickLook(): SDKHandle
Swift declaration
var customPlaygroundQuickLook: PlaygroundQuickLook { get }

A custom playground Quick Look for this instance. If this type has value semantics, the `PlaygroundQuickLook` instance should be unaffected by subsequent mutations.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SKTexture.init()

inherited init: cannot prove legal (class declares 11 custom initializers)

All SpriteKit types →