Skip to content

Commit

Permalink
Replace Object3D by Group
Browse files Browse the repository at this point in the history
  • Loading branch information
yandeu committed Dec 23, 2024
1 parent 53f2bad commit b484af3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/docs/Basic-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ this.physics.add.existing(cube)

### Extended Three.js Objects

To have more functionalities and a better compatibility, use `new ExtendedMesh()` and `new ExtendedObject3D()` instead of `new THREE.Mesh()` and `new THREE.Object3D()`
To have more functionalities and a better compatibility, use `new ExtendedMesh()` and `new ExtendedGroup()` instead of `new THREE.Mesh()` and `new THREE.Group()`

```ts
import { THREE, ExtendedMesh, ExtendedObject3D } from 'enable3d'
import { THREE, ExtendedMesh, ExtendedGroup } from 'enable3d'

const cube = new ExtendedMesh(geometry, material)
// instead of
const cube = new THREE.Mesh(geometry, material)

const object = new ExtendedObject3D()
const object = new ExtendedGroup()
// instead of
const object = new THREE.Object3D()
const object = new THREE.Group()
```

0 comments on commit b484af3

Please sign in to comment.