Skip to content

Commit

Permalink
three@0.153.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yandeu committed Oct 10, 2023
1 parent 66b348d commit c4a751e
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 34 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Written in TypeScript, uses three.js and ammo.js, brings physics to your three.j
<a href="https://www.npmjs.com/search?q=enable3d"><img src="https://img.shields.io/npm/v/@enable3d/phaser-extension?style=flat-square" alt="NPM version"></a>
<a href="https://github.com/enable3d/enable3d/actions?query=workflow%3ACI"><img src="https://img.shields.io/github/actions/workflow/status/yandeu/enable3d/main.yml?branch=master&label=build&logo=github&style=flat-square"></a>
<a href="https://github.com/enable3d/enable3d/actions?query=workflow%3ACodeQL"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/enable3d/enable3d/codeql-analysis.yml?branch=master&label=CodeQL&logo=github&style=flat-square"></a>
<a href="https://github.com/mrdoob/three.js/"><img src="https://img.shields.io/badge/three-r144-blue.svg?style=flat-square" alt="Three"></a>
<a href="https://github.com/mrdoob/three.js/"><img src="https://img.shields.io/badge/three-r153-blue.svg?style=flat-square" alt="Three"></a>
<a href="https://github.com/enable3d/enable3d/commits/master"><img src="https://img.shields.io/github/last-commit/yandeu/enable3d.svg?style=flat-square" alt="GitHub last commit"></a>
<a href="https://github.com/prettier/prettier" alt="code style: prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/built%20with-TypeScript-blue?style=flat-square"></a>
Expand All @@ -35,11 +35,11 @@ Enable3d now depends on the dependencies below.
```json
{
"@types/matter-js": "0.17.6",
"@types/three": "0.150.0",
"@types/three": "0.153.0",
"matter-js": "0.17.1",
"phaser": "^3.55.2",
"poly-decomp": "^0.3.0",
"three": "0.150.0",
"three": "0.153.0",
"three-csg-ts": "^3.1.10"
}
```
Expand Down
22 changes: 14 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
"homepage": "https://github.com/enable3d/enable3d#readme",
"dependencies": {
"@types/matter-js": "0.17.6",
"@types/three": "0.150.0",
"@types/three": "0.153.0",
"matter-js": "0.17.1",
"phaser": "^3.55.2",
"poly-decomp": "^0.3.0",
"three": "0.150.0",
"three": "0.153.0",
"three-csg-ts": "^3.1.10"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/ammoOnNodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"fflate": "^0.6.3"
},
"peerDependencies": {
"@types/three": "0.150.0",
"three": "0.150.0"
"@types/three": "0.153.0",
"three": "0.153.0"
},
"funding": {
"url": "https://github.com/sponsors/yandeu"
Expand Down
4 changes: 2 additions & 2 deletions packages/ammoPhysics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@yandeu/events": "0.0.5"
},
"peerDependencies": {
"@types/three": "0.150.0",
"three": "0.150.0"
"@types/three": "0.153.0",
"three": "0.153.0"
},
"funding": {
"url": "https://github.com/sponsors/yandeu"
Expand Down
8 changes: 0 additions & 8 deletions packages/ammoPhysics/src/debugDrawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,13 @@ class DebugDrawer {
const fromX = heap[(from + 0) / 4]
const fromY = heap[(from + 4) / 4]
const fromZ = heap[(from + 8) / 4]
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.position.setXYZ(this.index, fromX, fromY, fromZ)
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.color.setXYZ(this.index++, r, g, b)

const toX = heap[(to + 0) / 4]
const toY = heap[(to + 4) / 4]
const toZ = heap[(to + 8) / 4]
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.position.setXYZ(this.index, toX, toY, toZ)
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.color.setXYZ(this.index++, r, g, b)
}

Expand All @@ -150,17 +146,13 @@ class DebugDrawer {
const x = heap[(pointOnB + 0) / 4]
const y = heap[(pointOnB + 4) / 4]
const z = heap[(pointOnB + 8) / 4]
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.position.setXYZ(this.index, x, y, z)
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.color.setXYZ(this.index++, r, g, b)

const dx = heap[(normalOnB + 0) / 4] * distance
const dy = heap[(normalOnB + 4) / 4] * distance
const dz = heap[(normalOnB + 8) / 4] * distance
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.position.setXYZ(this.index, x + dx, y + dy, z + dz)
// @ts-expect-error: Some three.js type errors
this.geometry.attributes.color.setXYZ(this.index++, r, g, b)
}

Expand Down
4 changes: 2 additions & 2 deletions packages/phaserExtension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"@yandeu/events": "0.0.5"
},
"peerDependencies": {
"@types/three": "0.150.0",
"@types/three": "0.153.0",
"phaser": "^3.55.2",
"three": "0.150.0"
"three": "0.153.0"
},
"funding": {
"url": "https://github.com/sponsors/yandeu"
Expand Down
4 changes: 2 additions & 2 deletions packages/threeGraphics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
},
"peerDependencies": {
"@types/matter-js": "0.17.6",
"@types/three": "0.150.0",
"@types/three": "0.153.0",
"matter-js": "0.17.1",
"poly-decomp": "^0.3.0",
"three": "0.150.0"
"three": "0.153.0"
},
"funding": {
"url": "https://github.com/sponsors/yandeu"
Expand Down
4 changes: 1 addition & 3 deletions packages/threeGraphics/src/plugins/heightmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ export default class HeightMap {
mesh.shape = 'concave'

// adjust all z values
// @ts-expect-error: Some three.js type errors
const vertices = geometry.attributes.position.array
for (let i = 0; i < vertices.length; i++) {
const height = pixel.data[i * 4] / heightScale
// @ts-expect-error: Some three.js type errors
vertices[i * 3 + 2] = height
}

Expand All @@ -74,11 +74,9 @@ export default class HeightMap {
let hsl

for (let i = 0; i < count; i++) {
// @ts-expect-error: Some three.js type errors
z = positions.getZ(i)
hsl = colorScale(z).hsl()
color.setHSL(hsl[0] / 360, hsl[1], hsl[2], hsl[3])
// @ts-expect-error: Some three.js type errors
colors.setXYZ(i, color.r, color.g, color.b)
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/threeWrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"author": "Yannick Deubel",
"license": "LGPL-3.0",
"peerDependencies": {
"@types/three": "0.150.0",
"three": "0.150.0"
"@types/three": "0.153.0",
"three": "0.153.0"
},
"funding": {
"url": "https://github.com/sponsors/yandeu"
Expand Down

0 comments on commit c4a751e

Please sign in to comment.