Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/three

Package Overview
Dependencies
Maintainers
1
Versions
231
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/three - npm Package Compare versions

Comparing version 0.156.0 to 0.157.0

1

three/examples/jsm/capabilities/WebGL.d.ts

@@ -5,2 +5,3 @@ // tslint:disable-next-line:no-unnecessary-class

static isWebGL2Available(): boolean;
static isColorSpaceAvailable(colorSpace: PredefinedColorSpace): boolean;
static getWebGLErrorMessage(): HTMLElement;

@@ -7,0 +8,0 @@ static getWebGL2ErrorMessage(): HTMLElement;

@@ -19,2 +19,3 @@ import { Camera, EventDispatcher, Object3D, Raycaster } from '../../../src/Three.js';

enabled: boolean;
recursive: boolean;
transformGroup: boolean;

@@ -21,0 +22,0 @@

8

three/examples/jsm/controls/OrbitControls.d.ts

@@ -209,3 +209,7 @@ import { Camera, EventDispatcher, MOUSE, TOUCH, Vector3 } from '../../../src/Three.js';

*/
mouseButtons: Partial<{ LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE }>;
mouseButtons: {
LEFT?: MOUSE | null | undefined;
MIDDLE?: MOUSE | null | undefined;
RIGHT?: MOUSE | null | undefined;
};

@@ -216,3 +220,3 @@ /**

*/
touches: Partial<{ ONE: TOUCH; TWO: TOUCH }>;
touches: { ONE?: TOUCH | null | undefined; TWO?: TOUCH | null | undefined };

@@ -219,0 +223,0 @@ /**

@@ -32,3 +32,7 @@ import { Camera, EventDispatcher, MOUSE, Vector3 } from '../../../src/Three.js';

keys: string[];
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
mouseButtons: {
LEFT?: MOUSE | null | undefined;
MIDDLE?: MOUSE | null | undefined;
RIGHT?: MOUSE | null | undefined;
};

@@ -35,0 +39,0 @@ target: Vector3;

@@ -57,3 +57,7 @@ import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion, Object3DEventMap } from '../../../src/Three.js';

readonly isTransformControls: true;
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
mouseButtons: {
LEFT?: MOUSE | null | undefined;
MIDDLE?: MOUSE | null | undefined;
RIGHT?: MOUSE | null | undefined;
};

@@ -60,0 +64,0 @@ attach(object: Object3D): this;

@@ -8,3 +8,3 @@ /**

import { WebGLRenderer, WebGLRenderTarget, TextureDataType } from '../../../src/Three.js';
import { DataTexture, TextureDataType, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three.js';

@@ -22,2 +22,3 @@ export const NO_COMPRESSION: 0;

parse(renderer: WebGLRenderer, renderTarget: WebGLRenderTarget, options?: EXRExporterParseOptions): Uint8Array;
parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Uint8Array;
}

@@ -9,4 +9,12 @@ import { Loader, LoadingManager, BufferGeometry } from '../../../src/Three.js';

setWorkerLimit(workerLimit: number): DRACOLoader;
load(
url: string,
onLoad?: (data: BufferGeometry) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (err: unknown) => void,
): void;
preload(): DRACOLoader;
dispose(): DRACOLoader;
}

@@ -6,2 +6,9 @@ import { Shape, Loader, LoadingManager } from '../../../src/Three.js';

load(
url: string,
onLoad?: (data: Font) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (err: unknown) => void,
): void;
parse(json: any): Font;

@@ -8,0 +15,0 @@ }

@@ -7,3 +7,3 @@ import Node from '../core/Node.js';

getHash(): 'reflectVector';
construct(): Node;
setup(): Node;
}

@@ -21,3 +21,3 @@ import { AnyJson, NodeTypeOption, NodeUpdateTypeOption } from './constants.js';

getReference(builder: NodeBuilder): Node;
construct(builder: NodeBuilder): Node | null;
setup(builder: NodeBuilder): Node | null;
analyze(builder: NodeBuilder): void;

@@ -24,0 +24,0 @@ generate(builder: NodeBuilder, output?: string | null): string;

@@ -31,3 +31,3 @@ import TempNode from '../core/TempNode.js';

construct(): Node;
setup(): Node;
}

@@ -1,2 +0,2 @@

// Type definitions for three 0.156
// Type definitions for three 0.157
// Project: https://threejs.org/

@@ -3,0 +3,0 @@ // Definitions by: Josh Ellis <https://github.com/joshuaellis>

{
"name": "@types/three",
"version": "0.156.0",
"version": "0.157.0",
"description": "TypeScript definitions for three",

@@ -33,4 +33,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",

},
"typesPublisherContentHash": "c7fc65a1fef93103d5e9db486206657217d03ee8c514a14ecd05aaa469b45a0c",
"typeScriptVersion": "4.3",
"typesPublisherContentHash": "63c77dccf70738b5366bf087bb39ca6274f45193346ed998ac0605d8e560fe57",
"typeScriptVersion": "4.5",
"exports": {

@@ -37,0 +37,0 @@ ".": {

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 08 Sep 2023 18:03:16 GMT
* Last updated: Tue, 10 Oct 2023 07:05:53 GMT
* Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/meshoptimizer](https://npmjs.com/package/@types/meshoptimizer), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr)

@@ -14,0 +14,0 @@ * Global values: `THREE`

import { AnimationClip } from './AnimationClip.js';
export function arraySlice(array: any, from: number, to: number): any;
export function convertArray(array: any, type: any, forceClone: boolean): any;

@@ -5,0 +4,0 @@ export function isTypedArray(object: any): boolean;

@@ -1,5 +0,5 @@

import { WebGLCubeRenderTarget } from './../renderers/WebGLCubeRenderTarget.js';
import { Scene } from './../scenes/Scene.js';
import { WebGLRenderer } from './../renderers/WebGLRenderer.js';
import { Object3D } from './../core/Object3D.js';
import { WebGLCubeRenderTarget } from '../renderers/WebGLCubeRenderTarget.js';
import { Scene } from '../scenes/Scene.js';
import { WebGLRenderer } from '../renderers/WebGLRenderer.js';
import { Object3D } from '../core/Object3D.js';
import { CoordinateSystem } from '../constants.js';

@@ -59,2 +59,4 @@

activeMipmapLevel: number;
updateCoordinateSystem(): void;

@@ -61,0 +63,0 @@

@@ -727,2 +727,10 @@ export const REVISION: string;

export const LinearTransfer: 'linear';
export const SRGBTransfer: 'srgb';
export type ColorSpaceTransfer = typeof LinearTransfer | typeof SRGBTransfer;
export const Rec709Primaries: 'rec709';
export const P3Primaries: 'p3';
export type ColorSpacePrimaries = typeof Rec709Primaries | typeof P3Primaries;
// Stencil Op types

@@ -729,0 +737,0 @@ export const ZeroStencilOp: 0;

@@ -1,6 +0,6 @@

import { Vector3 } from './../math/Vector3.js';
import { Vector3 } from '../math/Vector3.js';
import { Object3D } from './Object3D.js';
import { Vector2 } from './../math/Vector2.js';
import { Ray } from './../math/Ray.js';
import { Camera } from './../cameras/Camera.js';
import { Vector2 } from '../math/Vector2.js';
import { Ray } from '../math/Ray.js';
import { Camera } from '../cameras/Camera.js';
import { Layers } from './Layers.js';

@@ -37,8 +37,8 @@

export interface RaycasterParameters {
Mesh?: any;
Line?: { threshold: number } | undefined;
Line2?: { threshold: number } | undefined;
LOD?: any;
Points?: { threshold: number } | undefined;
Sprite?: any;
Mesh: any;
Line: { threshold: number };
Line2?: { threshold: number };
LOD: any;
Points: { threshold: number };
Sprite: any;
}

@@ -45,0 +45,0 @@

@@ -12,2 +12,3 @@ import { Vector4 } from '../math/Vector4.js';

ColorSpace,
PixelFormatGPU,
} from '../constants.js';

@@ -25,2 +26,3 @@

colorSpace?: ColorSpace | undefined;
internalFormat?: PixelFormatGPU | null | undefined;
depthBuffer?: boolean | undefined; // true;

@@ -27,0 +29,0 @@ stencilBuffer?: boolean | undefined; // false;

import { Curve } from './Curve.js';
import { Vector } from './../../math/Vector2.js';
import { Vector } from '../../math/Vector2.js';

@@ -44,3 +44,3 @@ /**

*/
closePath(): void;
closePath(): this;

@@ -47,0 +47,0 @@ getPoint(t: number, optionalTarget?: T): T;

@@ -55,5 +55,5 @@ import { Vector2 } from './../../math/Vector2.js';

* @param endAngle The end angle in radians. Expects a `Float`
* @param clockwise Sweep the arc clockwise. . Default `false`
* @param clockwise Sweep the arc clockwise. Default `false`
*/
absarc(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise: boolean): this;
absarc(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise?: boolean): this;

@@ -68,3 +68,3 @@ /**

* @param endAngle The end angle in radians. Expects a `Float`
* @param clockwise Sweep the ellipse clockwise. . Default `false`
* @param clockwise Sweep the ellipse clockwise. Default `false`
* @param rotation The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. Optional, Expects a `Float`. Default `0`

@@ -79,3 +79,3 @@ */

aEndAngle: number,
aClockwise: boolean,
aClockwise?: boolean,
aRotation?: number,

@@ -91,5 +91,5 @@ ): this;

* @param endAngle The end angle in radians. Expects a `Float`
* @param clockwise Sweep the arc clockwise. . Default `false`
* @param clockwise Sweep the arc clockwise. Default `false`
*/
arc(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise: boolean): this;
arc(aX: number, aY: number, aRadius: number, aStartAngle: number, aEndAngle: number, aClockwise?: boolean): this;

@@ -115,3 +115,3 @@ /**

* @param endAngle The end angle in radians. Expects a `Float`
* @param clockwise Sweep the ellipse clockwise. . Default `false`
* @param clockwise Sweep the ellipse clockwise. Default `false`
* @param rotation The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. Optional, Expects a `Float`. Default `0`

@@ -126,4 +126,4 @@ */

aEndAngle: number,
aClockwise: boolean,
aRotation: number,
aClockwise?: boolean,
aRotation?: number,
): this;

@@ -130,0 +130,0 @@

@@ -7,2 +7,9 @@ import { Loader } from './Loader.js';

load(
url: string,
onLoad?: (data: string | ArrayBuffer) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (err: unknown) => void,
): void;
mimeType: undefined | MimeType;

@@ -9,0 +16,0 @@ responseType: undefined | string;

@@ -7,2 +7,9 @@ import { Loader } from './Loader.js';

load(
url: string,
onLoad?: (data: ImageBitmap) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (err: unknown) => void,
): void;
/**

@@ -9,0 +16,0 @@ * @default { premultiplyAlpha: 'none' }

@@ -37,3 +37,3 @@ import { LoadingManager } from './LoadingManager.js';

url: TUrl,
onLoad?: (data: TData) => void,
onLoad: (data: TData) => void,
onProgress?: (event: ProgressEvent) => void,

@@ -40,0 +40,0 @@ onError?: (err: unknown) => void,

@@ -14,2 +14,9 @@ import { Loader } from './Loader.js';

load(
url: string,
onLoad?: (data: Object3D) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (err: unknown) => void,
): void;
parse(json: unknown, onLoad?: (object: Object3D) => void): Object3D;

@@ -16,0 +23,0 @@ parseAsync(json: unknown): Promise<Object3D>;

@@ -69,2 +69,8 @@ import { Plane } from '../math/Plane.js';

/**
* Enables alpha hashed transparency, an alternative to {@link .transparent} or {@link .alphaTest}. The material
* will not be rendered if opacity is lower than a random threshold. Randomization introduces some grain or noise,
* but approximates alpha blending without the associated problems of sorting. Using TAARenderPass can reduce the
* resulting noise.
*/
alphaHash: boolean;

@@ -71,0 +77,0 @@

@@ -207,4 +207,3 @@ import { ColorSpace } from '../constants.js';

set(color: ColorRepresentation): this;
set(r: number, g: number, b: number): this;
set(...args: [color: ColorRepresentation] | [r: number, g: number, b: number]): this;

@@ -211,0 +210,0 @@ /**

@@ -1,13 +0,24 @@

import { ColorSpace, DisplayP3ColorSpace, LinearSRGBColorSpace, SRGBColorSpace } from '../constants.js';
import {
ColorSpace,
ColorSpacePrimaries,
ColorSpaceTransfer,
DisplayP3ColorSpace,
LinearDisplayP3ColorSpace,
LinearSRGBColorSpace,
SRGBColorSpace,
} from '../constants.js';
import { Color } from './Color.js';
export function SRGBToLinear(c: number): number;
export type WorkingColorSpace = typeof LinearSRGBColorSpace | typeof LinearDisplayP3ColorSpace;
export type DefinedColorSpace =
| typeof LinearSRGBColorSpace
| typeof SRGBColorSpace
| typeof LinearDisplayP3ColorSpace
| typeof DisplayP3ColorSpace;
export function LinearToSRGB(c: number): number;
export namespace ColorManagement {
export interface ColorManagement {
/**
* @default false
*/
let enabled: boolean;
enabled: boolean;

@@ -17,19 +28,20 @@ /**

*/
let workingColorSpace: ColorSpace;
get workingColorSpace(): WorkingColorSpace;
set workingSpaceColor(colorSpace: WorkingColorSpace);
function convert(
color: Color,
sourceColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
targetColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
): Color;
convert: (color: Color, sourceColorSpace: DefinedColorSpace, targetColorSpace: DefinedColorSpace) => Color;
function fromWorkingColorSpace(
color: Color,
targetColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
): Color;
fromWorkingColorSpace: (color: Color, targetColorSpace: DefinedColorSpace) => Color;
function toWorkingColorSpace(
color: Color,
sourceColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
): Color;
toWorkingColorSpace: (color: Color, sourceColorSpace: DefinedColorSpace) => Color;
getPrimaries: (colorSpace: DefinedColorSpace) => ColorSpacePrimaries;
getTransfer: (colorSpace: ColorSpace) => ColorSpaceTransfer;
}
export const ColorManagement: ColorManagement;
export function SRGBToLinear(c: number): number;
export function LinearToSRGB(c: number): number;

@@ -1,5 +0,3 @@

import { Vector2 } from './../math/Vector2.js';
import { Raycaster } from './../core/Raycaster.js';
import { Object3D } from './../core/Object3D.js';
import { Intersection } from '../core/Raycaster.js';
import { Vector2 } from '../math/Vector2.js';
import { Object3D } from '../core/Object3D.js';
import { SpriteMaterial } from '../materials/Materials.js';

@@ -6,0 +4,0 @@ import { BufferGeometry } from '../core/BufferGeometry.js';

@@ -20,2 +20,5 @@ import { WebGLExtensions } from './WebGLExtensions.js';

numSpotShadows: number;
numSpotMaps: number;
numLightProbes: number;
};

@@ -39,2 +42,4 @@

hemi: any[];
numSpotLightShadowsWithMaps: number;
numLightProbes: number;
};

@@ -41,0 +46,0 @@

@@ -1,2 +0,2 @@

import { WebGLRenderer } from './../WebGLRenderer.js';
import { WebGLRenderer } from '../WebGLRenderer.js';
import { WebGLShader } from './WebGLShader.js';

@@ -3,0 +3,0 @@ import { WebGLUniforms } from './WebGLUniforms.js';

@@ -209,3 +209,4 @@ import { Scene } from '../scenes/Scene.js';

*/
outputColorSpace: ColorSpace;
get outputColorSpace(): ColorSpace;
set outputColorSpace(colorSpace: ColorSpace);

@@ -212,0 +213,0 @@ get coordinateSystem(): typeof WebGLCoordinateSystem;

@@ -108,4 +108,2 @@ /**

export * from './lights/Light.js';
export * from './lights/AmbientLightProbe.js';
export * from './lights/HemisphereLightProbe.js';
export * from './lights/LightProbe.js';

@@ -162,3 +160,3 @@ /**

export * from './math/SphericalHarmonics3.js';
export { ColorManagement } from './math/ColorManagement.js';
export { ColorManagement, WorkingColorSpace, DefinedColorSpace } from './math/ColorManagement.js';
import * as MathUtils from './math/MathUtils.js';

@@ -165,0 +163,0 @@ export { MathUtils };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc