@react-three/drei 9.80.7 → 9.80.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/AccumulativeShadows.cjs.js +1 -1
- package/core/AccumulativeShadows.d.ts +3 -38
- package/core/AccumulativeShadows.js +7 -7
- package/core/ArcballControls.d.ts +2 -2
- package/core/Billboard.d.ts +2 -2
- package/core/CameraControls.d.ts +2 -2
- package/core/CameraShake.d.ts +2 -2
- package/core/CatmullRomLine.d.ts +9 -7
- package/core/Caustics.d.ts +16 -31
- package/core/Center.d.ts +2 -20
- package/core/Clone.d.ts +2 -1
- package/core/ContactShadows.d.ts +2 -2
- package/core/CubicBezierLine.d.ts +6 -4
- package/core/CurveModifier.d.ts +2 -1
- package/core/Decal.d.ts +2 -1
- package/core/Detailed.d.ts +6 -21
- package/core/DeviceOrientationControls.d.ts +2 -2
- package/core/Edges.d.ts +7 -23
- package/core/Effects.d.ts +15 -14
- package/core/FirstPersonControls.d.ts +2 -2
- package/core/Float.d.ts +2 -1
- package/core/FlyControls.d.ts +2 -2
- package/core/Gltf.d.ts +5 -3
- package/core/Grid.d.ts +2 -4
- package/core/Image.d.ts +2 -26
- package/core/Instances.d.ts +3 -2
- package/core/Lightformer.d.ts +2 -29
- package/core/Line.d.ts +2 -2
- package/core/MapControls.d.ts +2 -2
- package/core/MarchingCubes.d.ts +17 -71
- package/core/Mask.d.ts +7 -5
- package/core/MeshDiscardMaterial.d.ts +2 -2
- package/core/MeshDistortMaterial.d.ts +23 -10
- package/core/MeshReflectorMaterial.d.ts +2 -2
- package/core/MeshTransmissionMaterial.d.ts +11 -10
- package/core/MeshWobbleMaterial.d.ts +20 -10
- package/core/OrbitControls.d.ts +2 -2
- package/core/OrthographicCamera.d.ts +11 -7
- package/core/PerspectiveCamera.d.ts +11 -7
- package/core/PointMaterial.d.ts +2 -2
- package/core/PointerLockControls.d.ts +2 -2
- package/core/Points.d.ts +4 -21
- package/core/PositionalAudio.d.ts +7 -23
- package/core/QuadraticBezierLine.d.ts +9 -7
- package/core/Reflector.d.ts +2 -1
- package/core/RenderTexture.d.ts +15 -12
- package/core/RoundedBox.d.ts +2 -3
- package/core/ScreenQuad.d.ts +2 -2
- package/core/ScreenSpace.d.ts +2 -2
- package/core/Segments.d.ts +3 -2
- package/core/Shadow.d.ts +10 -26
- package/core/Sky.d.ts +3 -2
- package/core/Sparkles.d.ts +3 -21
- package/core/SpotLight.d.ts +2 -1
- package/core/Stars.d.ts +3 -3
- package/core/Svg.d.ts +2 -2
- package/core/Text.d.ts +33 -48
- package/core/Text3D.d.ts +11 -26
- package/core/TrackballControls.d.ts +2 -2
- package/core/Trail.d.ts +7 -7
- package/core/TransformControls.d.ts +2 -1
- package/core/shapes.d.ts +20 -58
- package/core/useBVH.d.ts +2 -22
- package/helpers/ts-utils.d.ts +2 -0
- package/index.cjs.js +1 -1
- package/package.json +1 -1
- package/react-three-drei-0.0.0-semantic-release.tgz +0 -0
- package/web/Html.d.ts +2 -1
- package/web/ScrollControls.d.ts +3 -1
- package/web/pivotControls/index.d.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("three"),r=require("react"),a=require("@react-three/fiber"),i=require("./shaderMaterial.cjs.js"),s=require("../materials/DiscardMaterial.cjs.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=n(e),h=o(t),c=o(r);const u=c.createContext(null),d=i.shaderMaterial({color:new h.Color,blend:2,alphaTest:.75,opacity:0,map:null},"varying vec2 vUv;\n void main() {\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.);\n vUv = uv;\n }",`varying vec2 vUv;\n uniform sampler2D map;\n uniform vec3 color;\n uniform float opacity;\n uniform float alphaTest;\n uniform float blend;\n void main() {\n vec4 sampledDiffuseColor = texture2D(map, vUv);\n gl_FragColor = vec4(color * sampledDiffuseColor.r * blend, max(0.0, (1.0 - (sampledDiffuseColor.r + sampledDiffuseColor.g + sampledDiffuseColor.b) / alphaTest)) * opacity);\n #include <tonemapping_fragment>\n #include <${parseInt(h.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n }`),p=c.forwardRef((({children:e,temporal:t,frames:r=40,limit:i=1/0,blend:s=20,scale:n=10,opacity:o=1,alphaTest:l=.75,color:h="black",colorBlend:p=2,resolution:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("three"),r=require("react"),a=require("@react-three/fiber"),i=require("./shaderMaterial.cjs.js"),s=require("../materials/DiscardMaterial.cjs.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=n(e),h=o(t),c=o(r);const u=c.createContext(null),d=i.shaderMaterial({color:new h.Color,blend:2,alphaTest:.75,opacity:0,map:null},"varying vec2 vUv;\n void main() {\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.);\n vUv = uv;\n }",`varying vec2 vUv;\n uniform sampler2D map;\n uniform vec3 color;\n uniform float opacity;\n uniform float alphaTest;\n uniform float blend;\n void main() {\n vec4 sampledDiffuseColor = texture2D(map, vUv);\n gl_FragColor = vec4(color * sampledDiffuseColor.r * blend, max(0.0, (1.0 - (sampledDiffuseColor.r + sampledDiffuseColor.g + sampledDiffuseColor.b) / alphaTest)) * opacity);\n #include <tonemapping_fragment>\n #include <${parseInt(h.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n }`),p=c.forwardRef((({children:e,temporal:t,frames:r=40,limit:i=1/0,blend:s=20,scale:n=10,opacity:o=1,alphaTest:l=.75,color:h="black",colorBlend:p=2,resolution:f=1024,toneMapped:m=!0,...v},M)=>{a.extend({SoftShadowMaterial:d});const b=a.useThree((e=>e.gl)),w=a.useThree((e=>e.scene)),y=a.useThree((e=>e.camera)),x=a.useThree((e=>e.invalidate)),C=c.useRef(null),S=c.useRef(null),[j]=c.useState((()=>new g(b,w,f)));c.useLayoutEffect((()=>{j.configure(C.current)}),[]);const T=c.useMemo((()=>({lights:new Map,temporal:!!t,frames:Math.max(2,r),blend:Math.max(2,r===1/0?s:r),count:0,getMesh:()=>C.current,reset:()=>{j.clear();const e=C.current.material;e.opacity=0,e.alphaTest=0,T.count=0},update:(e=1)=>{const t=C.current.material;T.temporal?(t.opacity=Math.min(o,t.opacity+o/T.blend),t.alphaTest=Math.min(l,t.alphaTest+l/T.blend)):(t.opacity=o,t.alphaTest=l),S.current.visible=!0,j.prepare();for(let t=0;t<e;t++)T.lights.forEach((e=>e.update())),j.update(y,T.blend);S.current.visible=!1,j.finish()}})),[j,y,w,t,r,s,o,l]);return c.useLayoutEffect((()=>{T.reset(),T.temporal||T.frames===1/0||T.update(T.blend)})),c.useImperativeHandle(M,(()=>T),[T]),a.useFrame((()=>{(T.temporal||T.frames===1/0)&&T.count<T.frames&&T.count<i&&(x(),T.update(),T.count++)})),c.createElement("group",v,c.createElement("group",{traverse:()=>null,ref:S},c.createElement(u.Provider,{value:T},e)),c.createElement("mesh",{receiveShadow:!0,ref:C,scale:n,rotation:[-Math.PI/2,0,0]},c.createElement("planeGeometry",null),c.createElement("softShadowMaterial",{transparent:!0,depthWrite:!1,toneMapped:m,color:h,blend:p,map:j.progressiveLightMap2.texture})))})),f=c.forwardRef((({castShadow:e=!0,bias:t=.001,mapSize:r=512,size:a=5,near:i=.5,far:s=500,frames:n=1,position:o=[0,0,0],radius:d=1,amount:p=8,intensity:f=1,ambient:g=.5,...m},v)=>{const M=c.useRef(null),b=new h.Vector3(...o).length(),w=c.useContext(u),y=c.useCallback((()=>{let e;if(M.current)for(let t=0;t<M.current.children.length;t++)if(e=M.current.children[t],Math.random()>g)e.position.set(o[0]+h.MathUtils.randFloatSpread(d),o[1]+h.MathUtils.randFloatSpread(d),o[2]+h.MathUtils.randFloatSpread(d));else{let t=Math.acos(2*Math.random()-1)-Math.PI/2,r=2*Math.PI*Math.random();e.position.set(Math.cos(t)*Math.cos(r)*b,Math.abs(Math.cos(t)*Math.sin(r)*b),Math.sin(t)*b)}}),[d,g,b,...o]),x=c.useMemo((()=>({update:y})),[y]);return c.useImperativeHandle(v,(()=>x),[x]),c.useLayoutEffect((()=>{const e=M.current;return w&&w.lights.set(e.uuid,x),()=>{w.lights.delete(e.uuid)}}),[w,x]),c.createElement("group",l.default({ref:M},m),Array.from({length:p},((n,o)=>c.createElement("directionalLight",{key:o,castShadow:e,"shadow-bias":t,"shadow-mapSize":[r,r],intensity:f/p},c.createElement("orthographicCamera",{attach:"shadow-camera",args:[-a,a,a,-a,i,s]})))))}));class g{constructor(e,t,r=1024){this.renderer=e,this.res=r,this.scene=t,this.buffer1Active=!1,this.lights=[],this.meshes=[],this.object=null,this.clearColor=new h.Color,this.clearAlpha=0;const a={type:h.HalfFloatType,magFilter:h.NearestFilter,minFilter:h.NearestFilter};this.progressiveLightMap1=new h.WebGLRenderTarget(this.res,this.res,a),this.progressiveLightMap2=new h.WebGLRenderTarget(this.res,this.res,a),this.discardMat=new s.DiscardMaterial,this.targetMat=new h.MeshLambertMaterial({fog:!1}),this.previousShadowMap={value:this.progressiveLightMap1.texture},this.averagingWindow={value:100},this.targetMat.onBeforeCompile=e=>{e.vertexShader="varying vec2 vUv;\n"+e.vertexShader.slice(0,-1)+"vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const t=e.fragmentShader.indexOf("void main() {");e.fragmentShader="varying vec2 vUv;\n"+e.fragmentShader.slice(0,t)+"uniform sampler2D previousShadowMap;\n\tuniform float averagingWindow;\n"+e.fragmentShader.slice(t-1,-1)+"\nvec3 texelOld = texture2D(previousShadowMap, vUv).rgb;\n gl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/ averagingWindow);\n }",e.uniforms.previousShadowMap=this.previousShadowMap,e.uniforms.averagingWindow=this.averagingWindow}}clear(){this.renderer.getClearColor(this.clearColor),this.clearAlpha=this.renderer.getClearAlpha(),this.renderer.setClearColor("black",1),this.renderer.setRenderTarget(this.progressiveLightMap1),this.renderer.clear(),this.renderer.setRenderTarget(this.progressiveLightMap2),this.renderer.clear(),this.renderer.setRenderTarget(null),this.renderer.setClearColor(this.clearColor,this.clearAlpha),this.lights=[],this.meshes=[],this.scene.traverse((e=>{!function(e){return!!e.geometry}(e)?function(e){return e.isLight}(e)&&this.lights.push({object:e,intensity:e.intensity}):this.meshes.push({object:e,material:e.material})}))}prepare(){this.lights.forEach((e=>e.object.intensity=0)),this.meshes.forEach((e=>e.object.material=this.discardMat))}finish(){this.lights.forEach((e=>e.object.intensity=e.intensity)),this.meshes.forEach((e=>e.object.material=e.material))}configure(e){this.object=e}update(e,t=100){if(!this.object)return;this.averagingWindow.value=t,this.object.material=this.targetMat;const r=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,a=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1,i=this.scene.background;this.scene.background=null,this.renderer.setRenderTarget(r),this.previousShadowMap.value=a.texture,this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e),this.renderer.setRenderTarget(null),this.scene.background=i}}exports.AccumulativeShadows=p,exports.RandomizedLight=f,exports.accumulativeContext=u;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
5
|
export declare type AccumulativeShadowsProps = {
|
|
5
6
|
frames?: number;
|
|
6
7
|
blend?: number;
|
|
@@ -41,25 +42,7 @@ declare global {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
export declare const accumulativeContext: React.Context<AccumulativeContext>;
|
|
44
|
-
export declare const AccumulativeShadows:
|
|
45
|
-
position?: ReactThreeFiber.Vector3 | undefined;
|
|
46
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
47
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
48
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
49
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
50
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
51
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
52
|
-
dispose?: (() => void) | null | undefined;
|
|
53
|
-
}>> & {
|
|
54
|
-
position?: ReactThreeFiber.Vector3 | undefined;
|
|
55
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
56
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
57
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
58
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
59
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
60
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
61
|
-
dispose?: (() => void) | null | undefined;
|
|
62
|
-
} & import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers & AccumulativeShadowsProps, "visible" | "attach" | "args" | "children" | "key" | "onUpdate" | "position" | "up" | "rotation" | "matrix" | "quaternion" | "layers" | "dispose" | "type" | "isGroup" | "id" | "uuid" | "name" | "parent" | "modelViewMatrix" | "normalMatrix" | "matrixWorld" | "matrixAutoUpdate" | "matrixWorldAutoUpdate" | "matrixWorldNeedsUpdate" | "castShadow" | "receiveShadow" | "frustumCulled" | "renderOrder" | "animations" | "userData" | "customDepthMaterial" | "customDistanceMaterial" | "isObject3D" | "onBeforeRender" | "onAfterRender" | "applyMatrix4" | "applyQuaternion" | "setRotationFromAxisAngle" | "setRotationFromEuler" | "setRotationFromMatrix" | "setRotationFromQuaternion" | "rotateOnAxis" | "rotateOnWorldAxis" | "rotateX" | "rotateY" | "rotateZ" | "translateOnAxis" | "translateX" | "translateY" | "translateZ" | "localToWorld" | "worldToLocal" | "lookAt" | "add" | "remove" | "removeFromParent" | "clear" | "getObjectById" | "getObjectByName" | "getObjectByProperty" | "getObjectsByProperty" | "getWorldPosition" | "getWorldQuaternion" | "getWorldScale" | "getWorldDirection" | "raycast" | "traverse" | "traverseVisible" | "traverseAncestors" | "updateMatrix" | "updateMatrixWorld" | "updateWorldMatrix" | "toJSON" | "clone" | "copy" | "addEventListener" | "hasEventListener" | "removeEventListener" | "dispatchEvent" | keyof import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers | keyof AccumulativeShadowsProps> & React.RefAttributes<AccumulativeContext>>;
|
|
45
|
+
export declare const AccumulativeShadows: ForwardRefComponent<JSX.IntrinsicElements['group'] & AccumulativeShadowsProps, AccumulativeContext>;
|
|
63
46
|
export declare type RandomizedLightProps = {
|
|
64
47
|
frames?: number;
|
|
65
48
|
position?: [x: number, y: number, z: number];
|
|
@@ -74,23 +57,5 @@ export declare type RandomizedLightProps = {
|
|
|
74
57
|
near?: number;
|
|
75
58
|
far?: number;
|
|
76
59
|
};
|
|
77
|
-
export declare const RandomizedLight:
|
|
78
|
-
position?: ReactThreeFiber.Vector3 | undefined;
|
|
79
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
80
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
81
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
82
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
83
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
84
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
85
|
-
dispose?: (() => void) | null | undefined;
|
|
86
|
-
}>> & {
|
|
87
|
-
position?: ReactThreeFiber.Vector3 | undefined;
|
|
88
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
89
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
90
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
91
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
92
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
93
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
94
|
-
dispose?: (() => void) | null | undefined;
|
|
95
|
-
} & import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers & RandomizedLightProps, "visible" | "attach" | "args" | "children" | "key" | "onUpdate" | "up" | "scale" | "rotation" | "matrix" | "quaternion" | "layers" | "dispose" | "type" | "isGroup" | "id" | "uuid" | "name" | "parent" | "modelViewMatrix" | "normalMatrix" | "matrixWorld" | "matrixAutoUpdate" | "matrixWorldAutoUpdate" | "matrixWorldNeedsUpdate" | "receiveShadow" | "frustumCulled" | "renderOrder" | "animations" | "userData" | "customDepthMaterial" | "customDistanceMaterial" | "isObject3D" | "onBeforeRender" | "onAfterRender" | "applyMatrix4" | "applyQuaternion" | "setRotationFromAxisAngle" | "setRotationFromEuler" | "setRotationFromMatrix" | "setRotationFromQuaternion" | "rotateOnAxis" | "rotateOnWorldAxis" | "rotateX" | "rotateY" | "rotateZ" | "translateOnAxis" | "translateX" | "translateY" | "translateZ" | "localToWorld" | "worldToLocal" | "lookAt" | "add" | "remove" | "removeFromParent" | "clear" | "getObjectById" | "getObjectByName" | "getObjectByProperty" | "getObjectsByProperty" | "getWorldPosition" | "getWorldQuaternion" | "getWorldScale" | "getWorldDirection" | "raycast" | "traverse" | "traverseVisible" | "traverseAncestors" | "updateMatrix" | "updateMatrixWorld" | "updateWorldMatrix" | "toJSON" | "clone" | "copy" | "addEventListener" | "hasEventListener" | "removeEventListener" | "dispatchEvent" | keyof import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers | keyof RandomizedLightProps> & React.RefAttributes<AccumulativeLightContext>>;
|
|
60
|
+
export declare const RandomizedLight: ForwardRefComponent<JSX.IntrinsicElements['group'] & RandomizedLightProps, AccumulativeLightContext>;
|
|
96
61
|
export {};
|
|
@@ -213,13 +213,13 @@ class ProgressiveLightMap {
|
|
|
213
213
|
this.clearColor = new THREE.Color();
|
|
214
214
|
this.clearAlpha = 0; // Create the Progressive LightMap Texture
|
|
215
215
|
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
const textureParams = {
|
|
217
|
+
type: THREE.HalfFloatType,
|
|
218
|
+
magFilter: THREE.NearestFilter,
|
|
219
|
+
minFilter: THREE.NearestFilter
|
|
220
|
+
};
|
|
221
|
+
this.progressiveLightMap1 = new THREE.WebGLRenderTarget(this.res, this.res, textureParams);
|
|
222
|
+
this.progressiveLightMap2 = new THREE.WebGLRenderTarget(this.res, this.res, textureParams); // Inject some spicy new logic into a standard phong material
|
|
223
223
|
|
|
224
224
|
this.discardMat = new DiscardMaterial();
|
|
225
225
|
this.targetMat = new THREE.MeshLambertMaterial({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import { ArcballControls as ArcballControlsImpl } from 'three-stdlib';
|
|
4
3
|
import type { Event, OrthographicCamera, PerspectiveCamera } from 'three';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
5
|
export declare type ArcballControlsProps = Omit<ReactThreeFiber.Overwrite<ReactThreeFiber.Object3DNode<ArcballControlsImpl, typeof ArcballControlsImpl>, {
|
|
6
6
|
target?: ReactThreeFiber.Vector3;
|
|
7
7
|
camera?: OrthographicCamera | PerspectiveCamera;
|
|
@@ -12,4 +12,4 @@ export declare type ArcballControlsProps = Omit<ReactThreeFiber.Overwrite<ReactT
|
|
|
12
12
|
onStart?: (e?: Event) => void;
|
|
13
13
|
onEnd?: (e?: Event) => void;
|
|
14
14
|
}>, 'ref'>;
|
|
15
|
-
export declare const ArcballControls:
|
|
15
|
+
export declare const ArcballControls: ForwardRefComponent<ArcballControlsProps, ArcballControlsImpl>;
|
package/core/Billboard.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Group } from 'three';
|
|
2
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
3
3
|
export declare type BillboardProps = {
|
|
4
4
|
follow?: boolean;
|
|
5
5
|
lockX?: boolean;
|
|
6
6
|
lockY?: boolean;
|
|
7
7
|
lockZ?: boolean;
|
|
8
8
|
} & JSX.IntrinsicElements['group'];
|
|
9
|
-
export declare const Billboard:
|
|
9
|
+
export declare const Billboard: ForwardRefComponent<BillboardProps, Group>;
|
package/core/CameraControls.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OrthographicCamera, PerspectiveCamera } from 'three';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
4
3
|
import CameraControlsImpl from 'camera-controls';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
5
|
export declare type CameraControlsProps = Omit<ReactThreeFiber.Overwrite<ReactThreeFiber.Node<CameraControlsImpl, typeof CameraControlsImpl>, {
|
|
6
6
|
camera?: PerspectiveCamera | OrthographicCamera;
|
|
7
7
|
domElement?: HTMLElement;
|
|
@@ -18,5 +18,5 @@ export declare type CameraControlsProps = Omit<ReactThreeFiber.Overwrite<ReactTh
|
|
|
18
18
|
events?: boolean;
|
|
19
19
|
regress?: boolean;
|
|
20
20
|
}>, 'ref'>;
|
|
21
|
-
export declare const CameraControls:
|
|
21
|
+
export declare const CameraControls: ForwardRefComponent<CameraControlsProps, CameraControlsImpl>;
|
|
22
22
|
export declare type CameraControls = CameraControlsImpl;
|
package/core/CameraShake.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
2
2
|
export interface ShakeController {
|
|
3
3
|
getIntensity: () => number;
|
|
4
4
|
setIntensity: (val: number) => void;
|
|
@@ -14,4 +14,4 @@ export interface CameraShakeProps {
|
|
|
14
14
|
pitchFrequency?: number;
|
|
15
15
|
rollFrequency?: number;
|
|
16
16
|
}
|
|
17
|
-
export declare const CameraShake:
|
|
17
|
+
export declare const CameraShake: ForwardRefComponent<CameraShakeProps, ShakeController | undefined>;
|
package/core/CatmullRomLine.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Line2 } from 'three-stdlib';
|
|
3
2
|
import { LineProps } from './Line';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
+
declare type Props = Omit<LineProps, 'ref'> & {
|
|
5
|
+
closed?: boolean;
|
|
6
|
+
curveType?: 'centripetal' | 'chordal' | 'catmullrom';
|
|
7
|
+
tension?: number;
|
|
8
|
+
segments?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const CatmullRomLine: ForwardRefComponent<Props, Line2>;
|
|
11
|
+
export {};
|
package/core/Caustics.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
+
declare type CausticsProps = JSX.IntrinsicElements['group'] & {
|
|
6
|
+
frames?: number;
|
|
7
|
+
debug?: boolean;
|
|
8
|
+
causticsOnly: boolean;
|
|
9
|
+
backside: boolean;
|
|
10
|
+
ior?: number;
|
|
11
|
+
backsideIOR?: number;
|
|
12
|
+
worldRadius?: number;
|
|
13
|
+
intensity?: number;
|
|
14
|
+
color?: ReactThreeFiber.Color;
|
|
15
|
+
resolution?: number;
|
|
16
|
+
lightSource?: [x: number, y: number, z: number] | React.MutableRefObject<THREE.Object3D>;
|
|
17
|
+
};
|
|
4
18
|
declare global {
|
|
5
19
|
namespace JSX {
|
|
6
20
|
interface IntrinsicElements {
|
|
@@ -17,34 +31,5 @@ declare global {
|
|
|
17
31
|
}
|
|
18
32
|
}
|
|
19
33
|
}
|
|
20
|
-
export declare const Caustics:
|
|
21
|
-
|
|
22
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
23
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
24
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
25
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
26
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
27
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
28
|
-
dispose?: (() => void) | null | undefined;
|
|
29
|
-
}>> & {
|
|
30
|
-
position?: ReactThreeFiber.Vector3 | undefined;
|
|
31
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
32
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
33
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
34
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
35
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
36
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
37
|
-
dispose?: (() => void) | null | undefined;
|
|
38
|
-
} & import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers & {
|
|
39
|
-
frames?: number | undefined;
|
|
40
|
-
debug?: boolean | undefined;
|
|
41
|
-
causticsOnly: boolean;
|
|
42
|
-
backside: boolean;
|
|
43
|
-
ior?: number | undefined;
|
|
44
|
-
backsideIOR?: number | undefined;
|
|
45
|
-
worldRadius?: number | undefined;
|
|
46
|
-
intensity?: number | undefined;
|
|
47
|
-
color?: ReactThreeFiber.Color | undefined;
|
|
48
|
-
resolution?: number | undefined;
|
|
49
|
-
lightSource?: React.MutableRefObject<THREE.Object3D<THREE.Event>> | [x: number, y: number, z: number] | undefined;
|
|
50
|
-
}, "visible" | "attach" | "args" | "children" | "key" | "onUpdate" | "position" | "up" | "scale" | "rotation" | "matrix" | "quaternion" | "layers" | "dispose" | "type" | "isGroup" | "id" | "uuid" | "name" | "parent" | "modelViewMatrix" | "normalMatrix" | "matrixWorld" | "matrixAutoUpdate" | "matrixWorldAutoUpdate" | "matrixWorldNeedsUpdate" | "castShadow" | "receiveShadow" | "frustumCulled" | "renderOrder" | "animations" | "userData" | "customDepthMaterial" | "customDistanceMaterial" | "isObject3D" | "onBeforeRender" | "onAfterRender" | "applyMatrix4" | "applyQuaternion" | "setRotationFromAxisAngle" | "setRotationFromEuler" | "setRotationFromMatrix" | "setRotationFromQuaternion" | "rotateOnAxis" | "rotateOnWorldAxis" | "rotateX" | "rotateY" | "rotateZ" | "translateOnAxis" | "translateX" | "translateY" | "translateZ" | "localToWorld" | "worldToLocal" | "lookAt" | "add" | "remove" | "removeFromParent" | "clear" | "getObjectById" | "getObjectByName" | "getObjectByProperty" | "getObjectsByProperty" | "getWorldPosition" | "getWorldQuaternion" | "getWorldScale" | "getWorldDirection" | "raycast" | "traverse" | "traverseVisible" | "traverseAncestors" | "updateMatrix" | "updateMatrixWorld" | "updateWorldMatrix" | "toJSON" | "clone" | "copy" | "addEventListener" | "hasEventListener" | "removeEventListener" | "dispatchEvent" | "color" | keyof import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers | "intensity" | "ior" | "resolution" | "debug" | "frames" | "backside" | "worldRadius" | "causticsOnly" | "backsideIOR" | "lightSource"> & React.RefAttributes<unknown>>;
|
|
34
|
+
export declare const Caustics: ForwardRefComponent<CausticsProps, THREE.Group>;
|
|
35
|
+
export {};
|
package/core/Center.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Group } from 'three';
|
|
2
|
-
import
|
|
2
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
3
3
|
export declare type OnCenterCallbackProps = {
|
|
4
4
|
parent: THREE.Object3D;
|
|
5
5
|
container: THREE.Object3D;
|
|
@@ -28,22 +28,4 @@ export declare type CenterProps = {
|
|
|
28
28
|
onCentered?: (props: OnCenterCallbackProps) => void;
|
|
29
29
|
cacheKey?: any;
|
|
30
30
|
};
|
|
31
|
-
export declare const Center:
|
|
32
|
-
position?: import("@react-three/fiber").Vector3 | undefined;
|
|
33
|
-
up?: import("@react-three/fiber").Vector3 | undefined;
|
|
34
|
-
scale?: import("@react-three/fiber").Vector3 | undefined;
|
|
35
|
-
rotation?: import("@react-three/fiber").Euler | undefined;
|
|
36
|
-
matrix?: import("@react-three/fiber").Matrix4 | undefined;
|
|
37
|
-
quaternion?: import("@react-three/fiber").Quaternion | undefined;
|
|
38
|
-
layers?: import("@react-three/fiber").Layers | undefined;
|
|
39
|
-
dispose?: (() => void) | null | undefined;
|
|
40
|
-
}>> & {
|
|
41
|
-
position?: import("@react-three/fiber").Vector3 | undefined;
|
|
42
|
-
up?: import("@react-three/fiber").Vector3 | undefined;
|
|
43
|
-
scale?: import("@react-three/fiber").Vector3 | undefined;
|
|
44
|
-
rotation?: import("@react-three/fiber").Euler | undefined;
|
|
45
|
-
matrix?: import("@react-three/fiber").Matrix4 | undefined;
|
|
46
|
-
quaternion?: import("@react-three/fiber").Quaternion | undefined;
|
|
47
|
-
layers?: import("@react-three/fiber").Layers | undefined;
|
|
48
|
-
dispose?: (() => void) | null | undefined;
|
|
49
|
-
} & import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers & CenterProps, "visible" | "attach" | "args" | "children" | "key" | "onUpdate" | "position" | "up" | "scale" | "rotation" | "matrix" | "quaternion" | "layers" | "dispose" | "type" | "isGroup" | "id" | "uuid" | "name" | "parent" | "modelViewMatrix" | "normalMatrix" | "matrixWorld" | "matrixAutoUpdate" | "matrixWorldAutoUpdate" | "matrixWorldNeedsUpdate" | "castShadow" | "receiveShadow" | "frustumCulled" | "renderOrder" | "animations" | "userData" | "customDepthMaterial" | "customDistanceMaterial" | "isObject3D" | "onBeforeRender" | "onAfterRender" | "applyMatrix4" | "applyQuaternion" | "setRotationFromAxisAngle" | "setRotationFromEuler" | "setRotationFromMatrix" | "setRotationFromQuaternion" | "rotateOnAxis" | "rotateOnWorldAxis" | "rotateX" | "rotateY" | "rotateZ" | "translateOnAxis" | "translateX" | "translateY" | "translateZ" | "localToWorld" | "worldToLocal" | "lookAt" | "add" | "remove" | "removeFromParent" | "clear" | "getObjectById" | "getObjectByName" | "getObjectByProperty" | "getObjectsByProperty" | "getWorldPosition" | "getWorldQuaternion" | "getWorldScale" | "getWorldDirection" | "raycast" | "traverse" | "traverseVisible" | "traverseAncestors" | "updateMatrix" | "updateMatrixWorld" | "updateWorldMatrix" | "toJSON" | "clone" | "copy" | "addEventListener" | "hasEventListener" | "removeEventListener" | "dispatchEvent" | keyof import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers | keyof CenterProps> & React.RefAttributes<Group>>;
|
|
31
|
+
export declare const Center: ForwardRefComponent<JSX.IntrinsicElements['group'] & CenterProps, Group>;
|
package/core/Clone.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { MeshProps } from '@react-three/fiber';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
5
|
export declare type CloneProps = {
|
|
5
6
|
object: THREE.Object3D | THREE.Object3D[];
|
|
6
7
|
children?: React.ReactNode;
|
|
@@ -11,4 +12,4 @@ export declare type CloneProps = {
|
|
|
11
12
|
receiveShadow?: boolean;
|
|
12
13
|
isChild?: boolean;
|
|
13
14
|
};
|
|
14
|
-
export declare const Clone:
|
|
15
|
+
export declare const Clone: ForwardRefComponent<Omit<JSX.IntrinsicElements['group'], 'children'> & CloneProps, THREE.Group>;
|
package/core/ContactShadows.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as THREE from 'three';
|
|
2
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
3
3
|
export declare type ContactShadowsProps = {
|
|
4
4
|
opacity?: number;
|
|
5
5
|
width?: number;
|
|
@@ -14,4 +14,4 @@ export declare type ContactShadowsProps = {
|
|
|
14
14
|
color?: THREE.ColorRepresentation;
|
|
15
15
|
depthWrite?: boolean;
|
|
16
16
|
};
|
|
17
|
-
export declare const ContactShadows:
|
|
17
|
+
export declare const ContactShadows: ForwardRefComponent<Omit<JSX.IntrinsicElements['group'], 'scale'> & ContactShadowsProps, THREE.Group>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Vector3 } from 'three';
|
|
3
2
|
import { Line2 } from 'three-stdlib';
|
|
4
3
|
import { LineProps } from './Line';
|
|
5
|
-
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
|
+
declare type Props = Omit<LineProps, 'points' | 'ref'> & {
|
|
6
6
|
start: Vector3 | [number, number, number];
|
|
7
7
|
end: Vector3 | [number, number, number];
|
|
8
8
|
midA: Vector3 | [number, number, number];
|
|
9
9
|
midB: Vector3 | [number, number, number];
|
|
10
|
-
segments?: number
|
|
11
|
-
}
|
|
10
|
+
segments?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const CubicBezierLine: ForwardRefComponent<Props, Line2>;
|
|
13
|
+
export {};
|
package/core/CurveModifier.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import { Flow } from 'three-stdlib';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
5
|
export interface CurveModifierProps {
|
|
5
6
|
children: React.ReactElement<JSX.IntrinsicElements['mesh']>;
|
|
6
7
|
curve?: THREE.Curve<THREE.Vector3>;
|
|
7
8
|
}
|
|
8
9
|
export declare type CurveModifierRef = Pick<Flow, 'moveAlongCurve'>;
|
|
9
|
-
export declare const CurveModifier:
|
|
10
|
+
export declare const CurveModifier: ForwardRefComponent<CurveModifierProps, CurveModifierRef>;
|
package/core/Decal.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import * as FIBER from '@react-three/fiber';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
5
|
export declare type DecalProps = Omit<JSX.IntrinsicElements['mesh'], 'children'> & {
|
|
5
6
|
debug?: boolean;
|
|
6
7
|
mesh?: React.MutableRefObject<THREE.Mesh>;
|
|
@@ -12,4 +13,4 @@ export declare type DecalProps = Omit<JSX.IntrinsicElements['mesh'], 'children'>
|
|
|
12
13
|
polygonOffsetFactor?: number;
|
|
13
14
|
depthTest?: boolean;
|
|
14
15
|
};
|
|
15
|
-
export declare const Decal:
|
|
16
|
+
export declare const Decal: ForwardRefComponent<DecalProps, THREE.Mesh>;
|
package/core/Detailed.d.ts
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LOD, Object3D } from 'three';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
up?: import("@react-three/fiber").Vector3 | undefined;
|
|
6
|
-
scale?: import("@react-three/fiber").Vector3 | undefined;
|
|
7
|
-
rotation?: import("@react-three/fiber").Euler | undefined;
|
|
8
|
-
matrix?: import("@react-three/fiber").Matrix4 | undefined;
|
|
9
|
-
quaternion?: import("@react-three/fiber").Quaternion | undefined;
|
|
10
|
-
layers?: import("@react-three/fiber").Layers | undefined;
|
|
11
|
-
dispose?: (() => void) | null | undefined;
|
|
12
|
-
}>> & {
|
|
13
|
-
position?: import("@react-three/fiber").Vector3 | undefined;
|
|
14
|
-
up?: import("@react-three/fiber").Vector3 | undefined;
|
|
15
|
-
scale?: import("@react-three/fiber").Vector3 | undefined;
|
|
16
|
-
rotation?: import("@react-three/fiber").Euler | undefined;
|
|
17
|
-
matrix?: import("@react-three/fiber").Matrix4 | undefined;
|
|
18
|
-
quaternion?: import("@react-three/fiber").Quaternion | undefined;
|
|
19
|
-
layers?: import("@react-three/fiber").Layers | undefined;
|
|
20
|
-
dispose?: (() => void) | null | undefined;
|
|
21
|
-
} & import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers & {
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
+
declare type Props = JSX.IntrinsicElements['lOD'] & {
|
|
22
5
|
children: React.ReactElement<Object3D>[];
|
|
23
|
-
hysteresis?: number
|
|
6
|
+
hysteresis?: number;
|
|
24
7
|
distances: number[];
|
|
25
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const Detailed: ForwardRefComponent<Props, LOD>;
|
|
10
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import * as THREE from 'three';
|
|
4
3
|
import { DeviceOrientationControls as DeviceOrientationControlsImp } from 'three-stdlib';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
5
|
export declare type DeviceOrientationControlsProps = ReactThreeFiber.Object3DNode<DeviceOrientationControlsImp, typeof DeviceOrientationControlsImp> & {
|
|
6
6
|
camera?: THREE.Camera;
|
|
7
7
|
onChange?: (e?: THREE.Event) => void;
|
|
8
8
|
makeDefault?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const DeviceOrientationControls:
|
|
10
|
+
export declare const DeviceOrientationControls: ForwardRefComponent<DeviceOrientationControlsProps, DeviceOrientationControlsImp>;
|
package/core/Edges.d.ts
CHANGED
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import * as THREE from 'three';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
12
|
-
dispose?: (() => void) | null | undefined;
|
|
13
|
-
}>> & {
|
|
14
|
-
position?: ReactThreeFiber.Vector3 | undefined;
|
|
15
|
-
up?: ReactThreeFiber.Vector3 | undefined;
|
|
16
|
-
scale?: ReactThreeFiber.Vector3 | undefined;
|
|
17
|
-
rotation?: ReactThreeFiber.Euler | undefined;
|
|
18
|
-
matrix?: ReactThreeFiber.Matrix4 | undefined;
|
|
19
|
-
quaternion?: ReactThreeFiber.Quaternion | undefined;
|
|
20
|
-
layers?: ReactThreeFiber.Layers | undefined;
|
|
21
|
-
dispose?: (() => void) | null | undefined;
|
|
22
|
-
} & import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers & {
|
|
23
|
-
threshold?: number | undefined;
|
|
24
|
-
color?: ReactThreeFiber.Color | undefined;
|
|
25
|
-
}, "visible" | "attach" | "args" | "children" | "key" | "onUpdate" | "position" | "up" | "scale" | "rotation" | "matrix" | "quaternion" | "layers" | "dispose" | "type" | "id" | "uuid" | "name" | "parent" | "modelViewMatrix" | "normalMatrix" | "matrixWorld" | "matrixAutoUpdate" | "matrixWorldAutoUpdate" | "matrixWorldNeedsUpdate" | "castShadow" | "receiveShadow" | "frustumCulled" | "renderOrder" | "animations" | "userData" | "customDepthMaterial" | "customDistanceMaterial" | "isObject3D" | "onBeforeRender" | "onAfterRender" | "applyMatrix4" | "applyQuaternion" | "setRotationFromAxisAngle" | "setRotationFromEuler" | "setRotationFromMatrix" | "setRotationFromQuaternion" | "rotateOnAxis" | "rotateOnWorldAxis" | "rotateX" | "rotateY" | "rotateZ" | "translateOnAxis" | "translateX" | "translateY" | "translateZ" | "localToWorld" | "worldToLocal" | "lookAt" | "add" | "remove" | "removeFromParent" | "clear" | "getObjectById" | "getObjectByName" | "getObjectByProperty" | "getObjectsByProperty" | "getWorldPosition" | "getWorldQuaternion" | "getWorldScale" | "getWorldDirection" | "raycast" | "traverse" | "traverseVisible" | "traverseAncestors" | "updateMatrix" | "updateMatrixWorld" | "updateWorldMatrix" | "toJSON" | "clone" | "copy" | "addEventListener" | "hasEventListener" | "removeEventListener" | "dispatchEvent" | "color" | keyof import("@react-three/fiber/dist/declarations/src/core/events").EventHandlers | "material" | "geometry" | "morphTargetInfluences" | "morphTargetDictionary" | "updateMorphTargets" | "isLineSegments" | "isLine" | "computeLineDistances" | "threshold"> & React.RefAttributes<THREE.LineSegments<THREE.BufferGeometry, THREE.Material | THREE.Material[]>>>;
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
+
declare type Props = JSX.IntrinsicElements['lineSegments'] & {
|
|
5
|
+
threshold?: number;
|
|
6
|
+
color?: ReactThreeFiber.Color;
|
|
7
|
+
};
|
|
8
|
+
export declare const Edges: ForwardRefComponent<Props, THREE.LineSegments>;
|
|
9
|
+
export {};
|
package/core/Effects.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { WebGLRenderTarget } from 'three';
|
|
3
1
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
4
2
|
import { EffectComposer, RenderPass, ShaderPass } from 'three-stdlib';
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
+
declare type Props = ReactThreeFiber.Node<EffectComposer, typeof EffectComposer> & {
|
|
5
|
+
multisamping?: number;
|
|
6
|
+
encoding?: number;
|
|
7
|
+
type?: number;
|
|
8
|
+
renderIndex?: number;
|
|
9
|
+
disableGamma?: boolean;
|
|
10
|
+
disableRenderPass?: boolean;
|
|
11
|
+
disableRender?: boolean;
|
|
12
|
+
depthBuffer?: boolean;
|
|
13
|
+
stencilBuffer?: boolean;
|
|
14
|
+
anisotropy?: number;
|
|
15
|
+
};
|
|
5
16
|
declare global {
|
|
6
17
|
namespace JSX {
|
|
7
18
|
interface IntrinsicElements {
|
|
@@ -12,15 +23,5 @@ declare global {
|
|
|
12
23
|
}
|
|
13
24
|
}
|
|
14
25
|
export declare const isWebGL2Available: () => boolean;
|
|
15
|
-
export declare const Effects:
|
|
16
|
-
|
|
17
|
-
encoding?: number | undefined;
|
|
18
|
-
type?: number | undefined;
|
|
19
|
-
renderIndex?: number | undefined;
|
|
20
|
-
disableGamma?: boolean | undefined;
|
|
21
|
-
disableRenderPass?: boolean | undefined;
|
|
22
|
-
disableRender?: boolean | undefined;
|
|
23
|
-
depthBuffer?: boolean | undefined;
|
|
24
|
-
stencilBuffer?: boolean | undefined;
|
|
25
|
-
anisotropy?: number | undefined;
|
|
26
|
-
}, "attach" | "args" | "children" | "key" | "onUpdate" | "type" | "anisotropy" | "encoding" | keyof EffectComposer<WebGLRenderTarget> | "multisamping" | "renderIndex" | "disableRender" | "disableGamma" | "disableRenderPass" | "depthBuffer" | "stencilBuffer"> & React.RefAttributes<unknown>>;
|
|
26
|
+
export declare const Effects: ForwardRefComponent<Props, EffectComposer>;
|
|
27
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Object3DNode } from '@react-three/fiber';
|
|
3
2
|
import { FirstPersonControls as FirstPersonControlImpl } from 'three-stdlib';
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
4
|
export declare type FirstPersonControlsProps = Object3DNode<FirstPersonControlImpl, typeof FirstPersonControlImpl> & {
|
|
5
5
|
domElement?: HTMLElement;
|
|
6
6
|
makeDefault?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const FirstPersonControls:
|
|
8
|
+
export declare const FirstPersonControls: ForwardRefComponent<FirstPersonControlsProps, FirstPersonControlImpl>;
|
package/core/Float.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
3
4
|
export declare type FloatProps = JSX.IntrinsicElements['group'] & {
|
|
4
5
|
enabled?: boolean;
|
|
5
6
|
speed?: number;
|
|
@@ -8,4 +9,4 @@ export declare type FloatProps = JSX.IntrinsicElements['group'] & {
|
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
floatingRange?: [number?, number?];
|
|
10
11
|
};
|
|
11
|
-
export declare const Float:
|
|
12
|
+
export declare const Float: ForwardRefComponent<FloatProps, THREE.Group>;
|
package/core/FlyControls.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactThreeFiber } from '@react-three/fiber';
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import * as THREE from 'three';
|
|
4
3
|
import { FlyControls as FlyControlsImpl } from 'three-stdlib';
|
|
4
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
5
5
|
export declare type FlyControlsProps = ReactThreeFiber.Object3DNode<FlyControlsImpl, typeof FlyControlsImpl> & {
|
|
6
6
|
onChange?: (e?: THREE.Event) => void;
|
|
7
7
|
domElement?: HTMLElement;
|
|
8
8
|
makeDefault?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const FlyControls:
|
|
10
|
+
export declare const FlyControls: ForwardRefComponent<FlyControlsProps, FlyControlsImpl>;
|
package/core/Gltf.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as THREE from 'three';
|
|
3
2
|
import { CloneProps } from './Clone';
|
|
4
|
-
|
|
3
|
+
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
+
declare type GltfProps = Omit<JSX.IntrinsicElements['group'], 'children'> & Omit<CloneProps, 'object'> & {
|
|
5
5
|
src: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export declare const Gltf: ForwardRefComponent<GltfProps, THREE.Object3D>;
|
|
8
|
+
export {};
|