Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Nov 22, 2020
1 parent 0624074 commit 1c6338b
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 531 deletions.
4 changes: 2 additions & 2 deletions examples/src/demos/Font.js
Expand Up @@ -94,14 +94,14 @@ function Bird() {

const x = (15 + Math.random() * 30) * (Math.round(Math.random()) ? -1 : 1)

// // eslint-disable-next-line react-perf/jsx-no-new-array-as-prop
// eslint-disable-next-line react-perf/jsx-no-new-array-as-prop
const position = [
x,
-10 + Math.random() * 20,
-5 + Math.random() * 10,
]

// // eslint-disable-next-line react-perf/jsx-no-new-array-as-prop
// eslint-disable-next-line react-perf/jsx-no-new-array-as-prop
const rotation2 = [0, x > 0 ? Math.PI : 0, 0]

return (
Expand Down
3 changes: 0 additions & 3 deletions examples/src/demos/GltfPlanet.js
Expand Up @@ -19,9 +19,6 @@ const attachObjectAttributesPosition = ['attributes', 'position']
function PlanetComponent(props) {
const group = React.useRef()
const { nodes, materials } = useLoader(GLTFLoader, planet, draco())

console.log(nodes['planet.001_1'].geometry)

return (
<group ref={group} {...props} dispose={null}>
<group rotation={rotation1}>
Expand Down
16 changes: 8 additions & 8 deletions examples/src/demos/SVGLoader.js
Expand Up @@ -33,7 +33,9 @@ function SceneComponent({ urls }) {
const [page, setPage] = React.useState(0)
React.useEffect(() => {
const interval = window.setInterval(() => setPage((i) => (i + 1) % urls.length), 3000)
return () => { window.clearInterval(interval) }
return () => {
window.clearInterval(interval)
}
}, [urls.length])

const { color } = useSpring({
Expand Down Expand Up @@ -61,27 +63,26 @@ function SceneComponent({ urls }) {
<ambientLight intensity={0.5} />
<spotLight intensity={0.5} position={spotLightPosition} />
<mesh scale={scale1} rotation={rotation1}>
<planeBufferGeometry attach="geometry" args={args1} />
<a.meshPhongMaterial attach="material" color={color} depthTest={false} />
<planeBufferGeometry args={args1} />
<a.meshPhongMaterial color={color} depthTest={false} />
</mesh>
<a.group position={position} rotation={rotation2}>
{transitions.map(function mapper({
item: { shape, color, fillOpacity, index },
key,
props: { opacity, position, rotation },
}) {
// // eslint-disable-next-line react-perf/jsx-no-new-array-as-prop
// eslint-disable-next-line react-perf/jsx-no-new-array-as-prop
const args = [shape] // to complex to optimize
return (
<a.mesh key={key} rotation={rotation} position={position.interpolate((x, y, z) => [x, y, z + index])}>
<a.meshPhongMaterial
attach="material"
color={color}
opacity={opacity.interpolate((o) => o * fillOpacity)}
depthWrite={false}
transparent
/>
<shapeBufferGeometry attach="geometry" args={args} />
<shapeBufferGeometry args={args} />
</a.mesh>
)
})}
Expand All @@ -91,7 +92,6 @@ function SceneComponent({ urls }) {
}

const Scene = React.memo(SceneComponent)

const camera = { fov: 90, position: [0, 0, 550], near: 0.1, far: 20000 }
const urls = [night, city, morning, tubes, woods, beach]

Expand All @@ -101,7 +101,7 @@ function SVGLoader() {
}, [])

return (
<Canvas invalidateFrameloop camera={camera} onCreated={onCreated}>
<Canvas colorManagement={false} invalidateFrameloop camera={camera} onCreated={onCreated}>
<React.Suspense fallback={null}>
<Scene urls={urls} />
</React.Suspense>
Expand Down
93 changes: 0 additions & 93 deletions examples/src/demos/Textures.js

This file was deleted.

125 changes: 0 additions & 125 deletions examples/src/demos/dev/Bloom.js

This file was deleted.

6 changes: 0 additions & 6 deletions examples/src/demos/dev/Selection.js
Expand Up @@ -102,12 +102,6 @@ function Selection() {
<sphereBufferGeometry attach="geometry" args={args4} />
<meshBasicMaterial attach="material" color="black" transparent opacity={0.2} />
</mesh>
<new object={THREE.Object3D}>
<mesh renderOrder={6} onPointerOver={onPointerOverMeshRed} onPointerOut={onPointerOutMeshRed}>
<sphereBufferGeometry attach="geometry" args={args5} />
<meshBasicMaterial attach="material" color="red" transparent opacity={1} />
</mesh>
</new>
</group>
</group>
<group position={position2}>
Expand Down
66 changes: 0 additions & 66 deletions examples/src/demos/dev/Suspense.js

This file was deleted.

0 comments on commit 1c6338b

Please sign in to comment.