PS2ViewerOptions

Represents options to customize the synth that is displayed.


Properties

Name Type Description
pathToWorker string path to worker js file ('PS2PacketPlayer.worker.min.js')
Default: "" (you need to provide this value)
width number width in pixel
Default: -1 (auto = use container width or 800)
height number height in pixel
Default: -1 (auto = use container height or 500)
autoLoad boolean A boolean value indicating if the viewer should start loading the synth immediately. Set it to false if you want to have a 'click to load' behavior.
Default: true
autoStart boolean A boolean value indicating if the viewer should start playing the synth as soon as it's loaded.
Default: true
debugMenuEnabled boolean A boolean value indicating if the hidden debug menu is enabled. (type 4 then 2 to see the menu)
Default: false
loggingEnabled boolean A boolean value indicating if the viewer should display some debug information in the console
Default: false
annotateEnabled boolean A boolean value indicating if the viewer should display an annotate button in the toolbar
Default: false
autoResizeEnabled boolean A boolean value indicating if the viewer should resize itself when the browser window is resized (only useful if the viewer is using the whole screen, ie: you initialized it with (width=window.innerWidth and heigth=window.innerHeight)
Default: false
presetGPU PresetGPU Object Description missing + need help for Custom mode
Default: PS.Packet.PresetGPU.Laptop

Example

			
var _container = document.getElementById("viewer-container");

var _viewer = new Photosynth.PS2Viewer(_container, {
	pathToWorker: "js/PS2PacketPlayer.worker.min.js"
});
_viewer.loadGuid("676195e2-64ca-43f5-80ba-a7cb7b10e3aa");