Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/crazy-dragons-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@playcanvas/react": minor
---

Full removes the Grid Script. Please use the official version in the playcanvas engine
5 changes: 5 additions & 0 deletions .changeset/sour-forks-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@playcanvas/react": minor
---

Removes deprecated Grid Script. Use Playcanvas script instead
2 changes: 1 addition & 1 deletion packages/docs/components/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Grid as GridScript } from "playcanvas/scripts/esm/grid.mjs";
import { FC } from "react";

const Grid: FC = ({ ...props }) => {
return <Entity scale={[1000, 1000, 1000]}>
return <Entity scale={[1000, 1, 1000]}>
<Script script={GridScript} {...props} />
</Entity>
}
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/content/docs/guide/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ export default function App() {
return <Application>
{/* Create some environment lighting */}
<EnvironmentLighting/>
{/* Create a large XZ entity with a script that renders a grid */}
<Entity name='grid' scale={[1000, 1, 1000]}>
<Script script={Grid} />
</Entity>
{/* Render the background grid */}
<Grid />
{/* Add a shadow catcher to catch the shadows from the model */}
Expand Down
3 changes: 3 additions & 0 deletions packages/docs/content/examples/scripting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export const Demo = () => {
return (<Entity>
{/* Create some environment lighting */}
<EnvironmentLighting/>

{/* Render the background grid */}
<Grid />

{/* Create a camera entity */}
<Entity name='camera' position={[4, 1, 4]}>
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/scripts/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

export { Grid } from './infinite-grid/infinite-grid.js';
export { OrbitControls } from './orbit-controls/index.tsx';
export { ShadowCatcher } from './shadow-catcher/index.js';
export { AutoRotator } from './auto-rotator/auto-rotator.tsx';
243 changes: 0 additions & 243 deletions packages/lib/src/scripts/infinite-grid/infinite-grid.js

This file was deleted.

Loading