Skip to content

Commit

Permalink
r130 merge
Browse files Browse the repository at this point in the history
r130
  • Loading branch information
joshuaellis authored Jul 5, 2021
2 parents 86c07af + 685896c commit a696e18
Show file tree
Hide file tree
Showing 67 changed files with 633 additions and 499 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"devDependencies": {
"@definitelytyped/dtslint-runner": "^0.0.66",
"all-contributors-cli": "^6.19.0",
"dtslint": "^4.0.6",
"dtslint": "latest",
"prettier": "2.3.2",
"typescript": "^4.1.3"
"typescript": "next"
}
}
34 changes: 17 additions & 17 deletions types/three/examples/jsm/animation/MMDAnimationHelper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@ import { CCDIKSolver } from './CCDIKSolver';
import { MMDPhysics } from './MMDPhysics';

export interface MMDAnimationHelperParameter {
sync?: boolean;
afterglow?: number;
resetPhysicsOnLoop?: boolean;
sync?: boolean | undefined;
afterglow?: number | undefined;
resetPhysicsOnLoop?: boolean | undefined;
}

export interface MMDAnimationHelperAddParameter {
animation?: AnimationClip | AnimationClip[];
physics?: boolean;
warmup?: number;
unitStep?: number;
maxStepNum?: number;
gravity?: number;
delayTime?: number;
animation?: AnimationClip | AnimationClip[] | undefined;
physics?: boolean | undefined;
warmup?: number | undefined;
unitStep?: number | undefined;
maxStepNum?: number | undefined;
gravity?: number | undefined;
delayTime?: number | undefined;
}

export interface MMDAnimationHelperPoseParameter {
resetPose?: boolean;
ik?: boolean;
grant?: boolean;
resetPose?: boolean | undefined;
ik?: boolean | undefined;
grant?: boolean | undefined;
}

export interface MMDAnimationHelperMixer {
looped: boolean;
mixer?: AnimationMixer;
mixer?: AnimationMixer | undefined;
ikSolver: CCDIKSolver;
grantSolver: GrantSolver;
physics?: MMDPhysics;
duration?: number;
physics?: MMDPhysics | undefined;
duration?: number | undefined;
}

export class MMDAnimationHelper {
Expand Down Expand Up @@ -77,7 +77,7 @@ export class MMDAnimationHelper {
}

export interface AudioManagerParameter {
delayTime?: number;
delayTime?: number | undefined;
}

export class AudioManager {
Expand Down
6 changes: 3 additions & 3 deletions types/three/examples/jsm/animation/MMDPhysics.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Bone, Euler, Matrix4, Object3D, Quaternion, SkinnedMesh, Vector3 } from '../../../src/Three';

export interface MMDPhysicsParameter {
unitStep?: number;
maxStepNum?: number;
gravity?: Vector3;
unitStep?: number | undefined;
maxStepNum?: number | undefined;
gravity?: Vector3 | undefined;
}

export class MMDPhysics {
Expand Down
8 changes: 4 additions & 4 deletions types/three/examples/jsm/effects/OutlineEffect.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Camera, Scene, Vector2, Vector4, WebGLRenderer, WebGLRenderTarget, WebGLShadowMap } from '../../../src/Three';

export interface OutlineEffectParameters {
defaultThickness?: number;
defaultColor?: number[];
defaultAlpha?: number;
defaultKeepAlive?: boolean;
defaultThickness?: number | undefined;
defaultColor?: number[] | undefined;
defaultAlpha?: number | undefined;
defaultKeepAlive?: boolean | undefined;
}

export class OutlineEffect {
Expand Down
64 changes: 32 additions & 32 deletions types/three/examples/jsm/libs/fflate.module.min.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface DeflateOptions {
* - become 400 kB with level 1 in 10ms
* - become 320 kB with level 9 in 100ms
*/
level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined;
/**
* The memory level to use, ranging from 0-12. Increasing this increases speed and compression ratio at the cost of memory.
*
Expand All @@ -27,7 +27,7 @@ export interface DeflateOptions {
*
* The default value is automatically determined based on the size of the input data.
*/
mem?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
mem?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | undefined;
}
/**
* Options for compressing data into a GZIP format
Expand All @@ -37,12 +37,12 @@ export interface GzipOptions extends DeflateOptions {
* When the file was last modified. Defaults to the current time.
* Set this to 0 to avoid revealing a modification date entirely.
*/
mtime?: Date | string | number;
mtime?: Date | string | number | undefined;
/**
* The filename of the data. If the `gunzip` command is used to decompress the data, it will output a file
* with this name instead of the name of the compressed file.
*/
filename?: string;
filename?: string | undefined;
}
/**
* Options for compressing data into a Zlib format
Expand Down Expand Up @@ -72,7 +72,7 @@ interface AsyncOptions {
* Whether or not to "consume" the source data. This will make the typed array/buffer you pass in
* unusable but will increase performance and reduce memory usage.
*/
consume?: boolean;
consume?: boolean | undefined;
}
/**
* Options for compressing data asynchronously into a DEFLATE format
Expand All @@ -87,7 +87,7 @@ export interface AsyncInflateOptions extends AsyncOptions {
* writing into a buffer you provide; the best you can do is provide the
* size in bytes and be given back a new typed array.
*/
size?: number;
size?: number | undefined;
}
/**
* Options for compressing data asynchronously into a GZIP format
Expand Down Expand Up @@ -649,7 +649,7 @@ export interface ZipAttributes {
* by PKZIP's APPNOTE.txt, section 4.4.2.2. For example, 0 (the default)
* is MS/DOS, 3 is UNIX, 19 is macOS.
*/
os?: number;
os?: number | undefined;
/**
* The file's attributes. These are traditionally somewhat complicated
* and platform-dependent, so using them is scarcely necessary. However,
Expand All @@ -669,7 +669,7 @@ export interface ZipAttributes {
*
* If you want to set the Unix permissions, for instance, just bit shift by 16, e.g. 0644 << 16
*/
attrs?: number;
attrs?: number | undefined;
/**
* Extra metadata to add to the file. This field is defined by PKZIP's APPNOTE.txt,
* section 4.4.28. At most 65,535 bytes may be used in each ID. The ID must be an
Expand All @@ -678,17 +678,17 @@ export interface ZipAttributes {
* This field is incredibly rare and almost never needed except for compliance with
* proprietary standards and software.
*/
extra?: Record<number, Uint8Array>;
extra?: Record<number, Uint8Array> | undefined;
/**
* The comment to attach to the file. This field is defined by PKZIP's APPNOTE.txt,
* section 4.4.26. The comment must be at most 65,535 bytes long UTF-8 encoded. This
* field is not read by consumer software.
*/
comment?: string;
comment?: string | undefined;
/**
* When the file was last modified. Defaults to the current time.
*/
mtime?: GzipOptions['mtime'];
mtime?: GzipOptions['mtime'] | undefined;
}
/**
* Options for creating a ZIP archive
Expand Down Expand Up @@ -845,7 +845,7 @@ export interface ZipInputFile extends ZipAttributes {
* APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely
* to be necessary.
*/
flag?: number;
flag?: number | undefined;
/**
* The handler to be called when data is added. After passing this stream to
* the ZIP file object, this handler will always be defined. To call it:
Expand All @@ -859,14 +859,14 @@ export interface ZipInputFile extends ZipAttributes {
*
* final = boolean, whether this is the final chunk in the stream
*/
ondata?: AsyncFlateStreamHandler;
ondata?: AsyncFlateStreamHandler | undefined;
/**
* A method called when the stream is no longer needed, for clean-up
* purposes. This will not always be called after the stream completes,
* so you may wish to call this.terminate() after the final chunk is
* processed if you have clean-up logic.
*/
terminate?: AsyncTerminable;
terminate?: AsyncTerminable | undefined;
}
/**
* A pass-through stream to keep data uncompressed in a ZIP archive.
Expand All @@ -876,11 +876,11 @@ export class ZipPassThrough implements ZipInputFile {
crc: number;
size: number;
compression: number;
os?: number;
attrs?: number;
comment?: string;
extra?: Record<number, Uint8Array>;
mtime?: GzipOptions['mtime'];
os?: number | undefined;
attrs?: number | undefined;
comment?: string | undefined;
extra?: Record<number, Uint8Array> | undefined;
mtime?: GzipOptions['mtime'] | undefined;
ondata: AsyncFlateStreamHandler;
private c;
/**
Expand Down Expand Up @@ -916,11 +916,11 @@ export class ZipDeflate implements ZipInputFile {
size: number;
compression: number;
flag: 0 | 1 | 2 | 3;
os?: number;
attrs?: number;
comment?: string;
extra?: Record<number, Uint8Array>;
mtime?: GzipOptions['mtime'];
os?: number | undefined;
attrs?: number | undefined;
comment?: string | undefined;
extra?: Record<number, Uint8Array> | undefined;
mtime?: GzipOptions['mtime'] | undefined;
ondata: AsyncFlateStreamHandler;
private d;
/**
Expand All @@ -946,11 +946,11 @@ export class AsyncZipDeflate implements ZipInputFile {
size: number;
compression: number;
flag: 0 | 1 | 2 | 3;
os?: number;
attrs?: number;
comment?: string;
extra?: Record<number, Uint8Array>;
mtime?: GzipOptions['mtime'];
os?: number | undefined;
attrs?: number | undefined;
comment?: string | undefined;
extra?: Record<number, Uint8Array> | undefined;
mtime?: GzipOptions['mtime'] | undefined;
ondata: AsyncFlateStreamHandler;
private d;
terminate: AsyncTerminable;
Expand Down Expand Up @@ -1043,7 +1043,7 @@ export interface UnzipDecoder {
* A method to terminate any internal workers used by the stream. Subsequent
* calls to push() should silently fail.
*/
terminate?: AsyncTerminable;
terminate?: AsyncTerminable | undefined;
}
/**
* A constructor for a decoder for unzip streams
Expand Down Expand Up @@ -1085,11 +1085,11 @@ export interface UnzipFile {
/**
* The compressed size of the file
*/
size?: number;
size?: number | undefined;
/**
* The original size of the file
*/
originalSize?: number;
originalSize?: number | undefined;
/**
* Starts reading from the stream. Calling this function will always enable
* this stream, but ocassionally the stream will be enabled even without
Expand Down
16 changes: 8 additions & 8 deletions types/three/examples/jsm/lines/LineMaterial.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Color, MaterialParameters, ShaderMaterial, Vector2 } from '../../../src/Three';

export interface LineMaterialParameters extends MaterialParameters {
color?: number;
dashed?: boolean;
dashScale?: number;
dashSize?: number;
dashOffset?: number;
gapSize?: number;
linewidth?: number;
resolution?: Vector2;
color?: number | undefined;
dashed?: boolean | undefined;
dashScale?: number | undefined;
dashSize?: number | undefined;
dashOffset?: number | undefined;
gapSize?: number | undefined;
linewidth?: number | undefined;
resolution?: Vector2 | undefined;
}

export class LineMaterial extends ShaderMaterial {
Expand Down
32 changes: 17 additions & 15 deletions types/three/examples/jsm/loaders/GLTFLoader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export interface GLTF {
scenes: Group[];
cameras: Camera[];
asset: {
copyright?: string;
generator?: string;
version?: string;
minVersion?: string;
copyright?: string | undefined;
generator?: string | undefined;
version?: string | undefined;
minVersion?: string | undefined;
extensions?: any;
extras?: any;
};
Expand Down Expand Up @@ -93,7 +93,7 @@ export class GLTFParser {
mapName: string,
mapDef: {
index: number;
texCoord?: number;
texCoord?: number | undefined;
extensions?: any;
},
) => Promise<void>;
Expand All @@ -113,21 +113,23 @@ export class GLTFParser {
loadCamera: (cameraIndex: number) => Promise<Camera>;
loadSkin: (skinIndex: number) => Promise<{
joints: number[];
inverseBindMatrices?: BufferAttribute | InterleavedBufferAttribute;
inverseBindMatrices?: BufferAttribute | InterleavedBufferAttribute | undefined;
}>;
loadAnimation: (animationIndex: number) => Promise<AnimationClip>;
loadNode: (nodeIndex: number) => Promise<Object3D>;
loadScene: () => Promise<Group>;
}

export interface GLTFLoaderPlugin {
beforeRoot?: () => Promise<void> | null;
afterRoot?: (result: GLTF) => Promise<void> | null;
loadMesh?: (meshIndex: number) => Promise<Group | Mesh | SkinnedMesh> | null;
loadBufferView?: (bufferViewIndex: number) => Promise<ArrayBuffer> | null;
loadMaterial?: (materialIndex: number) => Promise<Material> | null;
loadTexture?: (textureIndex: number) => Promise<Texture> | null;
getMaterialType?: (materialIndex: number) => typeof Material | null;
extendMaterialParams?: (materialIndex: number, materialParams: { [key: string]: any }) => Promise<any> | null;
createNodeAttachment?: (nodeIndex: number) => Promise<Object3D> | null;
beforeRoot?: (() => Promise<void> | null) | undefined;
afterRoot?: ((result: GLTF) => Promise<void> | null) | undefined;
loadMesh?: ((meshIndex: number) => Promise<Group | Mesh | SkinnedMesh> | null) | undefined;
loadBufferView?: ((bufferViewIndex: number) => Promise<ArrayBuffer> | null) | undefined;
loadMaterial?: ((materialIndex: number) => Promise<Material> | null) | undefined;
loadTexture?: ((textureIndex: number) => Promise<Texture> | null) | undefined;
getMaterialType?: ((materialIndex: number) => typeof Material | null) | undefined;
extendMaterialParams?:
| ((materialIndex: number, materialParams: { [key: string]: any }) => Promise<any> | null)
| undefined;
createNodeAttachment?: ((nodeIndex: number) => Promise<Object3D> | null) | undefined;
}
Loading

0 comments on commit a696e18

Please sign in to comment.