Heratio Framework API Reference

Model3DService
in package

Model3DService

Handles 3D model operations including upload, viewing, hotspots, and IIIF 3D manifest generation

Tags
author

Johan Pieterse - The Archive and Heritage Group

Table of Contents

Methods

__construct()  : mixed
addHotspot()  : int|null
Add a hotspot to a model
deleteHotspot()  : bool
Delete a hotspot
deleteModel()  : bool
Delete a 3D model
generateIiif3DManifest()  : array<string|int, mixed>|null
Generate IIIF 3D manifest for a model Based on IIIF 3D TSG (Technical Specification Group) draft
getHotspots()  : array<string|int, mixed>
Get all hotspots for a model
getModel()  : object|null
Get a single 3D model by ID
getModelCount()  : int
Get model count for object
getModelsForObject()  : array<string|int, mixed>
Get all 3D models for an information object
getModelViewerHtml()  : string
Get HTML for model-viewer component (Google's WebXR viewer)
getPrimaryModel()  : object|null
Get primary 3D model for an object
getSetting()  : mixed
getSupportedFormats()  : array<string|int, mixed>
Get all supported formats
getThreeJsViewerHtml()  : string
Get HTML for Three.js fallback viewer
hasModels()  : bool
Check if object has any 3D models
isFormatSupported()  : bool
Check if format is supported
updateModel()  : bool
Update a 3D model's settings
updateSetting()  : bool
uploadModel()  : int|null
Upload and save a new 3D model

Methods

addHotspot()

Add a hotspot to a model

public addHotspot(int $modelId, array<string|int, mixed> $data, int $userId) : int|null
Parameters
$modelId : int
$data : array<string|int, mixed>
$userId : int
Return values
int|null

deleteHotspot()

Delete a hotspot

public deleteHotspot(int $hotspotId, int $userId) : bool
Parameters
$hotspotId : int
$userId : int
Return values
bool

deleteModel()

Delete a 3D model

public deleteModel(int $modelId, int $userId) : bool
Parameters
$modelId : int
$userId : int
Return values
bool

generateIiif3DManifest()

Generate IIIF 3D manifest for a model Based on IIIF 3D TSG (Technical Specification Group) draft

public generateIiif3DManifest(int $modelId, string $baseUrl[, string $culture = 'en' ]) : array<string|int, mixed>|null
Parameters
$modelId : int
$baseUrl : string
$culture : string = 'en'
Return values
array<string|int, mixed>|null

getHotspots()

Get all hotspots for a model

public getHotspots(int $modelId[, string $culture = 'en' ]) : array<string|int, mixed>
Parameters
$modelId : int
$culture : string = 'en'
Return values
array<string|int, mixed>

getModel()

Get a single 3D model by ID

public getModel(int $modelId[, string $culture = 'en' ]) : object|null
Parameters
$modelId : int
$culture : string = 'en'
Return values
object|null

getModelCount()

Get model count for object

public getModelCount(int $objectId) : int
Parameters
$objectId : int
Return values
int

getModelsForObject()

Get all 3D models for an information object

public getModelsForObject(int $objectId[, string $culture = 'en' ]) : array<string|int, mixed>
Parameters
$objectId : int
$culture : string = 'en'
Return values
array<string|int, mixed>

getModelViewerHtml()

Get HTML for model-viewer component (Google's WebXR viewer)

public getModelViewerHtml(int $modelId[, array<string|int, mixed> $options = [] ]) : string
Parameters
$modelId : int
$options : array<string|int, mixed> = []
Return values
string

getPrimaryModel()

Get primary 3D model for an object

public getPrimaryModel(int $objectId[, string $culture = 'en' ]) : object|null
Parameters
$objectId : int
$culture : string = 'en'
Return values
object|null

getSetting()

public getSetting(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null

getSupportedFormats()

Get all supported formats

public getSupportedFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

getThreeJsViewerHtml()

Get HTML for Three.js fallback viewer

public getThreeJsViewerHtml(int $modelId[, array<string|int, mixed> $options = [] ]) : string
Parameters
$modelId : int
$options : array<string|int, mixed> = []
Return values
string

hasModels()

Check if object has any 3D models

public hasModels(int $objectId) : bool
Parameters
$objectId : int
Return values
bool

isFormatSupported()

Check if format is supported

public isFormatSupported(string $format) : bool
Parameters
$format : string
Return values
bool

updateModel()

Update a 3D model's settings

public updateModel(int $modelId, array<string|int, mixed> $data, int $userId) : bool
Parameters
$modelId : int
$data : array<string|int, mixed>
$userId : int
Return values
bool

updateSetting()

public updateSetting(string $key, mixed $value[, string $type = 'string' ]) : bool
Parameters
$key : string
$value : mixed
$type : string = 'string'
Return values
bool

uploadModel()

Upload and save a new 3D model

public uploadModel(array<string|int, mixed> $data, array<string|int, mixed> $file, int $userId) : int|null
Parameters
$data : array<string|int, mixed>
$file : array<string|int, mixed>
$userId : int
Return values
int|null

        
On this page

Search results