main: work in progress [might break]
This commit is contained in:
parent
da5fa1d1f8
commit
8952acf1d4
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Wed Jul 10 10:00:28 AM UTC 2024
|
||||
* v0.5.1 generated at Wed Jul 10 10:20:14 AM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
@ -4116,6 +4116,7 @@ window.AFRAME.registerComponent('envmap', {
|
|||
const onLoad = (texture) => {
|
||||
texture.colorSpace = THREE.SRGBColorSpace;
|
||||
texture.mapping = THREE.EquirectangularReflectionMapping;
|
||||
texture.needsUpdate = true
|
||||
xrf.scene.environment = texture
|
||||
xrf.scene.texture = texture
|
||||
}
|
||||
|
@ -4124,8 +4125,8 @@ window.AFRAME.registerComponent('envmap', {
|
|||
xrf.addEventListener('navigateLoaded', () => {
|
||||
xrf.scene.traverse( (n) => {
|
||||
if( n.material && n.material.isMeshPhysicalMaterial){
|
||||
console.dir(n.material)
|
||||
n.material.envMap = xrf.scene.environment
|
||||
n.material.needsUpdate = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Wed Jul 10 10:00:28 AM UTC 2024
|
||||
* v0.5.1 generated at Wed Jul 10 10:20:14 AM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
@ -4114,6 +4114,7 @@ window.AFRAME.registerComponent('envmap', {
|
|||
const onLoad = (texture) => {
|
||||
texture.colorSpace = THREE.SRGBColorSpace;
|
||||
texture.mapping = THREE.EquirectangularReflectionMapping;
|
||||
texture.needsUpdate = true
|
||||
xrf.scene.environment = texture
|
||||
xrf.scene.texture = texture
|
||||
}
|
||||
|
@ -4122,8 +4123,8 @@ window.AFRAME.registerComponent('envmap', {
|
|||
xrf.addEventListener('navigateLoaded', () => {
|
||||
xrf.scene.traverse( (n) => {
|
||||
if( n.material && n.material.isMeshPhysicalMaterial){
|
||||
console.dir(n.material)
|
||||
n.material.envMap = xrf.scene.environment
|
||||
n.material.needsUpdate = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Wed Jul 10 10:00:28 AM UTC 2024
|
||||
* v0.5.1 generated at Wed Jul 10 10:20:14 AM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Wed Jul 10 10:00:28 AM UTC 2024
|
||||
* v0.5.1 generated at Wed Jul 10 10:20:14 AM UTC 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<a-scene xr-mode-ui="XRMode: xr"
|
||||
envmap="src: https://coderofsalvation.github.io/xrfragment.media/images/sky.jpg"
|
||||
renderer="colorManagement: false; antialias:true; highRefreshRate:true; foveationLevel: 0.5; toneMapping: ACESFilmic; exposure: 3.0"
|
||||
device-orientation-permission-ui
|
||||
light="defaultLightsEnabled: false">
|
||||
|
|
|
@ -9,6 +9,7 @@ window.AFRAME.registerComponent('envmap', {
|
|||
const onLoad = (texture) => {
|
||||
texture.colorSpace = THREE.SRGBColorSpace;
|
||||
texture.mapping = THREE.EquirectangularReflectionMapping;
|
||||
texture.needsUpdate = true
|
||||
xrf.scene.environment = texture
|
||||
xrf.scene.texture = texture
|
||||
}
|
||||
|
@ -18,6 +19,7 @@ window.AFRAME.registerComponent('envmap', {
|
|||
xrf.scene.traverse( (n) => {
|
||||
if( n.material && n.material.isMeshPhysicalMaterial){
|
||||
n.material.envMap = xrf.scene.environment
|
||||
n.material.needsUpdate = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue