ohzi-core 10.7.0 → 10.7.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "10.7.0",
3
+ "version": "10.7.1",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
@@ -43,18 +43,19 @@
43
43
  "registry": "https://registry.npmjs.org/"
44
44
  },
45
45
  "dependencies": {
46
- "three": "0.148.0"
46
+ "three": "0.161.0"
47
47
  },
48
48
  "standardx": {
49
49
  "ignore": [
50
- "rollup.config.mjs"
50
+ "rollup.config.js"
51
51
  ]
52
52
  },
53
53
  "devDependencies": {
54
- "@rollup/plugin-terser": "^0.4.4",
55
- "rollup": "4.1.4",
56
- "rollup-plugin-glslify": "^1.3.1",
54
+ "rollup": "^2.44.0",
55
+ "rollup-plugin-glslify": "^1.2.0",
56
+ "rollup-plugin-sourcemaps": "^0.6.3",
57
+ "rollup-plugin-terser": "^7.0.2",
57
58
  "standardx": "^7.0.0",
58
- "typescript": "4.4.4"
59
+ "typescript": "^4.4.3"
59
60
  }
60
61
  }
package/src/Browser.js CHANGED
@@ -1,22 +1,16 @@
1
1
 
2
2
  class Browser
3
3
  {
4
- init()
4
+ async init()
5
5
  {
6
6
  this.browser_name = '';
7
7
  this.agent = window.navigator.userAgent.toLowerCase();
8
8
 
9
- // vr specific
10
- this.vr_browser_keywords = ['oculusbrowser', 'oculus', 'vive', 'rift', 'windowsmr', 'cardboard', 'daydream', 'wolvic'];
11
- this.vr_browser_name = this.vr_browser_keywords.find(keyword => this.agent.includes(keyword));
12
- // Check for WebXR support (indicating VR capabilities)
13
9
  this.has_web_xr_support = 'xr' in navigator;
10
+ this.is_vr = this.has_web_xr_support && await navigator.xr.isSessionSupported('immersive-vr');
14
11
 
15
12
  switch (true)
16
13
  {
17
- case this.vr_browser_name !== undefined && this.has_web_xr_support:
18
- this.browser_name = this.vr_browser_name;
19
- break;
20
14
  case this.agent.indexOf('edge') > -1:
21
15
  this.browser_name = 'edge_ie';
22
16
  break;
@@ -71,11 +65,6 @@ class Browser
71
65
  return this.browser_name === 'edge_chromium';
72
66
  }
73
67
 
74
- get is_vr()
75
- {
76
- return this.vr_browser_keywords.includes(this.browser_name);
77
- }
78
-
79
68
  get has_webm()
80
69
  {
81
70
  return !!(this.is_chrome || this.is_firefox || this.is_edge_chromium);
package/src/Graphics.js CHANGED
@@ -1,21 +1,21 @@
1
+ import { CameraManager } from './CameraManager';
2
+ import { Capabilities } from './Capabilities';
1
3
  import { Configuration } from './Configuration';
2
- import { BaseRender } from './render_mode/BaseRender';
3
4
  import { OScreen } from './OScreen';
4
- import { CameraManager } from './CameraManager';
5
5
  import { SceneManager } from './SceneManager';
6
- import { Capabilities } from './Capabilities';
7
- import { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';
6
+ import { BaseRender } from './render_mode/BaseRender';
8
7
  import { Blitter } from './render_utilities/Blitter';
8
+ import { DepthAndNormalsRenderer } from './render_utilities/DepthAndNormalsRenderer';
9
9
 
10
10
  import {
11
+ AlwaysDepth,
12
+ FloatType,
11
13
  NearestFilter,
14
+ NoBlending,
15
+ NoColorSpace,
12
16
  RGBAFormat,
13
- LinearEncoding,
14
- FloatType,
15
- WebGLRenderTarget,
16
17
  ShaderMaterial,
17
- NoBlending,
18
- AlwaysDepth
18
+ WebGLRenderTarget
19
19
  } from 'three';
20
20
 
21
21
  import { WebGLRenderer } from 'three';
@@ -363,7 +363,7 @@ class Graphics
363
363
  minFilter: NearestFilter,
364
364
  magFilter: NearestFilter,
365
365
  format: RGBAFormat,
366
- encoding: LinearEncoding,
366
+ colorSpace: NoColorSpace,
367
367
  type: FloatType,
368
368
  stencilBuffer: false,
369
369
  depthBuffer: false
@@ -1,11 +1,6 @@
1
1
  import { Graphics } from '../Graphics';
2
2
 
3
- import { NearestFilter } from 'three';
4
- import { RGBAFormat } from 'three';
5
- import { LinearEncoding } from 'three';
6
- import { HalfFloatType } from 'three';
7
- import { FloatType } from 'three';
8
- import { WebGLRenderTarget } from 'three';
3
+ import { FloatType, HalfFloatType, NearestFilter, NoColorSpace, RGBAFormat, WebGLRenderTarget } from 'three';
9
4
  import { Capabilities } from '../Capabilities';
10
5
 
11
6
  class ParticleAttribute
@@ -37,7 +32,7 @@ class ParticleAttribute
37
32
  minFilter: NearestFilter,
38
33
  magFilter: NearestFilter,
39
34
  format: RGBAFormat,
40
- encoding: LinearEncoding,
35
+ colorScape: NoColorSpace,
41
36
  type: Capabilities.fp_textures_available ? FloatType : HalfFloatType,
42
37
  stencilBuffer: false,
43
38
  depthBuffer: false