@eturnity/eturnity_3d 8.46.2 → 9.7.0-dev-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 +2 -2
- package/src/helper/render/geometryHandler.js +19 -20
- package/dist/assets/images/panels/longiSolarLR4_60HPH_350M.png +0 -0
- package/dist/assets/images/panels/longiSolarLR4_60HPH_370M.png +0 -0
- package/dist/assets/images/panels/reneSola_Virtus_2_JC320S_24_Bbw copy.png +0 -0
- package/dist/assets/images/panels/reneSola_Virtus_2_JC320S_24_Bbw.png +0 -0
- package/dist/assets/images/panels/uv.png +0 -0
- package/dist/assets/panels/longiSolarLR4_60HPH_350M.png +0 -0
- package/dist/assets/panels/longiSolarLR4_60HPH_370M.png +0 -0
- package/dist/assets/panels/reneSola_Virtus_2_JC320S_24_Bbw.png +0 -0
- package/dist/assets/panels/uv.png +0 -0
- package/dist/assets/theme.js +0 -43
- package/dist/assets/vue.svg +0 -1
- package/dist/main.es.js +0 -43662
- package/dist/main.umd.js +0 -3542
- package/dist/style.css +0 -1
- package/dist/vite.svg +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eturnity/eturnity_3d",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.7.0-dev-25.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"merge-remote-master": "node scripts/merge-remote-master.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@eturnity/eturnity_maths": "
|
|
19
|
+
"@eturnity/eturnity_maths": "9.7.0",
|
|
20
20
|
"@originjs/vite-plugin-commonjs": "1.0.3",
|
|
21
21
|
"core-js": "3.30.2",
|
|
22
22
|
"cors": "2.8.5",
|
|
@@ -519,26 +519,7 @@ export function getBufferPanelGeometry(panelPolygon) {
|
|
|
519
519
|
return null
|
|
520
520
|
}
|
|
521
521
|
const vertices = new Float32Array(trianglesVertices)
|
|
522
|
-
|
|
523
|
-
var B = panelPolygon.outline[3]
|
|
524
|
-
var C = panelPolygon.outline[1]
|
|
525
|
-
var D = panelPolygon.outline[0]
|
|
526
|
-
const AB = getDistanceBetweenPoints(A, B)
|
|
527
|
-
const AC = getDistanceBetweenPoints(A, C)
|
|
528
|
-
let uvs
|
|
529
|
-
if (AB < AC) {
|
|
530
|
-
uvs = new Float32Array([
|
|
531
|
-
0, 1, 0, 0, 1, 0,
|
|
532
|
-
|
|
533
|
-
0, 1, 1, 0, 1, 1,
|
|
534
|
-
])
|
|
535
|
-
} else {
|
|
536
|
-
uvs = new Float32Array([
|
|
537
|
-
0, 0, 1, 0, 1, 1,
|
|
538
|
-
|
|
539
|
-
1, 0, 0, 1, 1, 1,
|
|
540
|
-
])
|
|
541
|
-
}
|
|
522
|
+
const uvs = getPanelUVsFromOutline(panelPolygon.outline)
|
|
542
523
|
|
|
543
524
|
geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3))
|
|
544
525
|
geometry.setAttribute('uv', new THREE.BufferAttribute(uvs, 2))
|
|
@@ -549,9 +530,27 @@ export function getBufferPanelGeometry(panelPolygon) {
|
|
|
549
530
|
export function updateBufferPanelGeometry(panelPolygon, geometry) {
|
|
550
531
|
const panelOutlineTop = getPanelOutlineWithHeightOffset(panelPolygon)
|
|
551
532
|
geometry = updateBufferRoofGeometry(panelOutlineTop, [], geometry)
|
|
533
|
+
if (geometry && panelPolygon.outline && panelPolygon.outline.length >= 4) {
|
|
534
|
+
const uvs = getPanelUVsFromOutline(panelPolygon.outline)
|
|
535
|
+
geometry.setAttribute('uv', new THREE.BufferAttribute(uvs, 2))
|
|
536
|
+
geometry.attributes.uv.needsUpdate = true
|
|
537
|
+
}
|
|
552
538
|
return geometry
|
|
553
539
|
}
|
|
554
540
|
|
|
541
|
+
export function getPanelUVsFromOutline(outline) {
|
|
542
|
+
const A = outline[3]
|
|
543
|
+
const B = outline[2]
|
|
544
|
+
const C = outline[0]
|
|
545
|
+
const AB = getDistanceBetweenPoints(A, B)
|
|
546
|
+
const AC = getDistanceBetweenPoints(A, C)
|
|
547
|
+
const uvs =
|
|
548
|
+
AB < AC
|
|
549
|
+
? new Float32Array([0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1])
|
|
550
|
+
: new Float32Array([1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0])
|
|
551
|
+
return uvs
|
|
552
|
+
}
|
|
553
|
+
|
|
555
554
|
export function getTriangleVerticesForSidePanels(outlineBottom, outlineUp) {
|
|
556
555
|
const triangleVertices = []
|
|
557
556
|
const length = outlineBottom.length
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/assets/theme.js
DELETED
|
@@ -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
|
package/dist/assets/vue.svg
DELETED
|
@@ -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>
|