STATUS ÜBERPRÜFEN
I AM LISTENING TO
|

iPanorama 360 – Events / API

4. April 2024
.SHARE

Table of Contents

Extending iPanorama 360 can be a challenge, as none of the events are documented. You can talk to the developer or ask for support to get things done. 

You can also read up on the core assets used:
ipanorama.min.js 
jquery.ipanorama.min.js

You can easily search for the events and figure out the parameters passed. Here a quick reference for things I used so far.

Main Events

ipanorama:ready
ipanorama:config
ipanorama:fullscreen
ipanorama:mode
ipanorama:transform-mode-changed

Tooltip Events

ipanorama:tooltip-show
ipanorama:tooltip-hide

Popover Events

ipanorama:popover-show
ipanorama:popover-hide

Scene / Camera Events

ipanorama:scene-before-load
ipanorama:scene-after-load
ipanorama:scene-progress
ipanorama:scene-error
ipanorama:scene-show-start
ipanorama:scene-show-complete
ipanorama:scene-hide-start
ipanorama:scene-hide-complete
ipanorama:scene-clear
ipanorama:scene-index

ipanorama:scene-point-add
ipanorama:scene-point-remove
ipanorama:scene-point-dragstart
ipanorama:scene-point-dragend
ipanorama:scene-point-select
ipanorama:scene-point-deselect
ipanorama:scene-point-hide
ipanorama:scene-point-show
ipanorama:scene-point-change

ipanorama:scene-plane-add
ipanorama:scene-plane-remove
ipanorama:scene-plane-dragstart
ipanorama:scene-plane-dragend
ipanorama:scene-plane-select
ipanorama:scene-plane-deselect

ipanorama:scene-camera-start
ipanorama:scene-camera-end
ipanorama:scene-camera-change

Some Examples

Lock rotation

var instance = this,
$ = jQuery;

instance.$container.on("ipanorama:scene-after-load", function(e, data) {
    data.scene.control.minPolarAngle = 90 * Math.PI / 180;
    data.scene.control.maxPolarAngle = 90 * Math.PI / 180;
});

Custom Marker Click

var instance = this,
$ = jQuery;

function onMarkerClick(e) {
    var userData = this.cfg.userData;
    if(userData) {
        var $iframe = $(userData);
        $.featherlight($iframe);
    }
}

for(var i=0;i<instance.markers.length;i++) {
    var marker = instance.markers[i];
    marker.$marker.on('click', $.proxy(onMarkerClick, marker));
}

Custom loading

const plugin = this;
const $ = jQuery;
const $loading = $('<div>').addClass('myloading').text('loading');

plugin.$container.append($loading);

plugin.$container.on('ipanorama:scene-progress', (e, data) => {
   const flag = data.progress.loaded == data.progress.total;
   $loading.toggleClass('active', !flag);
});
Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Font licensing is wild. Proxima Nova — one of the most-used typefaces on the entire web — will run you $65 per style, and a full family license easily clears $300. Futura? Brandon Grotesque? Circular (yes, Spotify’s font)? We’re talking hundreds of dollars before you’ve typed a single character. For personal projects, indie dev work, […]

So you want to set up email on a subdomain. Maybe you’re trying to route support@help.yourdomain.com to your helpdesk, or you want newsletters@mail.yourdomain.com to run through your ESP without torching your main domain’s reputation. Whatever the reason, you’ve landed on the right page. MX records for subdomains are one of those DNS topics that seem […]

If you have ever embedded an audio player on a podcast site, a music portfolio, or a media archive, you have probably noticed that pretty rendered waveform behind the playhead. Libraries like Wavesurfer.js and Peaks.js can draw those visuals on the client, but decoding a 60-minute MP3 in the browser is slow, memory-hungry, and unreliable […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.