Hi,
Is it possible to add an image with transparent parts ?
I want to use the background color to easily change the color.
Thanks.
No, it isn't.
Thanks.
@mpetroff 鈥hy? :)
Using a texture with an alpha channel increases memory usage and decreases performance.
Hello @mpetroff ,
It's true that the textures with alpha channels will lower the performance, but is it possible to overdrop a small rectangular texture over this 3D scene of pannellum ?
I need to have small subtitled image in the scene & also want that they transform accordingly, but can dissappear when user wants to hide them. (The image textures will be rectangular)
Or is it possible to reload the specific textures of a scene e.g. after 10 seconds ?
Pannellum generally doesn't use a 3D scene to render the panorama, so adding something in 3D space isn't possible. For equirectangular and cube map panoramas, the image is rendered using two triangles, to form a square, with the projection code residing in the fragment shader.
You can reload the current scene using the API via viewer.loadScene(viewer.getScene), where viewer is the Pannellum instance.
Thanks @mpetroff for your valuable support,
In case of a Cubemap, we have six textures. Is it possible that we reload only one of them(e.g. front), without reloading the full scene ???
Basically,
I am interested in a functionality that Pannellum video have but in Short SPAN like 2-3 frames only, since it gives us the power to practise the transition..
Now that you mentioned the video functionality, it made me realize that said functionality may be the ideal solution. You could pass an img element as an equirectangular image (or a canvas element if you want to be able to arbitrarily change things) and set the dynamic configuration option to true; any changes to the img element, e.g. changing the src, would then be automatically rendered (this is how the video functionality works). Something like this:
var image = document.createElement('img');
viewer = pannellum.viewer('panorama', {
"type": "equirectangular",
"panorama": image,
"dynamic": true,
"autoLoad": true
});
image.onload = function() {
viewer.setUpdate(true);
}
image.src = 'test1.jpg';
Setting image.src to a different image URL would then cause the viewer to automatically update.
Most helpful comment
Now that you mentioned the video functionality, it made me realize that said functionality may be the ideal solution. You could pass an
imgelement as an equirectangular image (or acanvaselement if you want to be able to arbitrarily change things) and set thedynamicconfiguration option totrue; any changes to theimgelement, e.g. changing thesrc, would then be automatically rendered (this is how the video functionality works). Something like this:Setting
image.srcto a different image URL would then cause the viewer to automatically update.