Skip to content

Commit b45777f

Browse files
authored
Merge pull request #5 from ehammons11/fix-spelling
2 parents ca8075d + 51e5050 commit b45777f

11 files changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ return (
6161

6262
- [What is a timeline?](https://pmndrs.github.io/timeline/getting-started/1-what-is-a-timeline)
6363
- [Building your First Timeline](https://pmndrs.github.io/timeline/getting-started/2-first-timeline)
64-
- [Overview over All Functions](https://pmndrs.github.io/timeline/getting-started/3-overview)
64+
- [Overview of All Functions](https://pmndrs.github.io/timeline/getting-started/3-overview)
6565
- [Tutorial: Building Complex Timelines using Parallel](https://pmndrs.github.io/timeline/tutorials/5-parallel)
6666
- [Tutorial: Building Graph Timelines](https://pmndrs.github.io/timeline/tutorials/6-graph)
6767
- [Tutorial: Use pmndrs/timeline in vanilla three.js](https://pmndrs.github.io/timeline/tutorials/7-vanilla)

docs/getting-started/0-introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ This project is supported by a few companies and individuals building cutting ed
6565
[ ] record, useRecordedTimeline, ... => allows to bind the timeline progress to any controls (e.g. scrolling); allowing using markers to attach scroll positions (e.g. button center screen) to the time of the timeline
6666
[ ] yield* cleanup(() => ...)
6767
[ ] add external methods for the graph (set/get state externally)
68-
[ ] queue with optional priority sorting and cancelation (configure what happens whith the current timeline when canceled)
68+
[ ] queue with optional priority sorting and cancellation (configure what happens with the current timeline when canceled)
6969
[ ] timeline visualization and `yield* marker(...)` to appear in the visualization (e.g. log values or complete json objects)

docs/getting-started/1-what-is-a-timeline.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ yield * reusableFadeIn()
8888
8989
### Running timelines
9090

91-
- **React**: use `useRunTimelinereusableTimeline, deps)`; it wires into `useFrame` and restarts on `deps` change.
91+
- **React**: use `useRunTimeline(reusableTimeline, deps)`; it wires into `useFrame` and restarts on `deps` change.
9292
- **Vanilla**: use `runTimeline(reusableTimeline)` to get an update function you call each frame with `deltaSeconds`.
9393

9494
```ts

docs/tutorials/5-parallel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Run multiple timelines concurrently and wait for all or race the fi
44
nav: 5
55
---
66

7-
Use `parallel('all' | 'race', ...)` to orchestrate concurrent behaviors. In this example we move two cubes simultaneously and continue only when both finishes.
7+
Use `parallel('all' | 'race', ...)` to orchestrate concurrent behaviors. In this example we move two cubes simultaneously and continue only when both finish.
88

99
> [!NOTE]
1010
> you can pass conditionally included timelines by using booleans; falsey entries are ignored. On `'race'`, non‑winning timelines are canceled and their cleanups run.

examples/showcase/lamborghini.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function Lamborghini(props: any) {
164164
// ⬇⬇⬇ All this is probably better fixed in Blender ...
165165
Object.values(nodes).forEach((node: any) => {
166166
if (node.isMesh) {
167-
// Fix glas, normals look messed up in the original, most likely deformed meshes bc of compression :/
167+
// Fix glass, normals look messed up in the original, most likely deformed meshes bc of compression :/
168168
if (node.name.startsWith('glass')) node.geometry.computeVertexNormals()
169169
// Fix logo, too dark
170170
if (node.name === 'silver_001_BreakDiscs_0')

packages/react/src/action.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export function Action({
1111
() => ({}),
1212
[],
1313
)
14-
//if we have no dependencies, we re-write the params so that the are available when the action is (re-)started
15-
//if we have depdendencies, we re-attach the raw input params when they change
14+
//if we have no dependencies, we re-write the params so that they are available when the action is (re-)started
15+
//if we have dependencies, we re-attach the raw input params when they change
1616
if (dependencies == null) {
1717
for (const key in paramsWithoutDeps) {
1818
delete paramsWithoutDeps[key as keyof typeof paramsWithoutDeps]

packages/react/src/graph.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { RootState } from '@react-three/fiber'
33
import { createContext, forwardRef, ReactNode, useContext, useEffect, useImperativeHandle, useMemo } from 'react'
44
import { AttachableProvider, useAttachTimeline } from './attachable.js'
55

6-
const GrapthContext = createContext<GraphTimeline<RootState> | undefined>(undefined)
6+
const GraphContext = createContext<GraphTimeline<RootState> | undefined>(undefined)
77

88
export const Graph = forwardRef<
99
GraphTimeline<RootState>,
@@ -14,10 +14,10 @@ export const Graph = forwardRef<
1414
graph.exitState = exitState
1515
useAttachTimeline(() => graph.run(), [])
1616
useImperativeHandle(ref, () => graph, [graph])
17-
return <GrapthContext.Provider value={graph}>{children}</GrapthContext.Provider>
17+
return <GraphContext.Provider value={graph}>{children}</GraphContext.Provider>
1818
})
1919

20-
export function GrapthState({
20+
export function GraphState({
2121
name,
2222
transitionTo,
2323
children,
@@ -28,14 +28,14 @@ export function GrapthState({
2828
children?: ReactNode
2929
dependencies?: Array<unknown>
3030
}) {
31-
const graph = useContext(GrapthContext)
31+
const graph = useContext(GraphContext)
3232
if (graph == null) {
33-
throw new Error(`GrapthState can only be used inside the Graph component.`)
33+
throw new Error(`GraphState can only be used inside the Graph component.`)
3434
}
3535
const replacable = useMemo(() => new ReplacableTimeline(), [])
3636
const transitionsWithoutDeps = useMemo<GraphTimelineStateTransitions<RootState>>(() => ({}), [])
37-
//if we have no dependencies, we re-write the transitions so that the are available when the graph state is (re-)started
38-
//if we have depdendencies, we re-attach the raw input transitions when they change
37+
//if we have no dependencies, we re-write the transitions so that they are available when the graph state is (re-)started
38+
//if we have dependencies, we re-attach the raw input transitions when they change
3939
if (dependencies == null) {
4040
for (const key in transitionsWithoutDeps) {
4141
delete transitionsWithoutDeps[key as keyof typeof transitionsWithoutDeps]

packages/timeline/src/ease.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function quaternionToTangentSpace(quaternion: Quaternion, target: Vector3, delta
283283
return
284284
}
285285
const theta = Math.acos(w)
286-
//nromalize target and multiply by theta (direction = axis, length = angle)
286+
//normalize target and multiply by theta (direction = axis, length = angle)
287287
target.multiplyScalar(theta / s)
288288
//cut off very small values to prevent numerical drift when converting quaternions from and to tangent space
289289
}

packages/timeline/src/replaceable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ReplacableTimeline<T = unknown> {
1515

1616
attach(timeline: ReusableTimeline<T>): void {
1717
if (this.isAttached) {
18-
throw new Error(`cannot attach to a timeline that has a already another timeline attached`)
18+
throw new Error(`cannot attach to a timeline that already has another timeline attached`)
1919
}
2020
this.isAttached = true
2121
this.currentTimeline = timeline
@@ -59,7 +59,7 @@ export class ReplacableTimeline<T = unknown> {
5959
SynchronousAbortSignal.any([restartController.signal, cancelController.signal]),
6060
)
6161
this.restartControllers.delete(restartController)
62-
//if we arrive at the while condition without beeing aborted, that means the current timeline successfully finished, or the canceController was called
62+
//if we arrive at the while condition without being aborted, that means the current timeline successfully finished, or the cancelController was called
6363
} while (restartController.signal.aborted)
6464
}
6565
}

packages/timeline/src/sequential.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class SequentialTimeline<T = unknown> extends Singleton<T> {
88

99
attach(index: number, timeline: ReusableTimeline<T>): void {
1010
if (this.timelines[index] != null) {
11-
throw new Error(`there's already an timeline set at index '${index}'`)
11+
throw new Error(`there's already a timeline set at index '${index}'`)
1212
}
1313
this.timelines[index] = timeline
1414
}

0 commit comments

Comments
 (0)