Skip to content

Commit 309bc5b

Browse files
committed
chore(repo): rerun format
1 parent bbca0b5 commit 309bc5b

File tree

216 files changed

+1920
-2079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+1920
-2079
lines changed

.prettierrc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"printWidth": 120,
66
"plugins": ["prettier-plugin-organize-imports"],
77
"htmlWhitespaceSensitivity": "ignore",
8-
"overrides": [
9-
{
10-
"files": "*.analog",
11-
"options": {
12-
"parser": "angular"
13-
}
14-
}
15-
]
8+
"overrides": [
9+
{
10+
"files": "*.analog",
11+
"options": {
12+
"parser": "angular"
13+
}
14+
}
15+
]
1616
}

.vscode/settings.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"eslint.validate": ["json"],
3-
"html.customData": [
4-
"./node_modules/angular-three/metadata.json",
5-
"./node_modules/angular-three-soba/metadata.json"
6-
]
3+
"html.customData": ["./node_modules/angular-three/metadata.json", "./node_modules/angular-three-soba/metadata.json"]
74
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"recommendations": ["astro-build.astro-vscode"],
3-
"unwantedRecommendations": []
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
44
}

apps/astro-docs/.vscode/launch.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
"command": "./node_modules/.bin/astro dev",
6-
"name": "Development server",
7-
"request": "launch",
8-
"type": "node-terminal"
9-
}
10-
]
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
1111
}

apps/astro-docs/src/content/docs/blog/v2.mdx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ tags:
1010
- release
1111
featured: true
1212
---
13-
import { Tabs, TabItem, Code } from '@astrojs/starlight/components';
14-
import HudScene, {content as hudContent} from '../../../components/hud/hud?includeContent';
15-
import LightformerScene, {content as lightformerContent} from '../../../components/lightformer/lightformer?includeContent';
1613

14+
import { Tabs, TabItem, Code } from '@astrojs/starlight/components';
15+
import HudScene, { content as hudContent } from '../../../components/hud/hud?includeContent';
16+
import LightformerScene, {
17+
content as lightformerContent,
18+
} from '../../../components/lightformer/lightformer?includeContent';
1719

1820
After almost a year of development, we're thrilled to announce the release of Angular Three v2! 🎉 Through countless examples and tutorials from other [THREE.js](https://threejs.org) ecosystems, we've identified the shortcomings of the previous version of Angular Three. Since then, we've been working tirelessly to enhance the library, making it more stable, performant, and predictable when working with THREE.js scene graphs.
1921

@@ -146,7 +148,6 @@ While Angular Three has always been performant, thanks to Angular, the introduct
146148

147149
Before Angular Signals, Angular Three used a custom `NgtRef` to track the life-cycle of THREE.js entities on the template via the `[ref]` custom property binding.
148150

149-
150151
```angular-ts
151152
@Component({
152153
template: `
@@ -211,9 +212,7 @@ If you are feeling good about Zoneless, you can even enable it with `withExperim
211212

212213
```ts
213214
bootstrapApplication(AppComponent, {
214-
providers: [
215-
provideExperimentalZonelessChangeDetection()
216-
]
215+
providers: [provideExperimentalZonelessChangeDetection()],
217216
});
218217
```
219218

@@ -341,29 +340,29 @@ The main scene contains the torus (donut). The view cube (HUD) is rendered in a
341340
You can check out the code here: [HudScene](https://github.com/angular-threejs/angular-three/blob/main/apps/kitchen-sink/src/app/soba/hud/experience.ts)
342341

343342
<Tabs>
344-
<TabItem label="Preview">
345-
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
346-
<HudScene client:only />
347-
</div>
348-
</TabItem>
349-
<TabItem label="Code">
350-
<Code code={hudContent} lang="angular-ts" />
351-
</TabItem>
343+
<TabItem label="Preview">
344+
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
345+
<HudScene client:only />
346+
</div>
347+
</TabItem>
348+
<TabItem label="Code">
349+
<Code code={hudContent} lang="angular-ts" />
350+
</TabItem>
352351
</Tabs>
353352

354353
#### Environment with Lightformers
355354

356355
`NgtsEnvironment` with content projection has never worked correctly. Now with v2 `NgtPortal`, we can finally have proper `NgtsEnvironment` content with `NgtsLightformer` to control the lighting of the environment.
357356

358357
<Tabs>
359-
<TabItem label="Preview">
360-
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
361-
<LightformerScene client:only />
362-
</div>
363-
</TabItem>
364-
<TabItem label="Code">
365-
<Code code={lightformerContent} lang="angular-ts" />
366-
</TabItem>
358+
<TabItem label="Preview">
359+
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
360+
<LightformerScene client:only />
361+
</div>
362+
</TabItem>
363+
<TabItem label="Code">
364+
<Code code={lightformerContent} lang="angular-ts" />
365+
</TabItem>
367366
</Tabs>
368367

369368
### Improved documentation 📖
@@ -455,6 +454,7 @@ There is also a [template repository](https://github.com/angular-threejs/templat
455454
As we celebrate the release of Angular Three v2, our focus now shifts to promoting its adoption and ensuring its stability. Here's a glimpse of our immediate plans:
456455

457456
- **Promotion and Education**: We're committed to creating a wealth of resources to help developers get the most out of Angular Three v2. This includes:
457+
458458
- Writing in-depth articles and blog posts about various features and use cases
459459
- Developing comprehensive tutorials covering both basic and advanced topics
460460
- Creating video content to demonstrate real-world applications of Angular Three v2

apps/astro-docs/src/content/docs/cannon/bodies.mdx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -58,38 +58,38 @@ export class PhysicsBox {
5858

5959
## Body Functions
6060

61-
| Function | Description | Specific Options |
62-
|----------|-------------|------------------|
63-
| `injectBox` | Creates a box-shaped body | `args: [width, height, depth]` |
64-
| `injectSphere` | Creates a spherical body | `args: [radius]` |
65-
| `injectPlane` | Creates an infinite plane | No specific options |
66-
| `injectCylinder` | Creates a cylindrical body | `args: [radiusTop, radiusBottom, height, numSegments]` |
67-
| `injectHeightfield` | Creates a heightfield body | `args: [data, options]` |
68-
| `injectParticle` | Creates a particle (point mass) | No specific options |
69-
| `injectConvexPolyhedron` | Creates a convex polyhedron | `args: [vertices, faces]` |
70-
| `injectTrimesh` | Creates a triangular mesh body | `args: [vertices, indices]` |
71-
| `injectCompound` | Creates a compound body | `shapes: Array<{ type, args, position?, rotation? }>` |
61+
| Function | Description | Specific Options |
62+
| ------------------------ | ------------------------------- | ------------------------------------------------------ |
63+
| `injectBox` | Creates a box-shaped body | `args: [width, height, depth]` |
64+
| `injectSphere` | Creates a spherical body | `args: [radius]` |
65+
| `injectPlane` | Creates an infinite plane | No specific options |
66+
| `injectCylinder` | Creates a cylindrical body | `args: [radiusTop, radiusBottom, height, numSegments]` |
67+
| `injectHeightfield` | Creates a heightfield body | `args: [data, options]` |
68+
| `injectParticle` | Creates a particle (point mass) | No specific options |
69+
| `injectConvexPolyhedron` | Creates a convex polyhedron | `args: [vertices, faces]` |
70+
| `injectTrimesh` | Creates a triangular mesh body | `args: [vertices, indices]` |
71+
| `injectCompound` | Creates a compound body | `shapes: Array<{ type, args, position?, rotation? }>` |
7272

7373
## Common Options
7474

7575
All body functions accept a set of common options:
7676

77-
| Option | Type | Description |
78-
|--------|------|-------------|
79-
| `mass` | number | The mass of the body (0 for static bodies) |
80-
| `position` | [x: number, y: number, z: number] | Initial position of the body |
81-
| `rotation` | [x: number, y: number, z: number] | Initial rotation of the body (in radians) |
82-
| `velocity` | [x: number, y: number, z: number] | Initial velocity of the body |
83-
| `angularVelocity` | [x: number, y: number, z: number] | Initial angular velocity of the body |
84-
| `linearDamping` | number | Linear damping of the body (0 = no damping, 1 = full damping) |
85-
| `angularDamping` | number | Angular damping of the body |
86-
| `fixedRotation` | boolean | If true, body will not rotate |
87-
| `collisionFilterGroup` | number | The collision group the body belongs to |
88-
| `collisionFilterMask` | number | Which groups this body can collide with |
89-
| `trigger` | boolean | If true, body acts as a trigger (no collision response) |
90-
| `onCollide` | function | Callback function when collision occurs |
91-
| `onCollideBegin` | function | Callback function when collision begins |
92-
| `onCollideEnd` | function | Callback function when collision ends |
77+
| Option | Type | Description |
78+
| ---------------------- | --------------------------------- | ------------------------------------------------------------- |
79+
| `mass` | number | The mass of the body (0 for static bodies) |
80+
| `position` | [x: number, y: number, z: number] | Initial position of the body |
81+
| `rotation` | [x: number, y: number, z: number] | Initial rotation of the body (in radians) |
82+
| `velocity` | [x: number, y: number, z: number] | Initial velocity of the body |
83+
| `angularVelocity` | [x: number, y: number, z: number] | Initial angular velocity of the body |
84+
| `linearDamping` | number | Linear damping of the body (0 = no damping, 1 = full damping) |
85+
| `angularDamping` | number | Angular damping of the body |
86+
| `fixedRotation` | boolean | If true, body will not rotate |
87+
| `collisionFilterGroup` | number | The collision group the body belongs to |
88+
| `collisionFilterMask` | number | Which groups this body can collide with |
89+
| `trigger` | boolean | If true, body acts as a trigger (no collision response) |
90+
| `onCollide` | function | Callback function when collision occurs |
91+
| `onCollideBegin` | function | Callback function when collision begins |
92+
| `onCollideEnd` | function | Callback function when collision ends |
9393

9494
## Advanced Usage
9595

apps/astro-docs/src/content/docs/cannon/constraints.mdx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,42 +59,47 @@ export class HingeConstraint {
5959

6060
## Constraint Functions
6161

62-
| Function | Description | Specific Options |
63-
|----------|-------------|------------------|
64-
| `injectPointToPoint` | Creates a point-to-point constraint | `pivotA`, `pivotB` |
65-
| `injectConeTwist` | Creates a cone twist constraint | `pivotA`, `pivotB`, `axisA`, `axisB` |
66-
| `injectDistance` | Creates a distance constraint | `distance` |
67-
| `injectLock` | Creates a lock constraint | `maxForce` |
68-
| `injectHinge` | Creates a hinge constraint | `pivotA`, `pivotB`, `axisA`, `axisB` |
62+
| Function | Description | Specific Options |
63+
| -------------------- | ----------------------------------- | ------------------------------------ |
64+
| `injectPointToPoint` | Creates a point-to-point constraint | `pivotA`, `pivotB` |
65+
| `injectConeTwist` | Creates a cone twist constraint | `pivotA`, `pivotB`, `axisA`, `axisB` |
66+
| `injectDistance` | Creates a distance constraint | `distance` |
67+
| `injectLock` | Creates a lock constraint | `maxForce` |
68+
| `injectHinge` | Creates a hinge constraint | `pivotA`, `pivotB`, `axisA`, `axisB` |
6969

7070
## Common Options
7171

7272
All constraint functions accept two bodies as the first two arguments, followed by an options object. Common options include:
7373

74-
| Option | Type | Description |
75-
|--------|------|-------------|
76-
| `pivotA` | [x: number, y: number, z: number] | The pivot point for body A in local space |
77-
| `pivotB` | [x: number, y: number, z: number] | The pivot point for body B in local space |
78-
| `axisA` | [x: number, y: number, z: number] | The axis for body A (for certain constraints) |
79-
| `axisB` | [x: number, y: number, z: number] | The axis for body B (for certain constraints) |
80-
| `maxForce` | number | The maximum force that can be applied to maintain the constraint |
74+
| Option | Type | Description |
75+
| ---------- | --------------------------------- | ---------------------------------------------------------------- |
76+
| `pivotA` | [x: number, y: number, z: number] | The pivot point for body A in local space |
77+
| `pivotB` | [x: number, y: number, z: number] | The pivot point for body B in local space |
78+
| `axisA` | [x: number, y: number, z: number] | The axis for body A (for certain constraints) |
79+
| `axisB` | [x: number, y: number, z: number] | The axis for body B (for certain constraints) |
80+
| `maxForce` | number | The maximum force that can be applied to maintain the constraint |
8181

8282
## Specific Options
8383

8484
### PointToPoint Constraint
85+
8586
- No additional specific options
8687

8788
### ConeTwist Constraint
89+
8890
- `angle`: number - The maximum cone angle in radians
8991
- `twistAngle`: number - The maximum twist angle in radians
9092

9193
### Distance Constraint
94+
9295
- `distance`: number - The fixed distance between the bodies
9396

9497
### Lock Constraint
98+
9599
- No additional specific options
96100

97101
### Hinge Constraint
102+
98103
- `collideConnected`: boolean - Whether the connected bodies should collide with each other
99104

100105
## Advanced Usage

apps/astro-docs/src/content/docs/cannon/debug.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ injectBox(
7676
### Example
7777

7878
<Tabs>
79-
<TabItem label="Preview">
80-
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
81-
<CannonSampleDebug client:only />
82-
</div>
83-
</TabItem>
84-
<TabItem label="Code">
85-
<Code code={content} lang="angular-ts" />
86-
</TabItem>
79+
<TabItem label="Preview">
80+
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
81+
<CannonSampleDebug client:only />
82+
</div>
83+
</TabItem>
84+
<TabItem label="Code">
85+
<Code code={content} lang="angular-ts" />
86+
</TabItem>
8787
</Tabs>

apps/astro-docs/src/content/docs/cannon/how-it-works.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class Box {
5555

5656
`injectBox` accepts some physics properties as an argument and an `() => ElementRef<Object3D>` as the second argument to tie the body to the object.
5757

58-
The returned value is a `Signal<NgtcBodyPublicApi | null>` that can be used to control the body, set position, rotation, and subscribe to changes.
58+
The returned value is a `Signal<NgtcBodyPublicApi | null>` that can be used to control the body, set position, rotation, and subscribe to changes.
5959

6060
```angular-ts {20-24}
6161
import { injectBox } from 'angular-three-cannon/body';
@@ -89,14 +89,12 @@ export class Box {
8989
### Example
9090

9191
<Tabs>
92-
<TabItem label="Preview">
93-
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
94-
<CannonSample client:only />
95-
</div>
96-
</TabItem>
97-
<TabItem label="Code">
98-
<Code code={content} lang="angular-ts" />
99-
</TabItem>
92+
<TabItem label="Preview">
93+
<div class="h-96 w-full border border-dashed border-accent-500 rounded">
94+
<CannonSample client:only />
95+
</div>
96+
</TabItem>
97+
<TabItem label="Code">
98+
<Code code={content} lang="angular-ts" />
99+
</TabItem>
100100
</Tabs>
101-
102-

apps/astro-docs/src/content/docs/cannon/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ npm install angular-three-cannon cannon-es @pmndrs/cannon-worker-api
2424

2525
| Angular Three Cannon Version | cannon-es version | @pmndrs/cannon-worker-api version |
2626
| ---------------------------- | ----------------- | --------------------------------- |
27-
| 2.0.0 | ^0.20.0 | ^1.0.0 |
27+
| 2.0.0 | ^0.20.0 | ^1.0.0 |

0 commit comments

Comments
 (0)