50 Commits

Author SHA1 Message Date
Daishi Kato
3d9ecb1a10
fix links to the demo and the docs (#3148) 2025-06-09 08:41:52 +09:00
Rahul Singh
4d3a0176ca
fix: handle hardware acceleration disabled scenario in demo site (#3082)
* fix: handle hardware acceleration disabled scenario in demo site

This commit improves the demo site's error handling when hardware acceleration
is disabled in the browser. The changes include:

- Improved fallback UI with a more informative message

The fallback scene now shows:
- A static image of the Zustand ogimage

This fixes the issue where the demo site would break without any feedback
when hardware acceleration is disabled.

Testing:
- fallback works when hardware acceleration is disabled

* fixed code format

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-04-16 08:36:12 +09:00
Marcin Kulpa
90f45eb076
Chore/enhance prettier config (#3022)
* chore: enhance prettier config

* chore: fix prettier issues

* Update package.json

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-02-20 10:28:40 +09:00
Wonsuk Choi
fc104c2c14
chore(examples): remove 'pnpm-lock.yaml' (#2951)
* chore(examples): remove 'pnpm-lock.yaml'

* chore(.gitignore): add lock file patterns related with 'examples'

* Update package.json

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2025-01-12 07:47:07 +09:00
Wonsuk Choi
55a7d0a15b
chore(eslint): migrate to flat config and simplify (#2912)
* chore(package.json): update related eslint library, update script for eslint.config.js

* chore(pnpm-lock.yaml): reflect changes in package.json

* chore(eslint): migrate eslint configuration .eslintrc.json to eslint.config.js

* chore(examples/demo/package.json): update related eslint library, update script for eslint.config.js

* chore(examples/demo/pnpm-lock.yaml): reflect changes in package.json

* chore(examples/demo/eslint): migrate eslint configuration .eslintrc.cjs to eslint.config.js

* style(examples/demo/utils/copy-to-clipboard.js): add global comment for eslint

* chore(eslint): change file extension 'js' to 'mjs'

* chore(package.json): consise 'lint' scripts

* chore(examples/demo): remove eslint.config.js

* chore(examples/demo/package.json): remove libraries associated wiht eslint, update lint script

* chore(examples/demo/pnpm-lock.yaml): reflect changes in package.json

* chore(examples/demo): reflect 'eslint . --fix' changes based on main 'eslint.config.mjs'

* chore(examples/demo/package.json): add libraries associated wiht eslint, update lint script

* chore(examples/demo/pnpm-lock.yaml): reflect changes in package.json

* chore(examples/demo): add eslint.config.js

* chore(package.json): add mjs in 'eslint', 'test:lint' script

* Update eslint.config.mjs

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>

* Update examples/demo/eslint.config.js

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>

* chore(eslint): remove eslint configuration related to prettier

* chore(package.json): remove eslint-{config,plugin}-prettier

* chore(package.json): add tslib in devDependencies

* chore(eslint): remove duplicate shared-node-browser from globals

* chore(eslint): change 'eslint-import-resolver-alias' to 'eslint-import-resolver-typescript'

* chore(eslint): add 'import/no-named-as-default-member' off

* chore(eslint): remove duplicate rules, rearrange sequentially within a rule

* chore(eslint): remove the ‘off’ settings in ‘eslint-plugin-import’ to ensure clearer usage.

* chore(eslint): remove 'no-console' in rules

* chore(eslint): simplify settings 'import/resolver'

* chore(eslint): remove 'globals' config

* chore(rollup): add 'eslint-disable no-undef'

* chore(package.json): remove 'globals' library

* chore(pnpm-lock.yaml): reflect changes in package.json

* chore(eslint): add 'importPlugin.flatConfigs.recommended'

* chore(eslint): remove duplicate 'languageOptions'

* chore(eslint): remove 'import/extensions', 'import/parsers' to simplify

* chore(eslint): add 'examples/**' in 'ignores'

* chore(package.json): simplify 'lint' scripts

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2024-12-29 22:18:02 +09:00
Daryl Castro
ebf2b7ab16
feat: starter example (#2913)
* feat: add starter example

* fix: (starter-example) remove jotai reference

* fix: small refinements

* fix: format code

---------

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2024-12-29 08:18:09 +09:00
Daishi Kato
d77974992a
chore(deps): update dev dependencies (#2743) 2024-09-15 12:02:18 +09:00
Ryota Murakami
a56e76db52
fix: "value" to "content" attr for og:image (#2668) 2024-08-08 12:12:20 +09:00
Sunil
3b90e1c902
update: example/demo (#2585)
* update: example/demo

- fix eslint config and lint issues
- fix react key issue
- remove children passed as props
- remove unused variables and imports
- "encodings_fragment" is deprecated, replaced it with "colorspace_fragment"

* update: remove --fix
2024-06-06 22:44:17 +09:00
Daishi Kato
6d6383054f
Migrate to pnpm (#2545)
* migrate to pnpm

* some fixes

* simplify

* some more adjustments
2024-05-12 14:43:45 +09:00
Mayank
504aa40e0d
upgrade @react-three/fiber (#2042)
* Ignored pnpm-lock.yaml as discussed here -
https://github.com/pmndrs/zustand/discussions/2014#discussioncomment-6837085

* fix: upgrade @react-three/fiber from 8.13.5 to 8.13.7

Snyk has created this PR to upgrade @react-three/fiber from 8.13.5 to 8.13.7.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mayank1513/project/d7dd1e78-71d1-4d81-8173-d307d8d0eea9?utm_source=github&utm_medium=referral&page=upgrade-pr

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2023-09-11 12:44:18 +09:00
Mayank
dc32aee6f6
upgrade @types/tree (#2043)
* Ignored pnpm-lock.yaml as discussed here -
https://github.com/pmndrs/zustand/discussions/2014#discussioncomment-6837085

* fix: upgrade @types/three from 0.154.0 to 0.155.0

Snyk has created this PR to upgrade @types/three from 0.154.0 to 0.155.0.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mayank1513/project/d7dd1e78-71d1-4d81-8173-d307d8d0eea9?utm_source=github&utm_medium=referral&page=upgrade-pr

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2023-09-11 11:55:18 +09:00
f11cc7f37a example: correct entry index.html 2023-07-16 15:58:51 +02:00
8194bdf41a example: favicon & manifest 2023-07-16 15:54:25 +02:00
1c660b4de3 example: clean up styles 2023-07-16 15:45:00 +02:00
307c025066 examples: fix prettier / lint 2023-07-16 14:54:03 +02:00
47649176e0 update example, move to vite 2023-07-16 14:46:05 +02:00
小镇靓仔
da450384a9
fix: sample startup failure issue fix (#1762) 2023-04-22 10:48:46 +09:00
Danilo Britto
6b716fbdc4
feature(demo): update demo to support copying typescript code (#1740)
* Update demo

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes
2023-04-12 09:13:07 +09:00
Chris K
2970ed2672
demo: add docs link to the demo page (#1734) 2023-04-07 11:35:46 +09:00
Daishi Kato
52e9feb2a5
fix(demo): use named exports (#1554) 2023-01-19 18:00:23 +09:00
Daishi Kato
f0ff30f7c4
chore(examples): move to demo subdir and eliminate rewired (#1305)
* chore(examples): move to demo subdir and eliminate rewired

* fix some paths

* run prettier

* use v4
2022-09-22 18:34:36 +09:00
Mike
a68103bb8b
fix: live demo failure (#1159)
* fix: correctly extend THREE for custom canvas

* refactor: remove unnecessary fiber extend
2022-07-30 12:46:55 +02:00
Mike
0a5f0dc720
feat: update favicon for the example site (#1150)
* feat: update favicon

* feat: update manifest.json
2022-07-28 23:18:53 +09:00
Mike
2517d5ab39
perf(example): remove unnecessary imports of "prismjs" (#1129) 2022-07-26 07:45:02 +09:00
Mike
5c96bef313
This reverts commit 083100897527e489555e1dc6000afb2520f1bd3f. (#1110) 2022-07-19 15:22:13 +09:00
daishi
695f5087f5 fix(examples): add @babel/runtime for deployment 2022-07-19 08:12:23 +09:00
Mike
785e03411d
perf(example): Reduce bundle size (#1096)
* build(script): add `build:analyze` script

* build: bump version for package `webpack-bundle-analyzer`

* build: add `@react-three/babel`

* perf: render `three` objects with custom canvas

* fix: resize for canvas

* fix: extend `PlaneBufferGeometry` for drei's Plane

* build: use prism theme from `prism-react-renderer` instead
2022-07-19 07:48:37 +09:00
Mike
c16c8d108f
style(examples): run prettier on the examples (#1092)
* chore: add dir "example" and file types "js,jsx" to prettier script

* chore: create .prettierignore and add "/examples/build"

* chore: remove deprecated prettier config

* style: run yarn prettier

* chore: make prettier run only for `example/src`

* chore: add `"bracketSameLine": true` to prettier config

* style: run yarn prettier

* Update examples/config-overrides.js

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2022-07-17 13:50:25 +09:00
Mike
97d2da70be
feat(example): Upgrade threejs related packages to the latest version (#1086)
* build(deps)(example): Bump versions for packages related to `three`

1. Bump versions for `@react-three/drei`, `@react-three/fiber`, `@react-three/postprocessing`, and `three`.
2. Update the imported package from files.
3. Update the usage of `useAspect`.
4. Rename `useTextureLoader` to `useTexture`.
5. Replace deprecated `state.pointer` with `state.mouse` in `useFrame`.

* build: Remove the tree shaking for package three

Removing it because the code in config-overrides is causing error
on yarn start, will put it back later if tree shaking is still
necessary, maybe with anothor approach.

* fix: incorrect size of scene

* fix: replace package "threejs-meshline" with "meshline"

The threejs-meshline cannot work with new version of @react-three/*,
changing it to meshline fixes the problem.

* fix: brightness of texture

The textures became too bright after the upgrade, changing the
gl_FragColor in `layerMaterial` makes them back to normal.

* refactor: replace deprecated props of DepthOfField

Props with and height has been renamed to resolutionX and resolutionY
ref: https://github.com/pmndrs/postprocessing/releases/tag/v6.27.0

* fix: increase resolution to fix dof effect
2022-07-15 18:13:14 +09:00
Timoteo Borgobello
2f92479fa9
fix(example): clearTimeout and useCallback was added on CopyButton (#1080)
* fix(copyButton): clearTimeout and useCallback was added on CopyButton

* fix: move clearTimeout to top of function
2022-07-13 20:57:17 +09:00
Timoteo
c0e074f19a
refactor(example): updated with the latest version of the clipboard API (#1072)
* refactor: updated with the latest version of the clipboard API in example zustand

* Update examples/src/utils/copy-to-clipboard.js

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2022-07-11 17:54:18 +09:00
Mike
74de9eb6ba
build(deps)(example): update build script packages (#1069)
* build(deps): update react-scripts and react-app-rewired

* build(deps): remove customize-cra-react-refresh

* style: fix eslint warning in Details.js

* style: remove unuecessary "import React from 'react'"
2022-07-09 13:06:58 +09:00
Mike
646036be5e
build(deps)(example): remove used dependencies (#1068)
* build(deps): remove react-three-gui

* build(deps): remove react-spring

* build(deps): remove raw.macro

* build: remove postprocessing

* build(deps): remove web-vitals

* chore: move @testing-library/* dependencies to devDependencies
2022-07-09 08:37:55 +09:00
Mike
1f1a42264d
build(deps)(example): Bump versions for react and react-dom (#1066)
* build(deps): Bump version for react and react-dom

* fix: update react-dom usage

Co-authored-by: Mike <mike@verybuy.tw>
2022-07-08 19:56:34 +09:00
Mike
b06a8a017d
fix(deps): incorrect peer dependency version of three (#1056) 2022-07-06 08:08:43 +09:00
Daniel Power
0ba3c24007
chore(examples): Refactor demo code to reduce distraction from Zustand usage (#751)
* Refactor demo code to reduce distraction from Zustand usage

* Update examples/src/components/Details.js

* Update examples/src/components/Details.js

Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com>
2022-01-13 12:23:29 +09:00
daishi
fba3bc799a fix(examples): fix build 2022-01-12 00:23:21 +09:00
Reaper
d2f5af3391
refactor(example/site): prism renderer, copy button (#503)
* refactor(example): prism renderer, copy button

added a more maintained prism renderer instead
of react-prism and also a copy button in case
someone wishes to clone the code instead of
enabling pointer events on everything

* fix(code-preview): wait on mount

wait for the element to mount before showing the preview, fixes
https://github.com/pmndrs/zustand/pull/503#issuecomment-884536093

* fix(code-preview): replace with `pre` tag

renderer depends on a pre tag, changed style and tags to match the same
2021-07-22 19:05:14 +09:00
dependabot[bot]
055260447d
Bump url-parse from 1.4.7 to 1.5.1 in /examples (#385)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 17:05:06 +09:00
dependabot[bot]
80cfe08986
Bump hosted-git-info from 2.8.8 to 2.8.9 in /examples (#383)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-08 22:26:52 +09:00
dependabot[bot]
652c40ca13
Bump ssri from 6.0.1 to 6.0.2 in /examples (#368)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-20 11:19:30 +09:00
dependabot[bot]
acaa0298bb
Bump y18n from 4.0.0 to 4.0.1 in /examples (#349)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 16:07:10 +09:00
dependabot[bot]
8eba48432b
Bump elliptic from 6.5.3 to 6.5.4 in /examples (#328)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-11 14:10:06 +09:00
dependabot[bot]
78192e41d4
Bump three from 0.119.1 to 0.125.0 in /examples (#321)
Bumps [three](https://github.com/mrdoob/three.js) from 0.119.1 to 0.125.0.
- [Release notes](https://github.com/mrdoob/three.js/releases)
- [Commits](https://github.com/mrdoob/three.js/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-02 07:11:08 +09:00
dependabot[bot]
cec066b8b1
Bump prismjs from 1.21.0 to 1.23.0 in /examples (#322)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.21.0 to 1.23.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.21.0...v1.23.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-02 07:10:33 +09:00
dependabot[bot]
e9dd39dad8
Bump ini from 1.3.5 to 1.3.8 in /examples (#261)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-13 14:40:01 +09:00
Stefan Osorio
1b911aaed5
[examples] enhance responsiveness and code readability (#204)
* enhance responsiveness and code readability

* even more responsiveness!

* more bear visibility

* style fix

* overlap fixes

Co-authored-by: Stefan Osorio <stefan.osorio@plusb.de>
2020-10-08 08:59:00 +02:00
daishi
31c5566904 update examples yarn lock 2020-09-24 08:30:56 +09:00
daishi
7533f39a7b rename to examples 2020-09-10 13:53:52 +09:00