Babylon Viewer extension using IBL

Hi there!

I try to use the babylon.js viewer and set up IBL - but i didn’d find any documentation for all the viewer properties/methods avaliable.

This is my current code:

<babylon 
	templates.viewer.params.enable-drag-and-drop="true"
	scene.debug="false" 
	camera.behaviors.auto-rotate="0"
	scene.environmentTexture="./textures/autoshop_.env"
	>
</babylon>

<script src="https://viewer.babylonjs.com/viewer.js"></script>

How can i realize my own light-setting in the viewer extension?

Kind regards
Stefan

The documentation is here - Configuring the Babylon.js Viewer | Babylon.js Documentation

You can add any light type we support and configure it as you wish, either using an HTML element or nested properties

I know this page, but how do I add a IBL texture and set this texture as scene.environmentTexture?

scene.environmentTexture="./textures/autoshop_.env"

isn’t working in my upper script.

environmentMap can be configured using those keys:

as HTML property/properties they would be “environment-map” directly (and it’s children, like “texture”)

3 Likes

perfect! This is what I was looking for.

There are also two links in the documentation:
https://doc.babylonjs.com/extensions/babylonViewer/configuringViewer:

https://github.com/BabylonJS/Babylon.js/blob/master/Viewer/src/configuration/types/default.ts
https://github.com/BabylonJS/Babylon.js/blob/master/Viewer/src/configuration/types/minimal.ts

But both of them running in a 404 Error.

Kind regards

thanks, I will update the links :slight_smile:

Hi,

Last link: https://github.com/BabylonJS/Babylon.js/blob/master/Viewer/src/configuration/configuration.ts

is also broken.

1 Like

All links were fixewd, thanks a lot :slight_smile: