@eturnity/eturnity_3d 9.19.0 → 9.25.0

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,13 +1,20 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "9.19.0",
4
+ "version": "9.25.0",
5
5
  "files": [
6
6
  "dist",
7
7
  "src"
8
8
  ],
9
9
  "main": "./dist/main.umd.js",
10
10
  "module": "./dist/main.es.js",
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "vite build",
14
+ "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src`",
15
+ "prettier": "prettier --write \"**/*.{js,vue}\"",
16
+ "merge-remote-master": "node scripts/merge-remote-master.js"
17
+ },
11
18
  "dependencies": {
12
19
  "@eturnity/eturnity_maths": "9.19.0",
13
20
  "@originjs/vite-plugin-commonjs": "1.0.3",
@@ -53,12 +60,5 @@
53
60
  "require": "./dist/main.umd.js"
54
61
  },
55
62
  "./src/*": "./src/*"
56
- },
57
- "scripts": {
58
- "dev": "vite",
59
- "build": "vite build",
60
- "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src`",
61
- "prettier": "prettier --write \"**/*.{js,vue}\"",
62
- "merge-remote-master": "node scripts/merge-remote-master.js"
63
63
  }
64
- }
64
+ }
@@ -4,9 +4,12 @@ export default {
4
4
  methods: {
5
5
  loadTextureAsync(url) {
6
6
  return new Promise((resolve) => {
7
- this.loader.load(url, (texture) => {
8
- resolve(texture)
9
- })
7
+ this.loader.load(
8
+ url,
9
+ (texture) => resolve(texture),
10
+ () => {},
11
+ () => resolve(null)
12
+ )
10
13
  })
11
14
  },
12
15
  async loadNewPanelTextures() {
@@ -42,13 +45,20 @@ export default {
42
45
  const promiseArray = this.moduleFields.map(async (mf) => {
43
46
  const pvId = mf.data.component_id_pv_module
44
47
  if (!this.material.panel[pvId]) {
48
+ const defaultPanelMaterial =
49
+ this.material.panel[
50
+ `default_${mf.pvData.module_texture_version_id || 0}`
51
+ ]
45
52
  if (!mf.pvData.texture_img_url) {
46
- this.material.panel[pvId] =
47
- this.material.panel[`default_${this.moduleTextureVersionId}`]
53
+ this.material.panel[pvId] = defaultPanelMaterial
48
54
  } else {
49
55
  const texture = await this.loadTextureAsync(
50
56
  mf.pvData.texture_img_url
51
57
  )
58
+ if (!texture) {
59
+ this.material.panel[pvId] = defaultPanelMaterial
60
+ return
61
+ }
52
62
  texture.encoding = THREE.sRGBEncoding
53
63
  texture.colorSpace = THREE.SRGBColorSpace
54
64
  this.material.panel[pvId] = new THREE.MeshPhongMaterial({
Binary file
Binary file
@@ -1,43 +0,0 @@
1
- const theme = {
2
- colors: {
3
- primary: '#282387',
4
- secondary: '#818181',
5
- tertiary: '#d5d5d5',
6
- black: '#263238',
7
- yellow: '#fdb813',
8
- darkGray: '#818181',
9
- mediumGray: '#d5d5d5',
10
- lightGray: '#f2f2f2',
11
- white: '#fff',
12
- blue: '#48a2d0',
13
- red: '#FF5656',
14
- blue1: '#e4efff',
15
- blue2: '#F6FAFF',
16
- grey1: '#666',
17
- grey2: '#c4c4c4',
18
- grey3: '#b2b9c5',
19
- grey4: '#dee2eb',
20
- grey5: '#fafafa',
21
- grey6: '#555d61',
22
- turquoise: '#20A4CA',
23
- green: '#99db0c',
24
- purple: '#505ca6',
25
- disabled: '#dfe1e1',
26
- transparentWhite1: '#ffffff32',
27
- transparentBlack1: '#263238e6',
28
- transparentBlue1: '#20a4cae6',
29
- blueElectric: '#66dffa',
30
- eturnityGrey: '#263238'
31
- },
32
-
33
- screen: {
34
- mobileSmall: '345px',
35
- mobile: '425px',
36
- mobileLarge: '530px',
37
- tablet: '768px',
38
- tabletLarge: '950px'
39
- },
40
- borderRadius: '4px'
41
- }
42
-
43
- export default theme
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>