Replace uniqueName with theatreKey (#285)

This commit is contained in:
Andrew Prifer 2022-09-14 19:36:49 +07:00 committed by GitHub
parent ce79d3cd95
commit 8680f9d89e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 111 additions and 111 deletions

View file

@ -13,9 +13,9 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
// credit: https://codesandbox.io/s/camera-pan-nsb7f
function Plane({color, uniqueName, ...props}) {
function Plane({color, theatreKey, ...props}) {
return (
<e.mesh {...props} uniqueName={uniqueName}>
<e.mesh {...props} theatreKey={theatreKey}>
<boxBufferGeometry />
<meshStandardMaterial color={color} />
</e.mesh>
@ -33,20 +33,20 @@ function App() {
>
<SheetProvider sheet={getProject('Playground - R3F').sheet('R3F-Canvas')}>
{/* @ts-ignore */}
<e.orthographicCamera makeDefault uniqueName="Camera" />
<e.orthographicCamera makeDefault theatreKey="Camera" />
<ambientLight intensity={0.4} />
<e.pointLight
position={[-10, -10, 5]}
intensity={2}
color="#ff20f0"
uniqueName="Light 1"
theatreKey="Light 1"
/>
<e.pointLight
position={[0, 0.5, -1]}
distance={1}
intensity={2}
color="#e4be00"
uniqueName="Light 2"
theatreKey="Light 2"
/>
<group position={[0, -0.9, -3]}>
<Plane
@ -54,28 +54,28 @@ function App() {
rotation-x={-Math.PI / 2}
position-z={2}
scale={[4, 20, 0.2]}
uniqueName="plane1"
theatreKey="plane1"
/>
<Plane
color="#e4be00"
rotation-x={-Math.PI / 2}
position-y={1}
scale={[4.2, 0.2, 4]}
uniqueName="plane2"
theatreKey="plane2"
/>
<Plane
color="#736fbd"
rotation-x={-Math.PI / 2}
position={[-1.7, 1, 3.5]}
scale={[0.5, 4, 4]}
uniqueName="plane3"
theatreKey="plane3"
/>
<Plane
color="white"
rotation-x={-Math.PI / 2}
position={[0, 4.5, 3]}
scale={[2, 0.03, 4]}
uniqueName="plane4"
theatreKey="plane4"
/>
</group>
</SheetProvider>

View file

@ -12,9 +12,9 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
// credit: https://codesandbox.io/s/camera-pan-nsb7f
function Plane({color, uniqueName, ...props}) {
function Plane({color, theatreKey, ...props}) {
return (
<e.mesh {...props} uniqueName={uniqueName}>
<e.mesh {...props} theatreKey={theatreKey}>
<boxBufferGeometry />
<meshStandardMaterial color={color} />
</e.mesh>
@ -32,20 +32,20 @@ function App() {
>
<SheetProvider sheet={getProject('Playground - R3F').sheet('R3F-Canvas')}>
{/* @ts-ignore */}
<e.orthographicCamera makeDefault uniqueName="Camera" />
<e.orthographicCamera makeDefault theatreKey="Camera" />
<ambientLight intensity={0.4} />
<e.pointLight
position={[-10, -10, 5]}
intensity={2}
color="#ff20f0"
uniqueName="Light 1"
theatreKey="Light 1"
/>
<e.pointLight
position={[0, 0.5, -1]}
distance={1}
intensity={2}
color="#e4be00"
uniqueName="Light 2"
theatreKey="Light 2"
/>
<group position={[0, -0.9, -3]}>
<Plane
@ -53,28 +53,28 @@ function App() {
rotation-x={-Math.PI / 2}
position-z={2}
scale={[4, 20, 0.2]}
uniqueName="plane1"
theatreKey="plane1"
/>
<Plane
color="#e4be00"
rotation-x={-Math.PI / 2}
position-y={1}
scale={[4.2, 0.2, 4]}
uniqueName="plane2"
theatreKey="plane2"
/>
<Plane
color="#736fbd"
rotation-x={-Math.PI / 2}
position={[-1.7, 1, 3.5]}
scale={[0.5, 4, 4]}
uniqueName="plane3"
theatreKey="plane3"
/>
<Plane
color="white"
rotation-x={-Math.PI / 2}
position={[0, 4.5, 3]}
scale={[2, 0.03, 4]}
uniqueName="plane4"
theatreKey="plane4"
/>
</group>
</SheetProvider>

View file

@ -13,9 +13,9 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
// credit: https://codesandbox.io/s/camera-pan-nsb7f
function Plane({color, uniqueName, ...props}) {
function Plane({color, theatreKey, ...props}) {
return (
<e.mesh {...props} uniqueName={uniqueName}>
<e.mesh {...props} theatreKey={theatreKey}>
<boxBufferGeometry />
<meshStandardMaterial color={color} />
</e.mesh>
@ -33,20 +33,20 @@ function App() {
>
<SheetProvider sheet={getProject('Playground - R3F').sheet('R3F-Canvas')}>
{/* @ts-ignore */}
<e.orthographicCamera makeDefault uniqueName="Camera" />
<e.orthographicCamera makeDefault theatreKey="Camera" />
<ambientLight intensity={0.4} />
<e.pointLight
position={[-10, -10, 5]}
intensity={2}
color="#ff20f0"
uniqueName="Light 1"
theatreKey="Light 1"
/>
<e.pointLight
position={[0, 0.5, -1]}
distance={1}
intensity={2}
color="#e4be00"
uniqueName="Light 2"
theatreKey="Light 2"
/>
<group position={[0, -0.9, -3]}>
<Plane
@ -54,28 +54,28 @@ function App() {
rotation-x={-Math.PI / 2}
position-z={2}
scale={[4, 20, 0.2]}
uniqueName="plane1"
theatreKey="plane1"
/>
<Plane
color="#e4be00"
rotation-x={-Math.PI / 2}
position-y={1}
scale={[4.2, 0.2, 4]}
uniqueName="plane2"
theatreKey="plane2"
/>
<Plane
color="#736fbd"
rotation-x={-Math.PI / 2}
position={[-1.7, 1, 3.5]}
scale={[0.5, 4, 4]}
uniqueName="plane3"
theatreKey="plane3"
/>
<Plane
color="white"
rotation-x={-Math.PI / 2}
position={[0, 4.5, 3]}
scale={[2, 0.03, 4]}
uniqueName="plane4"
theatreKey="plane4"
/>
</group>
</SheetProvider>

View file

@ -13,9 +13,9 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
// credit: https://codesandbox.io/s/camera-pan-nsb7f
function Plane({color, uniqueName, ...props}) {
function Plane({color, theatreKey, ...props}) {
return (
<e.mesh {...props} uniqueName={uniqueName}>
<e.mesh {...props} theatreKey={theatreKey}>
<boxBufferGeometry />
<meshStandardMaterial color={color} />
</e.mesh>
@ -33,20 +33,20 @@ function App() {
>
<SheetProvider sheet={getProject('Playground - R3F').sheet('R3F-Canvas')}>
{/* @ts-ignore */}
<e.orthographicCamera makeDefault uniqueName="Camera" />
<e.orthographicCamera makeDefault theatreKey="Camera" />
<ambientLight intensity={0.4} />
<e.pointLight
position={[-10, -10, 5]}
intensity={2}
color="#ff20f0"
uniqueName="Light 1"
theatreKey="Light 1"
/>
<e.pointLight
position={[0, 0.5, -1]}
distance={1}
intensity={2}
color="#e4be00"
uniqueName="Light 2"
theatreKey="Light 2"
/>
<group position={[0, -0.9, -3]}>
<Plane
@ -54,28 +54,28 @@ function App() {
rotation-x={-Math.PI / 2}
position-z={2}
scale={[4, 20, 0.2]}
uniqueName="plane1"
theatreKey="plane1"
/>
<Plane
color="#e4be00"
rotation-x={-Math.PI / 2}
position-y={1}
scale={[4.2, 0.2, 4]}
uniqueName="plane2"
theatreKey="plane2"
/>
<Plane
color="#736fbd"
rotation-x={-Math.PI / 2}
position={[-1.7, 1, 3.5]}
scale={[0.5, 4, 4]}
uniqueName="plane3"
theatreKey="plane3"
/>
<Plane
color="white"
rotation-x={-Math.PI / 2}
position={[0, 4.5, 3]}
scale={[2, 0.03, 4]}
uniqueName="plane4"
theatreKey="plane4"
/>
</group>
</SheetProvider>

View file

@ -13,9 +13,9 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
// credit: https://codesandbox.io/s/camera-pan-nsb7f
function Plane({color, uniqueName, ...props}) {
function Plane({color, theatreKey, ...props}) {
return (
<e.mesh {...props} uniqueName={uniqueName}>
<e.mesh {...props} theatreKey={theatreKey}>
<boxBufferGeometry />
<meshStandardMaterial color={color} />
</e.mesh>
@ -33,20 +33,20 @@ function App() {
>
<SheetProvider sheet={getProject('Playground - R3F').sheet('R3F-Canvas')}>
{/* @ts-ignore */}
<e.orthographicCamera makeDefault uniqueName="Camera" />
<e.orthographicCamera makeDefault theatreKey="Camera" />
<ambientLight intensity={0.4} />
<e.pointLight
position={[-10, -10, 5]}
intensity={2}
color="#ff20f0"
uniqueName="Light 1"
theatreKey="Light 1"
/>
<e.pointLight
position={[0, 0.5, -1]}
distance={1}
intensity={2}
color="#e4be00"
uniqueName="Light 2"
theatreKey="Light 2"
/>
<group position={[0, -0.9, -3]}>
<Plane
@ -54,28 +54,28 @@ function App() {
rotation-x={-Math.PI / 2}
position-z={2}
scale={[4, 20, 0.2]}
uniqueName="plane1"
theatreKey="plane1"
/>
<Plane
color="#e4be00"
rotation-x={-Math.PI / 2}
position-y={1}
scale={[4.2, 0.2, 4]}
uniqueName="plane2"
theatreKey="plane2"
/>
<Plane
color="#736fbd"
rotation-x={-Math.PI / 2}
position={[-1.7, 1, 3.5]}
scale={[0.5, 4, 4]}
uniqueName="plane3"
theatreKey="plane3"
/>
<Plane
color="white"
rotation-x={-Math.PI / 2}
position={[0, 4.5, 3]}
scale={[2, 0.03, 4]}
uniqueName="plane4"
theatreKey="plane4"
/>
</group>
</SheetProvider>

View file

@ -13,9 +13,9 @@ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
// credit: https://codesandbox.io/s/camera-pan-nsb7f
function Plane({color, uniqueName, ...props}: any) {
function Plane({color, theatreKey, ...props}: any) {
return (
<e.mesh {...props} uniqueName={uniqueName}>
<e.mesh {...props} theatreKey={theatreKey}>
<boxBufferGeometry />
<meshStandardMaterial color={color} />
</e.mesh>
@ -33,20 +33,20 @@ function App() {
>
<SheetProvider sheet={getProject('Playground - R3F').sheet('R3F-Canvas')}>
{/* @ts-ignore */}
<e.orthographicCamera makeDefault uniqueName="Camera" />
<e.orthographicCamera makeDefault theatreKey="Camera" />
<ambientLight intensity={0.4} />
<e.pointLight
position={[-10, -10, 5]}
intensity={2}
color="#ff20f0"
uniqueName="Light 1"
theatreKey="Light 1"
/>
<e.pointLight
position={[0, 0.5, -1]}
distance={1}
intensity={2}
color="#e4be00"
uniqueName="Light 2"
theatreKey="Light 2"
/>
<group position={[0, -0.9, -3]}>
<Plane
@ -54,28 +54,28 @@ function App() {
rotation-x={-Math.PI / 2}
position-z={2}
scale={[4, 20, 0.2]}
uniqueName="plane1"
theatreKey="plane1"
/>
<Plane
color="#e4be00"
rotation-x={-Math.PI / 2}
position-y={1}
scale={[4.2, 0.2, 4]}
uniqueName="plane2"
theatreKey="plane2"
/>
<Plane
color="#736fbd"
rotation-x={-Math.PI / 2}
position={[-1.7, 1, 3.5]}
scale={[0.5, 4, 4]}
uniqueName="plane3"
theatreKey="plane3"
/>
<Plane
color="white"
rotation-x={-Math.PI / 2}
position={[0, 4.5, 3]}
scale={[2, 0.03, 4]}
uniqueName="plane4"
theatreKey="plane4"
/>
</group>
</SheetProvider>