Skip to content

Commit

Permalink
fix: doc api reference + packages exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Gugustinette committed Sep 2, 2024
1 parent ca6e10d commit b15d2db
Show file tree
Hide file tree
Showing 91 changed files with 4,266 additions and 10,894 deletions.
4 changes: 3 additions & 1 deletion apps/playground-3d/pages/rainbowls/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ import * as THREE from 'three'
const cameraTarget = new FCuboid(scene)
cameraTarget.setPosition({ x: 0, y: 1, z: 0 })
// Create a camera
const camera = new FOrbitCamera(cameraTarget)
const camera = new FOrbitCamera({
target: cameraTarget,
})
camera.setPosition(14, 12, 14)
camera.lookAt(0, 0, 0)
scene.camera = camera
Expand Down
62 changes: 41 additions & 21 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default defineConfig({
{ text: 'Cameras', link: '/guide/core/cameras' },
{ text: 'Lights', link: '/guide/core/lights' },
{ text: 'Assets', link: '/guide/core/assets' },
{ text: 'Controllers', link: '/guide/core/controllers' },
] },
{ text: '2D', collapsed: true, items: [
{ text: 'Container', link: '/guide/2d/container' },
Expand Down Expand Up @@ -94,12 +95,13 @@ export default defineConfig({
{ text: 'FFixedCamera', link: '/api/3d/classes/FFixedCamera' },
{ text: 'FFreeCamera', link: '/api/3d/classes/FFreeCamera' },
] },
{ text: 'Character Classes', items: [
{ text: 'FCharacter', link: '/api/2d/classes/FCharacter' },
{ text: 'FCharacterDynamic', link: '/api/2d/classes/FCharacterDynamic' },
{ text: 'FCharacterKinematic', link: '/api/2d/classes/FCharacterKinematic' },
{ text: 'FCharacterKP', link: '/api/2d/classes/FCharacterKP' },
{ text: 'FCharacterKV', link: '/api/2d/classes/FCharacterKV' },
{ text: 'Controller Classes', items: [
{ text: 'FController', link: '/api/2d/classes/FController' },
{ text: 'FCharacterController', link: '/api/2d/classes/FCharacterController' },
{ text: 'FCharacterControllerD', link: '/api/2d/classes/FCharacterControllerD' },
{ text: 'FCharacterControllerK', link: '/api/2d/classes/FCharacterControllerK' },
{ text: 'FCharacterControllerKP', link: '/api/2d/classes/FCharacterControllerKP' },
{ text: 'FCharacterControllerKV', link: '/api/2d/classes/FCharacterControllerKV' },
] },
{ text: 'Core Classes', items: [
{ text: 'FComponent', link: '/api/2d/classes/FComponent' },
Expand All @@ -108,6 +110,7 @@ export default defineConfig({
{ text: 'FTransform', link: '/api/2d/classes/FTransform' },
] },
{ text: 'Polygons Classes', items: [
{ text: 'FPolygon', link: '/api/2d/classes/FPolygon' },
{ text: 'FCircle', link: '/api/2d/classes/FCircle' },
{ text: 'FRectangle', link: '/api/2d/classes/FRectangle' },
] },
Expand All @@ -119,9 +122,10 @@ export default defineConfig({
] },
{ text: 'Interfaces', items: [
{ text: 'FCameraOptions', link: '/api/2d/interfaces/FCameraOptions' },
{ text: 'FCharacterOptions', link: '/api/2d/interfaces/FCharacterOptions' },
{ text: 'FComponentOptions', link: '/api/2d/interfaces/FComponentOptions' },
{ text: 'FCharacterControllerOptions', link: '/api/2d/interfaces/FCharacterControllerOptions' },
{ text: 'FColliderOptions', link: '/api/2d/interfaces/FColliderOptions' },
{ text: 'FComponentOptions', link: '/api/2d/interfaces/FComponentOptions' },
{ text: 'FControllerOptions', link: '/api/2d/interfaces/FControllerOptions' },
{ text: 'FRigidBodyOptions', link: '/api/2d/interfaces/FRigidBodyOptions' },
{ text: 'FSceneOptions', link: '/api/2d/interfaces/FSceneOptions' },
{ text: 'FTransformOptions', link: '/api/2d/interfaces/FTransformOptions' },
Expand All @@ -136,42 +140,58 @@ export default defineConfig({
{ text: 'FOrbitCamera', link: '/api/3d/classes/FOrbitCamera' },
] },
{ text: 'Character Classes', items: [
{ text: 'FCharacter', link: '/api/3d/classes/FCharacter' },
{ text: 'FCharacterDynamic', link: '/api/3d/classes/FCharacterDynamic' },
{ text: 'FCharacterKinematic', link: '/api/3d/classes/FCharacterKinematic' },
{ text: 'FCharacterKP', link: '/api/3d/classes/FCharacterKP' },
{ text: 'FCharacterKV', link: '/api/3d/classes/FCharacterKV' },
{ text: 'FController', link: '/api/3d/classes/FController' },
{ text: 'FCharacterController', link: '/api/3d/classes/FCharacterController' },
{ text: 'FCharacterControllerD', link: '/api/3d/classes/FCharacterControllerD' },
{ text: 'FCharacterControllerK', link: '/api/3d/classes/FCharacterControllerK' },
{ text: 'FCharacterControllerKP', link: '/api/3d/classes/FCharacterControllerKP' },
{ text: 'FCharacterControllerKV', link: '/api/3d/classes/FCharacterControllerKV' },
] },
{ text: 'Core Classes', items: [
{ text: 'FComponent', link: '/api/3d/classes/FComponent' },
{ text: 'FComponentEmpty', link: '/api/3d/classes/FComponentEmpty' },
{ text: 'FScene', link: '/api/3d/classes/FScene' },
{ text: 'FTransform', link: '/api/3d/classes/FTransform' },
] },
{ text: 'Model Classes', items: [
{ text: 'Polyhedrons Classes', items: [
{ text: 'FCapsule', link: '/api/3d/classes/FCapsule' },
{ text: 'FCuboid', link: '/api/3d/classes/FCuboid' },
{ text: 'FGLTF', link: '/api/3d/classes/FGLTF' },
{ text: 'FPolyhedron', link: '/api/3d/classes/FPolyhedron' },
{ text: 'FSphere', link: '/api/3d/classes/FSphere' },
] },
{ text: 'Model Classes', items: [
{ text: 'FModel', link: '/api/3d/classes/FModel' },
{ text: 'FGLTF', link: '/api/3d/classes/FGLTF' },
{ text: 'FGLB', link: '/api/3d/classes/FGLB' },
{ text: 'FOBJ', link: '/api/3d/classes/FOBJ' },
{ text: 'FFBX', link: '/api/3d/classes/FFBX' },
] },
{ text: 'Enumerations', items: [
{ text: 'FShapes', link: '/api/3d/enumerations/FShapes' },
] },
{ text: 'Interfaces', items: [
{ text: 'FCharacterOptions', link: '/api/3d/interfaces/FCharacterOptions' },
{ text: 'FComponentOptions', link: '/api/3d/interfaces/FComponentOptions' },
{ text: 'FAttachedCameraOptions', link: '/api/3d/interfaces/FAttachedCameraOptions' },
{ text: 'FCameraOptions', link: '/api/3d/interfaces/FCameraOptions' },
{ text: 'FCharacterControllerOptions', link: '/api/3d/interfaces/FCharacterControllerOptions' },
{ text: 'FColliderOptions', link: '/api/3d/interfaces/FColliderOptions' },
{ text: 'FComponentOptions', link: '/api/3d/interfaces/FComponentOptions' },
{ text: 'FControllerOptions', link: '/api/3d/interfaces/FControllerOptions' },
{ text: 'FRigidBodyOptions', link: '/api/3d/interfaces/FRigidBodyOptions' },
{ text: 'FSceneOptions', link: '/api/3d/interfaces/FSceneOptions' },
{ text: 'FTransformOptions', link: '/api/3d/interfaces/FTransformOptions' },
] },
] },
{ text: 'core', link: '/api/core/index.md', collapsed: true, items: [
{ text: 'FCamera', link: '/api/core/classes/FCamera' },
{ text: 'FComponent', link: '/api/core/classes/FComponent' },
{ text: 'FGroup', link: '/api/core/classes/FGroup' },
{ text: 'FScene', link: '/api/core/classes/FScene' },
{ text: 'Core Classes', items: [
{ text: 'FCamera', link: '/api/core/classes/FCamera' },
{ text: 'FComponent', link: '/api/core/classes/FComponent' },
{ text: 'FController', link: '/api/core/classes/FController' },
{ text: 'FGroup', link: '/api/core/classes/FGroup' },
{ text: 'FScene', link: '/api/core/classes/FScene' },
] },
{ text: 'Interfaces', items: [
{ text: 'FControllerOptions', link: '/api/core/interfaces/FControllerOptions' },
] },
] },
{ text: 'devtools', link: '/api/devtools/index.md', collapsed: true, items: [
{ text: 'FDebug', link: '/api/devtools/classes/FDebug' },
Expand Down
55 changes: 40 additions & 15 deletions docs/api/2d/classes/FAttachedCamera.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A camera attached to a given target.

#### Defined in

[packages/2d/src/cameras/FAttachedCamera.ts:20](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FAttachedCamera.ts#L20)
[packages/2d/src/cameras/FAttachedCamera.ts:20](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FAttachedCamera.ts#L20)

## Methods

Expand All @@ -50,7 +50,7 @@ A camera attached to a given target.

#### Defined in

[packages/2d/src/cameras/FAttachedCamera.ts:33](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FAttachedCamera.ts#L33)
[packages/2d/src/cameras/FAttachedCamera.ts:33](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FAttachedCamera.ts#L33)

***

Expand Down Expand Up @@ -92,7 +92,7 @@ player.emitCollisionWith(enemy)

#### Defined in

packages/core/dist/index.d.ts:70
packages/core/dist/index.d.ts:100

***

Expand Down Expand Up @@ -142,7 +142,7 @@ player.onCollisionWith(enemy, () => {

#### Defined in

packages/core/dist/index.d.ts:53
packages/core/dist/index.d.ts:83

***

Expand All @@ -160,16 +160,17 @@ packages/core/dist/index.d.ts:53

#### Description

Update the component.
Should be called every frame.
Update the component. Should be called every frame.
The purpose of `onFrame` on FComponent is really to render the component, its mesh/sprite and its properties.
Any changes on its transform should be done on the controller, not here.

#### Overrides

[`FCamera`](FCamera.md).[`onFrame`](FCamera.md#onframe)

#### Defined in

[packages/2d/src/cameras/FAttachedCamera.ts:25](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FAttachedCamera.ts#L25)
[packages/2d/src/cameras/FAttachedCamera.ts:25](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FAttachedCamera.ts#L25)

## Properties

Expand All @@ -192,7 +193,7 @@ It is a dictionary where the key is the class name or object id and the value is

#### Defined in

packages/core/dist/index.d.ts:22
packages/core/dist/index.d.ts:47

***

Expand All @@ -211,7 +212,7 @@ It is generated automatically.

#### Defined in

packages/core/dist/index.d.ts:17
packages/core/dist/index.d.ts:42

***

Expand All @@ -227,7 +228,7 @@ Internal flags

#### Defined in

[packages/2d/src/cameras/FCamera.ts:17](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FCamera.ts#L17)
[packages/2d/src/cameras/FCamera.ts:16](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FCamera.ts#L16)

***

Expand All @@ -243,23 +244,47 @@ Internal flags

#### Defined in

packages/core/dist/index.d.ts:11
packages/core/dist/index.d.ts:36

***

### controller?

> `optional` **controller**: `FController`
The controller attached to the component.

#### Inherited from

[`FCamera`](FCamera.md).[`controller`](FCamera.md#controller)

#### Defined in

packages/core/dist/index.d.ts:53

***

### position

> **position**: `PointData`
> **position**: `object`
Position of the camera.

#### x

> **x**: `number`
#### y

> **y**: `number`
#### Inherited from

[`FCamera`](FCamera.md).[`position`](FCamera.md#position)

#### Defined in

[packages/2d/src/cameras/FCamera.ts:28](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FCamera.ts#L28)
[packages/2d/src/cameras/FCamera.ts:27](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FCamera.ts#L27)

***

Expand All @@ -277,7 +302,7 @@ The scene the camera is in.

#### Defined in

[packages/2d/src/cameras/FCamera.ts:22](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FCamera.ts#L22)
[packages/2d/src/cameras/FCamera.ts:21](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FCamera.ts#L21)

***

Expand All @@ -291,4 +316,4 @@ The target to follow.

#### Defined in

[packages/2d/src/cameras/FAttachedCamera.ts:18](https://github.com/fibbojs/fibbo/blob/ebbfce6158465f6309c7f36dadb4e328deefcf24/packages/2d/src/cameras/FAttachedCamera.ts#L18)
[packages/2d/src/cameras/FAttachedCamera.ts:18](https://github.com/fibbojs/fibbo/blob/ca6e10de1cfed8b8d44a28a82c206333ede11c84/packages/2d/src/cameras/FAttachedCamera.ts#L18)
Loading

0 comments on commit b15d2db

Please sign in to comment.