ohzi-core 10.6.4 → 10.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/Browser.js
CHANGED
|
@@ -7,7 +7,7 @@ class Browser
|
|
|
7
7
|
this.agent = window.navigator.userAgent.toLowerCase();
|
|
8
8
|
|
|
9
9
|
// vr specific
|
|
10
|
-
this.vr_browser_keywords = ['oculusbrowser', 'oculus', 'vive', 'rift', 'windowsmr', 'cardboard', 'daydream'];
|
|
10
|
+
this.vr_browser_keywords = ['oculusbrowser', 'oculus', 'vive', 'rift', 'windowsmr', 'cardboard', 'daydream', 'wolvic'];
|
|
11
11
|
this.vr_browser_name = this.vr_browser_keywords.find(keyword => this.agent.includes(keyword));
|
|
12
12
|
// Check for WebXR support (indicating VR capabilities)
|
|
13
13
|
this.has_web_xr_support = 'xr' in navigator;
|
|
@@ -5,7 +5,7 @@ import { NoColorSpace, SRGBColorSpace, Texture } from 'three';
|
|
|
5
5
|
|
|
6
6
|
class AsyncTextureLoader extends AbstractLoader
|
|
7
7
|
{
|
|
8
|
-
constructor(resource_id, url, size, flipY =
|
|
8
|
+
constructor(resource_id, url, size, flipY = true, premultiplyAlpha = false, colorSpaceConversion = true)
|
|
9
9
|
{
|
|
10
10
|
super(resource_id, url, size);
|
|
11
11
|
|
|
@@ -84,6 +84,9 @@ class AsyncTextureLoader extends AbstractLoader
|
|
|
84
84
|
}).then((imageBitmap) =>
|
|
85
85
|
{
|
|
86
86
|
const texture = new Texture(imageBitmap);
|
|
87
|
+
texture.flipY = this.flipY;
|
|
88
|
+
texture.premultiplyAlpha = this.premultiplyAlpha;
|
|
89
|
+
texture.colorSpace = this.colorSpaceConversion ? SRGBColorSpace : NoColorSpace;
|
|
87
90
|
texture.needsUpdate = true;
|
|
88
91
|
|
|
89
92
|
resource_container.set_resource(this.resource_id, this.url, texture);
|