Skip to content
Open
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
2 changes: 1 addition & 1 deletion .storybook/Setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Canvas, Props as CanvasProps, T } from 'solid-three'
import { Vector3 } from 'three'

import { ParentComponent } from 'solid-js'
import { OrbitControls } from '../src'
import { OrbitControls } from '../src/index.ts'
import { processProps } from '../src/helpers/processProps'

type Props = CanvasProps & {
Expand Down
2 changes: 1 addition & 1 deletion .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from '@storybook/addons'
import theme from './theme'
import theme from './theme.ts'

addons.setConfig({
theme,
Expand Down
2 changes: 2 additions & 0 deletions .storybook/public/draco-gltf/draco_decoder.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import process from "node:process";
import { Buffer } from "node:buffer";
var DracoDecoderModule = function (DracoDecoderModule) {
DracoDecoderModule = DracoDecoderModule || {}

Expand Down
3 changes: 2 additions & 1 deletion .storybook/public/draco-gltf/draco_wasm_wrapper.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from "node:process";
var $jscomp = $jscomp || {}
$jscomp.scope = {}
$jscomp.ASSUME_ES5 = !1
Expand All @@ -10,7 +11,7 @@ $jscomp.defineProperty =
d != Array.prototype && d != Object.prototype && (d[k] = f.value)
}
$jscomp.getGlobal = function (d) {
return 'undefined' != typeof window && window === d ? d : 'undefined' != typeof global && null != global ? global : d
return 'undefined' != typeof window && window === d ? d : 'undefined' != typeof globalThis && null != globalThis ? globalThis : d
}
$jscomp.global = $jscomp.getGlobal(this)
$jscomp.polyfill = function (d, k, f, u) {
Expand Down
6 changes: 3 additions & 3 deletions .storybook/stories/AccumulativeShadows.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Show, Suspense, createEffect } from 'solid-js'
import { T, applyProps } from 'solid-three'
import * as THREE from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { FlakesTexture } from 'three-stdlib'
import {
Expand All @@ -11,7 +11,7 @@ import {
OrbitControls,
RandomizedLight,
useGLTF,
} from '../../src'
} from '../../src/index.ts'
import { when } from '../../src/helpers/when'

export default {
Expand All @@ -36,7 +36,7 @@ function AccumulativeShadowScene() {
>
<RandomizedLight amount={8} radius={4} ambient={0.5} bias={0.001} position={[5, 5, -10]} />
</AccumulativeShadows>
<OrbitControls autoRotate={true} />
<OrbitControls autoRotate />
<Environment preset="city" />
</Suspense>
)
Expand Down
6 changes: 3 additions & 3 deletions .storybook/stories/ArcballControls.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Portal, T, useFrame } from 'solid-three'
import { Scene } from 'three'

import { ArcballControls, Box, PerspectiveCamera, Plane, useFBO } from '../../src'
import { Setup } from '../Setup'
import { ArcballControls, Box, PerspectiveCamera, Plane, useFBO } from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

import type { OrthographicCamera, PerspectiveCamera as PerspectiveCameraType } from 'three'
import type { ArcballControlsProps } from '../../src'
import type { ArcballControlsProps } from '../../src/index.ts'

const args = {
enablePan: true,
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/BBAnchor.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as THREE from 'three'

import { T } from 'solid-three'
import { onMount, splitProps, type JSX } from 'solid-js'
import { BBAnchor, Html, Icosahedron, OrbitControls, Sphere, useHelper } from '../../src'
import { Setup } from '../Setup'
import { BBAnchor, Html, Icosahedron, OrbitControls, Sphere, useHelper } from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

export default {
title: 'Staging/BBAnchor',
Expand Down
12 changes: 6 additions & 6 deletions .storybook/stories/Billboard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Billboard, Box, Cone, OrbitControls, Plane, Text } from '../../src'
import { Billboard, Box, Cone, OrbitControls, Plane, Text } from '../../src/index.ts'

export default {
title: 'Abstractions/Billboard',
Expand Down Expand Up @@ -35,7 +35,7 @@ export const BillboardStory = ({ follow, lockX, lockY, lockZ }) => (
<Plane args={[3, 2]} material-color="yellow" />
</Billboard>

<OrbitControls enablePan={true} zoomSpeed={0.5} />
<OrbitControls enablePan zoomSpeed={0.5} />
</>
)

Expand All @@ -57,7 +57,7 @@ export const BillboardTextStory = ({ follow, lockX, lockY, lockZ }) => (
lockZ={lockZ}
position={[0.5, 2.05, 0.5]}
>
<Text fontSize={1} outlineWidth={'5%'} outlineColor="#000000" outlineOpacity={1}>
<Text fontSize={1} outlineWidth="5%" outlineColor="#000000" outlineOpacity={1}>
box
</Text>
</Billboard>
Expand All @@ -66,7 +66,7 @@ export const BillboardTextStory = ({ follow, lockX, lockY, lockZ }) => (
</Box>
<T.Group position={[-2.5, -3, -1]}>
<Billboard follow={follow} lockX={lockX} lockY={lockY} lockZ={lockZ} position={[0, 1.05, 0]}>
<Text fontSize={1} outlineWidth={'5%'} outlineColor="#000000" outlineOpacity={1}>
<Text fontSize={1} outlineWidth="5%" outlineColor="#000000" outlineOpacity={1}>
cone
</Text>
</Billboard>
Expand All @@ -81,7 +81,7 @@ export const BillboardTextStory = ({ follow, lockX, lockY, lockZ }) => (
</Plane>
</Billboard>

<OrbitControls enablePan={true} zoomSpeed={0.5} />
<OrbitControls enablePan zoomSpeed={0.5} />
</>
)

Expand Down
6 changes: 3 additions & 3 deletions .storybook/stories/CameraControls.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Portal, T, useFrame } from 'solid-three'
import { Scene } from 'three'

import { Box, CameraControls, PerspectiveCamera, Plane, useFBO } from '../../src'
import { Setup } from '../Setup'
import { Box, CameraControls, PerspectiveCamera, Plane, useFBO } from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

import type { CameraControlsProps } from '../../src'
import type { CameraControlsProps } from '../../src/index.ts'

const args = {}

Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/CameraShake.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { T, useFrame } from 'solid-three'
import * as THREE from 'three'
import { OrbitControls as OrbitControlsImpl } from 'three-stdlib'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { CameraShake, OrbitControls } from '../../src'
import { CameraShake, OrbitControls } from '../../src/index.ts'

const frequencyArgType = {
control: {
Expand Down
6 changes: 3 additions & 3 deletions .storybook/stories/Center.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { useTurntable } from '../useTurntable'
import { Setup } from '../Setup.tsx'
import { useTurntable } from '../useTurntable.ts'

import { Primitive, T } from 'solid-three'
import { Box, Center, useGLTF } from '../../src'
import { Box, Center, useGLTF } from '../../src/index.ts'

export default {
title: 'Staging/Center',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/Cloud.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Cloud, OrbitControls } from '../../src'
import { Cloud, OrbitControls } from '../../src/index.ts'

export default {
title: 'Staging/Cloud',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/ContactShadows.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { T, useFrame } from 'solid-three'
import { Mesh } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { ContactShadows, Plane, Sphere } from '../../src'
import { ContactShadows, Plane, Sphere } from '../../src/index.ts'

export default {
title: 'Staging/ContactShadows',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/CubeCamera.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { T, useFrame } from 'solid-three'
import * as THREE from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { Show, createSignal } from 'solid-js'
import { Box, CubeCamera } from '../../src'
import { Box, CubeCamera } from '../../src/index.ts'

export default {
title: 'Camera/CubeCamera',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/CurveModifier.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { BufferGeometry, CatmullRomCurve3, LineBasicMaterial, LineLoop, Vector3
import { FontLoader, TextGeometry, TextGeometryParameters } from 'three-stdlib'

import { createMemo, onMount } from 'solid-js'
import { CurveModifier, CurveModifierRef } from '../../src'
import { Setup } from '../Setup'
import { CurveModifier, CurveModifierRef } from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

extend({ StdText: TextGeometry })

Expand Down
8 changes: 4 additions & 4 deletions .storybook/stories/Decal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { T } from 'solid-three'
import { For, JSX, createMemo, createSignal } from 'solid-js'
import { Euler, InstancedBufferAttribute, Matrix4, Mesh, Quaternion, Vector3 } from 'three'
import { Decal, PerspectiveCamera, Sampler, useSurfaceSampler, useTexture } from '../../src'
import { Setup } from '../Setup'
import { Decal, PerspectiveCamera, Sampler, useSurfaceSampler, useTexture } from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

function LoopOverInstancedBufferAttribute(props: {
buffer?: InstancedBufferAttribute
Expand Down Expand Up @@ -67,7 +67,7 @@ function DecalScene() {

<T.Mesh ref={setRef}>
<T.SphereGeometry args={[3, 32, 32]} />
<T.MeshPhysicalMaterial color={'tomato'} roughness={0.5} />
<T.MeshPhysicalMaterial color="tomato" roughness={0.5} />
</T.Mesh>

<LoopOverInstancedBufferAttribute buffer={bufferAttribute()}>
Expand All @@ -79,7 +79,7 @@ function DecalScene() {
depthTest={false}
map={Math.random() > 0.5 ? resource()?.[0] : resource()?.[1]}
alphaTest={0}
polygonOffset={true}
polygonOffset
polygonOffsetFactor={-10}
/>
</Decal>
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/Detailed.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Detailed, Icosahedron, OrbitControls } from '../../src'
import { Detailed, Icosahedron, OrbitControls } from '../../src/index.ts'

export default {
title: 'Abstractions/Detailed',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/DeviceOrientationControls.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Box, DeviceOrientationControls } from '../../src'
import { Box, DeviceOrientationControls } from '../../src/index.ts'

export function DeviceOrientationControlsStory() {
// s3f: something going wrong with the args-prop: should be a | and not &
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/Environment.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { ContactShadows, Environment, OrbitControls } from '../../src'
import { ContactShadows, Environment, OrbitControls } from '../../src/index.ts'

import { T } from 'solid-three'
import { presetsObj } from '../../src/helpers/environment-assets'
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/Example.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { withKnobs } from '@storybook/addon-knobs'
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Example, ExampleApi } from '../../src'
import { Example, ExampleApi } from '../../src/index.ts'

export default {
title: 'Misc/Example',
Expand Down
6 changes: 3 additions & 3 deletions .storybook/stories/Facemesh.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { withKnobs } from '@storybook/addon-knobs'
import * as THREE from 'three'
import { Vector3 } from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Facemesh, FacemeshDatas } from '../../src'
import { Facemesh, FacemeshDatas } from '../../src/index.ts'

export default {
title: 'Shapes/Facemesh',
Expand Down Expand Up @@ -42,7 +42,7 @@ export const FacemeshSt = ({ depth, origin, eyes, eyesAsOrigin, offset, offsetSc
<T.MeshStandardMaterial
side={THREE.DoubleSide}
color="#cbcbcb"
flatShading={true}
flatShading
transparent
opacity={0.98}
/>
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/FirstPersonControls.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Box, FirstPersonControls } from '../../src'
import { Box, FirstPersonControls } from '../../src/index.ts'

export const FirstPersonControlsStory = ({ ...args }) => (
<>
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/Float.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { number, withKnobs } from '@storybook/addon-knobs'

import * as THREE from 'three'

import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Float } from '../../src'
import { Float } from '../../src/index.ts'

export default {
title: 'Staging/Float',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/FlyControls.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Setup } from '../Setup'
import { Setup } from '../Setup.tsx'

import { T } from 'solid-three'
import { Box, FlyControls } from '../../src'
import { Box, FlyControls } from '../../src/index.ts'

export const FlyControlsStory = ({ ...args }) => (
<>
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/GizmoHelper.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
OrbitControls,
TrackballControls,
useGLTF,
} from '../../src'
import { Setup } from '../Setup'
} from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

export default {
title: 'Gizmos/GizmoHelper',
Expand Down
4 changes: 2 additions & 2 deletions .storybook/stories/Grid.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Vector3 } from 'three'

import { T } from 'solid-three'
import { Box, Grid } from '../../src'
import { Setup } from '../Setup'
import { Box, Grid } from '../../src/index.ts'
import { Setup } from '../Setup.tsx'

export default {
title: 'Gizmos/Grid',
Expand Down
Loading