Skip to content

Commit

Permalink
Merge pull request #205 from Tresjs/fix-204-ambiguous-indirect-export
Browse files Browse the repository at this point in the history
fix: Uncaught SyntaxError: ambiguous indirect export: stats
  • Loading branch information
JaimeTorrealba authored Sep 14, 2023
2 parents 0ce4f0f + 3b10c95 commit c67e51b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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 }

0 comments on commit c67e51b

Please sign in to comment.