main: work in progress [might break]

This commit is contained in:
Leon van Kammen 2024-07-10 10:24:03 +00:00
parent da5fa1d1f8
commit 8952acf1d4
7 changed files with 12547 additions and 6 deletions

View File

@ -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
}
})
})

View File

@ -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
}
})
})

12536
dist/xrfragment.module.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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">

View File

@ -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
}
})
})