Options
All
  • Public
  • Public/Protected
  • All
Menu
name

PlayCanvas

description

PlayCanvasのREST APIを操作

param
param
param
param
param
example
BASIC import PlayCanvas from 'playcanvas-node' const playcanvas = new PlayCanvas(options)
returns

PlayCanvas

Hierarchy

  • PlayCanvas

Index

Constructors

constructor

  • new PlayCanvas(__namedParameters: object): PlayCanvas
  • Parameters

    • __namedParameters: object
      • accessToken: string
      • branchId: string
      • projectId: number
      • projectName: string
      • scenes: number[]

    Returns PlayCanvas

Properties

accessToken

accessToken: string

Optional assetId

assetId: string

Optional branchId

branchId: string

headers

headers: object

Type declaration

  • Authorization: string
  • Content-Type: string

Optional projectId

projectId: number

Optional projectName

projectName: string

Optional resourceUrl

resourceUrl: string

Optional scenes

scenes: Array<number>

Methods

archiveProject

  • archiveProject(id: number): Promise<any>
  • function
    name

    PlayCanvas#archiveProject

    description

    This will allow you to download a zip archive of your entire project. You can import that archive from your Projects Dashboard to create a new Project from that archive.

    Parameters

    • id: number

    Returns Promise<any>

Private createAsset

  • createAsset(__namedParameters: object): Promise<any>
  • function
    name

    PlayCanvas#createAsset

    description

    Create a new asset.

    Parameters

    • __namedParameters: object
      • name: string
      • parent: number
      • path: string
      • preload: boolean

    Returns Promise<any>

createNewAsset

  • createNewAsset(options: object): Promise<any>
  • Parameters

    • options: object
      • name: string
      • Optional parent?: number
      • path: string

    Returns Promise<any>

createNewFile

  • createNewFile(__namedParameters: object): Promise<any>
  • function
    name

    PlayCanvas#createAsset

    description

    Create a new asset.

    Parameters

    • __namedParameters: object
      • asset: object
        • file: string
        • script: string
      • name: string
      • parent: number
      • preload: boolean

    Returns Promise<any>

deleteAsset

  • deleteAsset(assetId: number): Promise<any>
  • function
    name

    PlayCanvas#deleteAsset

    description

    Permanently delete an asset from a branch of your project. Warning deleting an asset is permanent and unrecoverable unless you have taken a checkpoint of it.

    Parameters

    • assetId: number

    Returns Promise<any>

downloadApp

  • downloadApp(): Promise<any>

getApp

  • getApp(id: number): Promise<any>
  • function
    name

    PlayCanvas#getApp

    description

    Gets a published App by id.

    Parameters

    • id: number

    Returns Promise<any>

getAssetFile

  • getAssetFile(assetId: number): Promise<any>
  • function
    name

    PlayCanvas#getAssetFile

    description

    Get the details of a single asset

    Parameters

    • assetId: number

    Returns Promise<any>

getAssets

  • getAssets(assetId: number): Promise<any>
  • function
    name

    PlayCanvas#getAssets

    description

    Get the details of a single asset

    Parameters

    • assetId: number

    Returns Promise<any>

getJob

  • getJob(id: number): Promise<any>
  • function
    name

    PlayCanvas#getJob

    description

    Gets a Job by id.

    Parameters

    • id: number

    Returns Promise<any>

getListAssets

  • getListAssets(): Promise<unknown[]>

getPrimaryApp

  • getPrimaryApp(): Promise<any>

getProjectApp

  • getProjectApp(): Promise<any>

Private listAssets

  • listAssets(): Promise<any>
  • function
    name

    PlayCanvas#listAssets

    description

    Get the details of all assets in a project for a specific branch

    Returns Promise<any>

listBranches

  • listBranches(): Promise<any>
  • function
    name

    PlayCanvas#listBranches

    description

    Get a list of all open branches for a project

    Returns Promise<any>

listScenes

  • listScenes(): Promise<any>
  • function
    name

    PlayCanvas#listScenes

    description

    Get a list of all scenes for a project

    Returns Promise<any>

updateAsset

  • updateAsset(__namedParameters: object): Promise<any>
  • function
    name

    PlayCanvas#updateAsset

    description

    Update an existing asset's file.

    Parameters

    • __namedParameters: object
      • assetId: any
      • path: any

    Returns Promise<any>

updateAssets

  • updateAssets(remotePath: string, name: string, path: string): Promise<any>
  • Parameters

    • remotePath: string
    • name: string
    • path: string

    Returns Promise<any>

uploadScript

  • uploadScript(__namedParameters: object): Promise<any>
  • Parameters

    • __namedParameters: object
      • name: string
      • parent: number
      • script: string

    Returns Promise<any>

Static scenes

  • scenes(__namedParameters: object): Promise<void>
  • Parameters

    • __namedParameters: object
      • projectId: any

    Returns Promise<void>

Generated using TypeDoc