Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/379-renaming-…
Browse files Browse the repository at this point in the history
…methods-of-the-usecamera-composable-to-prevent-confusion
  • Loading branch information
Tinoooo committed Sep 5, 2023
2 parents a08e090 + 03ab2e1 commit 40bc7f5
Show file tree
Hide file tree
Showing 46 changed files with 339 additions and 1,509 deletions.
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Thanks from the heart 💚 for taking the time to help out. This guide will help

## Setup

All the packages in the ecosystem uses [pnpm workspaces](https://pnpm.io/workspaces). Pnpm is a package manager that is faster than npm and yarn, and it also uses symlinks to avoid code duplication.
All the packages in the ecosystem use [pnpm workspaces](https://pnpm.io/workspaces). PnPM is a package manager that is faster than npm and yarn. It also uses symlinks to avoid code duplication.

The `workspace` has the following structure:

The `workspace` have the following structure:

```
.
Expand Down Expand Up @@ -49,7 +49,8 @@ brew install pnpm

To start developing, you can run `pnpm run playground` in the root folder.

This will start the dev server for the playground `http://localhost:5174/` where you can test the changes you are making on the `src` folder.
This will start the dev server for the playground at `http://localhost:5173/` where you can test the changes you are making in the `src` folder.


> **Important**
> There is no need to run anything in the `src` folder or in the root, the `playground` will take care of it
Expand All @@ -58,7 +59,8 @@ This will start the dev server for the playground `http://localhost:5174/` where
Whenever you are working on a new feature or fixing a bug, make sure to add a demo under `playground/src/pages` and create a route in the `playground/src/router.ts` to test the changes you are making.

> **Warning**
> Make sure to check if there is already a demo for the feature you are working on, if there is, you can add your changes to the existing demo.
> Make sure to check if there is already a demo for the feature you are working on. If so, feel free to add your changes to the existing demo.


### Docs
Expand Down Expand Up @@ -95,4 +97,4 @@ Adding a new third party library is generally discouraged, unless it is absolute

## Keep core small

The core package should be as small as possible, it should only contain the core functionality of the library. If you are adding a new feature, please consider adding it as a plugin instead, for example, if you want to add support for [Effect Composer](https://threejs.org/examples/?q=compo#webgl_postprocessing_effectcomposer) you should create a new package called `@tresjs/post-processing` and add it as a plugin. If it's a smaller scope you can always add it to `cientos` package.
The core package should be as small as possible, it should only contain the core functionality of the library. If you are adding a new feature, please consider adding it as a plugin instead. for example, if you want to add support for [Effect Composer](https://threejs.org/examples/?q=compo#webgl_postprocessing_effectcomposer) you should create a new package called `@tresjs/post-processing` and add it as a plugin. If it's a smaller scope you can always add it to the `cientos` package.
2 changes: 2 additions & 0 deletions docs/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
| pointer-leave | ... the pointer is leaves the object | [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent) |

The returned [Intersection](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/three/src/core/Raycaster.d.ts#L16) includes the [Object3D](https://threejs.org/docs/index.html?q=object#api/en/core/Object3D) that triggered the event. You can access it via `intersection.object`.

By default, objects positioned in front of others with event handlers do not prevent those events from being triggered. This behavior can be achieved by using the prop `blocks-pointer-events`.
4 changes: 2 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"preview": "vite preview"
},
"dependencies": {
"@tresjs/cientos": "3.1.0",
"@tresjs/cientos": "3.2.1",
"vue-router": "^4.2.4"
},
"devDependencies": {
"@tresjs/leches": "^0.7.0",
"@tresjs/leches": "^0.8.0",
"@tweakpane/plugin-essentials": "^0.2.0",
"unplugin-auto-import": "^0.16.6",
"vite-plugin-glsl": "^1.1.2",
Expand Down
69 changes: 0 additions & 69 deletions playground/src/components/AnimatedModel.vue

This file was deleted.

123 changes: 0 additions & 123 deletions playground/src/components/Cameras.vue

This file was deleted.

53 changes: 0 additions & 53 deletions playground/src/components/FBXModels.vue

This file was deleted.

6 changes: 1 addition & 5 deletions playground/src/components/MultipleCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
import { TresCanvas } from '@tresjs/core'
// import { GLTFModel, OrbitControls } from '@tresjs/cientos'
const state = reactive({
clearColor: '#201919',
shadows: true,
Expand All @@ -14,17 +13,14 @@ const state = reactive({
disableRender: false,
stencil: false,
})
const state2 = reactive({
clearColor: '#4f4f4f',
shadows: true,
alpha: false,
/* shadowMapType: BasicShadowMap,
outputColorSpace: SRGBColorSpace,
toneMapping: NoToneMapping, */
})
const log = () => {
console.log(3)
}
Expand Down Expand Up @@ -98,4 +94,4 @@ const log = () => {
</TresCanvas>
</div>
</div>
</template>
</template>
Loading

0 comments on commit 40bc7f5

Please sign in to comment.