Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Uncaught SyntaxError: ambiguous indirect export: stats #205

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/guide/misc/stats.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Stats

[Stats.js](https://github.com/mrdoob/stats.js/) is a JavaScript performance monitor, made by [mrdoop](https://github.com/mrdoob). Stats.js provides a simple info box that will help you monitor your code performance.
[stats.js](https://github.com/mrdoob/stats.js/) is a JavaScript performance monitor, made by [mrdoop](https://github.com/mrdoob). stats.js provides a simple info box that will help you monitor your code performance.

- FPS Frames rendered in the last second. The higher the number the better.
- MS Milliseconds needed to render a frame. The lower the number the better.
- MB MBytes of allocated memory. (Run Chrome with --enable-precise-memory-info)
- CUSTOM User-defined panel support.

**TresJS** provides a function called `stats` that creates a panel without effort or configuration in the top left corner where you'll be able to monitor your app.
**TresJS** provides a function called `Stats` that creates a panel without effort or configuration in the top left corner where you'll be able to monitor your app.

## Basic usage

```ts
import { stats } from '@tresjs/cientos'
import { Stats } from '@tresjs/cientos'

stats()
Stats()
```

## Options
Expand Down
4 changes: 2 additions & 2 deletions playground/src/pages/controls/FirstPersonControlsDemo.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
import { BasicShadowMap, NoToneMapping } from 'three'
import { PointerLockControls, KeyboardControls, stats } from '@tresjs/cientos'
import { PointerLockControls, KeyboardControls, Stats } from '@tresjs/cientos'

const gl = {
clearColor: '#82DBC5',
Expand All @@ -11,7 +11,7 @@ const gl = {
toneMapping: NoToneMapping,
}

stats(0)
Stats(0)

const isActive = (state: boolean) => console.log(state)
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/core/misc/Stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export /**
* @param {number} [showPanel=0]
* @return {*}
*/
const stats = (showPanel = 0) => {
const Stats = (showPanel = 0) => {
const stats = new StatsImpl()

if (stats) {
Expand Down
4 changes: 2 additions & 2 deletions src/core/misc/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useTweakPane } from './useTweakPane'
import { stats } from './Stats'
import { Stats } from './Stats'

export { useTweakPane, stats }
export { useTweakPane, Stats }