Home Reference Source Repository
import SCNSceneExportDelegate from 'jscenekit/js/SceneKit/SCNSceneExportDelegate.js'
public interface | source

SCNSceneExportDelegate

Methods you can implement to participate in the process of exporting a scene to a file.

See:

Method Summary

Public Methods
public

writeWithSceneDocumentURL(image: Image, documentURL: string, originalImageURL: string): string

If you implement this method, Scene Kit calls it for each image (for example, a texture) attached to the scene.

Public Methods

public writeWithSceneDocumentURL(image: Image, documentURL: string, originalImageURL: string): string source

If you implement this method, Scene Kit calls it for each image (for example, a texture) attached to the scene. Your app can then save the image data in a location and format of your choice, returning a URL for the exported image file.If you do not provide a delegate when exporting a scene, or if your delegate returns nil from this method, Scene Kit exports the image in a default format to a default location.

Params:

NameTypeAttributeDescription
image Image

An image attached to the scene being exported.

documentURL string

The URL the scene is being exported to.

originalImageURL string
  • nullable: true

The URL the image was originally loaded from, or nil if the image was not previously loaded from a URL.

Return:

string (nullable: true)

See: