Skip to content

Commit 8094dfc

Browse files
authored
Merge pull request #93 from chrisweb/preview
@react-three/postprocessing v3 RC
2 parents 883a283 + ee74474 commit 8094dfc

File tree

7 files changed

+322
-381
lines changed

7 files changed

+322
-381
lines changed

app/global.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ body {
185185
font-family: var(--main-frontFamily-default);
186186
font-size: var(--main-fontSize-default);
187187
line-height: var(--main-lineHeight-default);
188-
text-rendering: optimizeLegibility;
189188
}
190189

191190
/* prevent any scrolling when dialog is open */

app/web_development/posts/vscode/page.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: VSCode
33
keywords: ['VSCode', 'ide', 'programming', 'extension', 'theme']
44
published: 2024-08-05T11:22:33.444Z
5-
modified: 2024-11-23T23:11:00.444Z
5+
modified: 2025-01-20T23:11:00.444Z
66
permalink: https://chris.lu/web_development/posts/vscode
77
section: Web development
88
---
@@ -265,15 +265,15 @@ To edit settings first [open the settings UI or file version](#open-the-settings
265265

266266
You have two types of settings:
267267

268-
* **user** settings will apply to all your projects; these settings are saved in the computer user directory; these settings get synchronized between all VSCode tools where you are signed in
268+
**user settings:** will apply to all your projects; these settings are saved in the computer user directory; these settings get synchronized between all VSCode tools where you are signed in
269269

270270
user settings locations:
271271

272-
Windows: %APPDATA%\Code\User\settings.json.
273-
macOS: $HOME/Library/Application\ Support/Code/User/settings.json.
274-
Linux: $HOME/.config/Code/User/settings.json.
272+
* **Windows**: %APPDATA%\Code\User\settings.json.
273+
* **macOS**: $HOME/Library/Application\ Support/Code/User/settings.json.
274+
* **Linux**: $HOME/.config/Code/User/settings.json.
275275

276-
* **workspace** settings will only apply to the project (workspace) that is currently open in VSCode; those settings get saved into a `settings.json` file that is located in a `.vscode` directory of your project (workspace), meaning that you can commit that directory with your source code to share the settings with others
276+
**workspace settings:** will only apply to the project (workspace) that is currently open in VSCode; those settings get saved into a `settings.json` file that is located in a `.vscode` directory of your project (workspace), meaning that you can commit that directory with your source code to share the settings with others
277277

278278
Two tabs at the top of the settings page allow you to switch between user and workspace settings.
279279

app/web_development/tutorials/next-js-static-first-mdx-starterkit/code-highlighting-plugin/page.mdx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Code highlighting plugin - Next.js 15 Tutorial - Next.js 15 Tutorial
33
description: Code highlighting plugin - Next.js 15 static first MDX starterkit | Web development tutorials | www.chris.lu
44
keywords: ['highlighting', 'rehype', 'plugin', 'pretty', 'code', 'shiki']
55
published: 2024-12-31T23:00:00.000Z
6-
modified: 2025-01-20T23:00:00.000Z
6+
modified: 2025-01-23T23:00:00.000Z
77
permalink: https://chris.lu/web_development/tutorials/next-js-static-first-mdx-starterkit/code-highlighting-plugin
88
section: Web development
99
---
@@ -103,6 +103,24 @@ To install the **rehype pretty code** as well as the **shiki** package, we use t
103103
npm i rehype-pretty-code shiki --save-exact
104104
```
105105
106+
> [!WARN]
107+
> the latest shiki version is currently v2.x, but rehype-pretty-code expects a shiki v1 dependency, as there are no real [breaking changes](https://shiki.matsu.io/blog/v2#breaking-changes) in shiki v2 means it is safe to use shiki v2 with the [current (v0.14.0) rehype-pretty-code release](https://github.com/rehype-pretty/rehype-pretty-code/releases), but make sure to read over the [shiki v2 post](https://shiki.matsu.io/blog/v2#breaking-changes) as it contains interesting information about changes
108+
>
109+
> you will likely get an npm error like this:
110+
>
111+
> > npm error code ERESOLVE
112+
> > npm error ERESOLVE could not resolve
113+
>
114+
> either use the npm cli force flag, like so: `npm i rehype-pretty-code@latest shiki@latest --save-exact --force`
115+
>
116+
> Or add shiki to your overrides in your package.json:
117+
>
118+
> ```json title="package.json"
119+
> "overrides": {
120+
> "shiki": "2.1.0"
121+
> }
122+
> ```
123+
106124
Next, we edit our `next.config.mjs` file (in the root of our project) to add the plugin configuration like so:
107125
108126
```js title="next.config.mjs" showLineNumbers {2} {6} {15} /rehypePrettyCode/

components/neonRoad/Canvas.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import City from './City'
1010
//import Trees from './Trees'
1111
//import Terrains from './Terrains'
1212
import Landscape from './Landscape'
13-
//import { EffectComposer, Bloom } from '@react-three/postprocessing'
13+
import { EffectComposer, Bloom } from '@react-three/postprocessing'
1414

1515
interface IProps extends React.PropsWithChildren {
1616
altText: string
@@ -119,13 +119,13 @@ const NeonRoadCanvas: React.FC<IProps> = (props) => {
119119
{/* <Terrains /> */}
120120
{/* <Trees /> */}
121121
<Landscape />
122-
{/* <EffectComposer>
122+
<EffectComposer>
123123
<Bloom
124124
luminanceThreshold={0.08}
125125
intensity={0.7}
126126
luminanceSmoothing={0.01}
127127
/>
128-
</EffectComposer> */}
128+
</EffectComposer>
129129
{/* the following components can be useful in development */}
130130
{/*<axesHelper />*/}
131131
{/*<OrbitControls camera={cameraRef.current} />*/}

0 commit comments

Comments
 (0)