Socket
Socket
Sign inDemoInstall

@types/three

Package Overview
Dependencies
Maintainers
1
Versions
230
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.157.2 to 0.158.0

three/examples/jsm/Addons.d.ts

18

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

@@ -48,2 +48,8 @@ import { Camera, EventDispatcher, MOUSE, TOUCH, Vector3 } from '../../../src/Three.js';

/**
* The focus point of the {@link .minTargetRadius} and {@link .maxTargetRadius} limits. It can be updated manually
* at any point to change the center of interest for the {@link .target}.
*/
cursor: Vector3;
/**
* How far you can dolly in ( PerspectiveCamera only ).

@@ -73,2 +79,14 @@ * @default 0

/**
* How close you can get the target to the 3D {@link .cursor}.
* @default 0
*/
minTargetRadius: number;
/**
* How far you can move the target from the 3D {@link .cursor}.
* @default Infinity
*/
maxTargetRadius: number;
/**
* How far you can orbit vertically, lower limit.

@@ -75,0 +93,0 @@ * Range is 0 to Math.PI radians.

10

three/examples/jsm/libs/lil-gui.module.min.d.ts

@@ -343,3 +343,3 @@ export type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];

*/
object: object;
object: T;
/**

@@ -402,3 +402,3 @@ * The name of the property to control.

*/
onChange(callback: (value: T[K]) => void): this;
onChange(callback: (this: this, value: T[K]) => void): this;
/**

@@ -408,3 +408,3 @@ * Used to access the function bound to `onChange` events. Don't modify this value directly.

*/
_onChange: (value: T[K]) => void;
_onChange: (this: this, value: T[K]) => void;
/**

@@ -426,3 +426,3 @@ * Calls the onChange methods of this controller and its parent GUI.

*/
onFinishChange(callback: (value: T[K]) => void): this;
onFinishChange(callback: (this: this, value: T[K]) => void): this;
/**

@@ -432,3 +432,3 @@ * Used to access the function bound to `onFinishChange` events. Don't modify this value

*/
_onFinishChange: (value: T[K]) => void;
_onFinishChange: (this: this, value: T[K]) => void;
/**

@@ -435,0 +435,0 @@ * Should be called by Controller when its widgets lose focus.

import { LoadingManager, CompressedTextureLoader, CompressedTexture, WebGLRenderer } from '../../../src/Three.js';
import WebGPURenderer from '../renderers/webgpu/WebGPURenderer.js';

@@ -8,3 +9,3 @@ export class KTX2Loader extends CompressedTextureLoader {

setWorkerLimit(limit: number): KTX2Loader;
detectSupport(renderer: WebGLRenderer): KTX2Loader;
detectSupport(renderer: WebGLRenderer | WebGPURenderer): KTX2Loader;
dispose(): KTX2Loader;

@@ -11,0 +12,0 @@

@@ -14,3 +14,3 @@ import { DataTextureLoader, TextureDataType, LoadingManager, PixelFormat } from '../../../src/Three.js';

type: TextureDataType;
constructor(manager: LoadingManager);
constructor(manager?: LoadingManager);

@@ -17,0 +17,0 @@ parse(buffer: Iterable<number>): LogLuv;

@@ -1,8 +0,8 @@

import { Points, Loader, LoadingManager } from '../../../src/Three.js';
import { BufferGeometry, Loader, LoadingManager, Points, PointsMaterial } from '../../../src/Three.js';
export class PCDLoader extends Loader<Points> {
export class PCDLoader extends Loader<Points<BufferGeometry, PointsMaterial>> {
constructor(manager?: LoadingManager);
littleEndian: boolean;
parse(data: ArrayBuffer | string): Points;
parse(data: ArrayBuffer | string): Points<BufferGeometry, PointsMaterial>;
}

@@ -26,3 +26,2 @@ import { Vector3, Line3, Box3 } from '../../../src/Three.js';

intersectsBox(box: Box3): boolean;
lineLineMinimumPoints(line1: Line3, line2: Line3): Vector3[];
}

@@ -17,3 +17,11 @@ import { Object3D, Mesh, Texture } from '../../../src/Three.js';

meshWeapon: Mesh | null;
controls: null;
controls: {
crouch?: boolean | undefined;
jump?: boolean | undefined;
attack?: boolean | undefined;
moveForward?: boolean | undefined;
moveBackward?: boolean | undefined;
moveLeft?: boolean | undefined;
moveRight?: boolean | undefined;
} | null;
skinsBody: Texture[];

@@ -20,0 +28,0 @@ skinsWeapon: Texture[];

@@ -15,2 +15,3 @@ import {

export interface ReflectorShader {
name: string;
defines: {

@@ -17,0 +18,0 @@ DISTANCE_ATTENUATION: boolean;

@@ -8,2 +8,3 @@ import {

PerspectiveCamera,
ShaderMaterial,
} from '../../../src/Three.js';

@@ -21,3 +22,3 @@

export class Refractor extends Mesh {
export class Refractor extends Mesh<BufferGeometry, ShaderMaterial> {
type: 'Refractor';

@@ -24,0 +25,0 @@ camera: PerspectiveCamera;

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

import { Mesh, Vector3 } from '../../../src/Three.js';
import { Mesh, Object3D, Vector3 } from '../../../src/Three.js';
export interface AmmoPhysicsObject {
addScene: (scene: Object3D) => void;
addMesh: (mesh: Mesh, mass?: number) => void;

@@ -5,0 +6,0 @@ setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void;

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

import { Mesh } from '../../../src/Three.js';
import { Mesh, Object3D } from '../../../src/Three.js';

@@ -6,2 +6,3 @@ type Vector = { x: number; y: number; z: number };

export interface RapierPhysicsObject {
addScene: (scene: Object3D) => void;
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;

@@ -8,0 +9,0 @@ setMeshPosition: (mesh: Mesh, position: Vector, index?: number) => void;

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

import { Object3D, Color, Scene, Camera } from '../../../src/Three.js';
import { Object3D, Color, Scene, Camera, ColorSpace } from '../../../src/Three.js';

@@ -15,2 +15,3 @@ export class SVGObject extends Object3D {

overdraw: number;
outputColorSpace: ColorSpace;
info: { render: { vertices: number; faces: number } };

@@ -17,0 +18,0 @@

import { IUniform, Texture } from '../../../src/Three.js';
export const ACESFilmicToneMappingShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform<Texture>;

import { IUniform } from '../../../src/Three.js';
export const AfterimageShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ damp: IUniform;

export const BasicShader: {
name: string;
uniforms: {};

@@ -3,0 +4,0 @@ vertexShader: string;

import { IUniform } from '../../../src/Three.js';
export const BlendShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse1: IUniform;

import { IUniform } from '../../../src/Three.js';
export const BokehShader: {
name: string;
defines: {

@@ -5,0 +6,0 @@ DEPTH_PACKING: number;

@@ -30,2 +30,3 @@ import { IUniform } from '../../../src/Three.js';

export const BokehShader: {
name: string;
uniforms: BokehShaderUniforms;

@@ -37,2 +38,3 @@ vertexShader: string;

export const BokehDepthShader: {
name: string;
uniforms: {

@@ -39,0 +41,0 @@ mNear: IUniform;

import { IUniform } from '../../../src/Three.js';
export const BrightnessContrastShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const ColorCorrectionShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform, Vector2, Material } from '../../../src/Three.js';
export const DepthLimitedBlurShader: {
name: string;
defines: {

@@ -5,0 +6,0 @@ KERNEL_RADIUS: number;

import { IUniform } from '../../../src/Three.js';
export const DOFMipMapShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tColor: IUniform;

import { IUniform } from '../../../src/Three.js';
export const FocusShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const FreiChenShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const FXAAShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const GodRaysDepthMaskShader: {
name: string;
uniforms: {

@@ -12,2 +13,3 @@ tInput: IUniform;

export const GodRaysGenerateShader: {
name: string;
uniforms: {

@@ -23,2 +25,3 @@ tInput: IUniform;

export const GodRaysCombineShader: {
name: string;
uniforms: {

@@ -34,2 +37,3 @@ tColors: IUniform;

export const GodRaysFakeSunShader: {
name: string;
uniforms: {

@@ -36,0 +40,0 @@ vSunPositionScreenSpace: IUniform;

import { IUniform } from '../../../src/Three.js';
export const HalftoneShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const HorizontalTiltShiftShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const HueSaturationShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const KaleidoShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const LuminosityHighPassShader: {
name: string;
shaderID: string;

@@ -5,0 +6,0 @@ uniforms: {

import { IUniform } from '../../../src/Three.js';
export const LuminosityShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const MirrorShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const NormalMapShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ heightMap: IUniform;

import { IUniform } from '../../../src/Three.js';
export const OutputShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const SAOShader: {
name: string;
defines: {

@@ -5,0 +6,0 @@ NUM_SAMPLES: number;

import { IUniform } from '../../../src/Three.js';
export const SMAAEdgesShader: {
name: string;
defines: {

@@ -16,2 +17,3 @@ SMAA_THRESHOLD: string;

export const SMAAWeightsShader: {
name: string;
defines: {

@@ -34,2 +36,3 @@ SMAA_MAX_SEARCH_STEPS: string;

export const SMAABlendShader: {
name: string;
uniforms: {

@@ -36,0 +39,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const SobelOperatorShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const SSAOShader: {
name: string;
defines: {

@@ -27,2 +28,3 @@ PERSPECTIVE_CAMERA: number;

export const SSAODepthShader: {
name: string;
defines: {

@@ -41,2 +43,3 @@ PERSPECTIVE_CAMERA: number;

export const SSAOBlurShader: {
name: string;
uniforms: {

@@ -43,0 +46,0 @@ tDiffuse: IUniform;

@@ -9,2 +9,3 @@ import { Matrix4, Vector2, Texture, IUniform } from '../../../src/Three.js';

export interface SSRShader {
name: string;
defines: {

@@ -39,2 +40,3 @@ MAX_STEP: number;

export interface SSRDepthShader {
name: string;
defines: {

@@ -54,2 +56,3 @@ PERSPECTIVE_CAMERA: number;

export interface SSRBlurShader {
name: string;
uniforms: {

@@ -56,0 +59,0 @@ tDiffuse: IUniform<Texture | null>;

import { IUniform } from '../../../src/Three.js';
export const SubsurfaceScatteringShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ alphaMap: IUniform;

import { IUniform } from '../../../src/Three.js';
export const TechnicolorShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const TriangleBlurShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ texture: IUniform;

import { IUniform } from '../../../src/Three.js';
export const UnpackDepthRGBAShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform, UniformsLib } from '../../../src/Three.js';
export const VelocityShader: {
name: string;
uniforms: (typeof UniformsLib)['common'] &

@@ -5,0 +6,0 @@ (typeof UniformsLib)['displacementmap'] & {

import { IUniform } from '../../../src/Three.js';
export const VerticalTiltShiftShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ tDiffuse: IUniform;

import { IUniform } from '../../../src/Three.js';
export const WaterRefractionShader: {
name: string;
uniforms: {

@@ -5,0 +6,0 @@ color: IUniform;

@@ -5,3 +5,3 @@ import { WebGLRenderer } from '../../../src/Three.js';

export class XRButton {
static createButton(renderer: WebGLRenderer): HTMLElement;
static createButton(renderer: WebGLRenderer, sessionInit?: XRSessionInit): HTMLElement;
}

@@ -27,12 +27,44 @@ import { DirectionalLight, Group, LightProbe, Texture, WebGLRenderer, Object3DEventMap } from '../../../src/Three.js';

export interface XREstimatedLightEventMap extends Object3DEventMap {
/**
* Fires when the estimated lighting values start being updated.
*/
estimationstart: {};
/**
* Fires when the estimated lighting values stop being updated.
*/
estimationend: {};
}
/**
* XREstimatedLight uses WebXR's light estimation to create a light probe, a directional light, and (optionally) an
* environment map that model the user's real-world environment and lighting.
* As WebXR updates the light and environment estimation, XREstimatedLight automatically updates the light probe,
* directional light, and environment map.
*
* It's important to specify `light-estimation` as an optional or required feature when creating the WebXR session,
* otherwise the light estimation can't work.
*
* See {@link https://developer.mozilla.org/en-US/docs/Web/API/XRLightProbe#browser_compatibility here} for browser
* compatibility information, as this is still an experimental feature in WebXR.
*
* To use this, as with all files in the /examples directory, you will have to include the file separately in your HTML.
*/
export class XREstimatedLight extends Group<XREstimatedLightEventMap> {
lightProbe: LightProbe;
directionalLight: DirectionalLight;
/**
* The environment map estimated by WebXR. This is only available if environmentEstimation is `true`.
*
* It can be used as the {@link Scene.environment}, for {@link MeshStandardMaterial.envMap}, or as the
* {@link Scene.background}.
*/
environment: Texture;
/**
* @param renderer The renderer used to render the Scene. Mainly used to interact with WebXRManager.
* @param environmentEstimation If `true`, use WebXR to estimate an environment map.
*/
constructor(renderer: WebGLRenderer, environmentEstimation?: boolean);
}
{
"name": "@types/three",
"version": "0.157.2",
"version": "0.158.0",
"description": "TypeScript definitions for three",

@@ -29,2 +29,3 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",

"./examples/jsm/*": "./examples/jsm/*",
"./addons": "./examples/jsm/Addons.js",
"./addons/*": "./examples/jsm/*",

@@ -47,4 +48,4 @@ "./src/*": "./src/*",

},
"typesPublisherContentHash": "793c51304c26c918dd5ee5b103fbcbcf8155af7cb9cceb2837b49309565f40d6",
"typesPublisherContentHash": "255a6a1803d2017678c3abe305771d2dc7b3a2db590cb731e2a0f99e04dfcc14",
"typeScriptVersion": "4.5"
}

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

### Additional Details
* Last updated: Wed, 18 Oct 2023 18:04:04 GMT
* Last updated: Fri, 27 Oct 2023 18:16:28 GMT
* Dependencies: [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)

@@ -14,0 +14,0 @@

import { WebGLCubeRenderTarget } from '../renderers/WebGLCubeRenderTarget.js';
import { Scene } from '../scenes/Scene.js';
import { WebGLRenderer } from '../renderers/WebGLRenderer.js';

@@ -68,3 +67,3 @@ import { Object3D } from '../core/Object3D.js';

*/
update(renderer: WebGLRenderer, scene: Scene): void;
update(renderer: WebGLRenderer, scene: Object3D): void;
}

@@ -77,3 +77,3 @@ export const REVISION: string;

// custom blending destination factors
// custom blending factors
export const ZeroFactor: 200;

@@ -89,2 +89,7 @@ export const OneFactor: 201;

export const OneMinusDstColorFactor: 209;
export const SrcAlphaSaturateFactor: 210;
export const ConstantColorFactor: 211;
export const OneMinusConstantColorFactor: 212;
export const ConstantAlphaFactor: 213;
export const OneMinusConstantAlphaFactor: 214;
export type BlendingDstFactor =

@@ -100,8 +105,9 @@ | typeof ZeroFactor

| typeof DstColorFactor
| typeof OneMinusDstColorFactor;
| typeof OneMinusDstColorFactor
| typeof ConstantColorFactor
| typeof OneMinusConstantColorFactor
| typeof ConstantAlphaFactor
| typeof OneMinusConstantAlphaFactor;
export type BlendingSrcFactor = BlendingDstFactor | typeof SrcAlphaSaturateFactor;
// custom blending src factors
export const SrcAlphaSaturateFactor: 210;
export type BlendingSrcFactor = typeof SrcAlphaSaturateFactor;
// depth modes

@@ -148,2 +154,7 @@ export const NeverDepth: 0;

// Bind modes
export const AttachedBindMode: 'attached';
export const DetachedBindMode: 'detached';
export type BindMode = typeof AttachedBindMode | typeof DetachedBindMode;
///////////////////////////////////////////////////////////////////////////////

@@ -469,7 +480,7 @@ ///////////////////////////////////////////////////////////////////////////////

/**
* All Texture Pixel Formats Modes for {@link THREE.DeepTexture}.
* All Texture Pixel Formats Modes for {@link THREE.DepthTexture}.
* @see {@link WebGLRenderingContext.texImage2D} for details.
* @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
*/
export type DeepTexturePixelFormat = typeof DepthFormat | typeof DepthStencilFormat;
export type DepthTexturePixelFormat = typeof DepthFormat | typeof DepthStencilFormat;

@@ -657,6 +668,6 @@ ///////////////////////////////////////////////////////////////////////////////

* @see {@link WebGLRenderingContext.texImage2D} for details.
* @see {@link PixelFormat} and {@link DeepTexturePixelFormat} and {@link CompressedPixelFormat}
* @see {@link PixelFormat} and {@link DepthTexturePixelFormat} and {@link CompressedPixelFormat}
* @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
*/
export type AnyPixelFormat = PixelFormat | DeepTexturePixelFormat | CompressedPixelFormat;
export type AnyPixelFormat = PixelFormat | DepthTexturePixelFormat | CompressedPixelFormat;

@@ -663,0 +674,0 @@ ///////////////////////////////////////////////////////////////////////////////

@@ -238,3 +238,3 @@ import { Vector3 } from '../math/Vector3.js';

*/
onBeforeRender: (
onBeforeRender(
renderer: WebGLRenderer,

@@ -246,3 +246,3 @@ scene: Scene,

group: Group,
) => void;
): void;

@@ -259,3 +259,3 @@ /**

*/
onAfterRender: (
onAfterRender(
renderer: WebGLRenderer,

@@ -267,3 +267,3 @@ scene: Scene,

group: Group,
) => void;
): void;

@@ -270,0 +270,0 @@ /**

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

instanceId?: number | undefined;
pointOnLine?: Vector3;
}

@@ -36,0 +37,0 @@

@@ -85,3 +85,3 @@ import { Vector } from './../../math/Vector2.js';

/**
* Update the cumlative segment distance cache
* Update the cumulative segment distance cache
* @remarks

@@ -88,0 +88,0 @@ * The method must be called every time {@link Curve} parameters are changed

@@ -23,3 +23,3 @@ import { BufferGeometry } from '../core/BufferGeometry.js';

* @param length Length of the middle section. Expects a `Float`. Default `1`
* @param capSubdivisions Number of curve segments used to build the caps. Expects a `Integer`. Default `4`
* @param capSegments Number of curve segments used to build the caps. Expects a `Integer`. Default `4`
* @param radialSegments Number of segmented faces around the circumference of the capsule. Expects a `Integer`. Default `8`

@@ -26,0 +26,0 @@ */

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

import { Color } from '../math/Color.js';
import { ColorRepresentation } from '../math/Color.js';
import { LineSegments } from './../objects/LineSegments.js';

@@ -42,3 +42,3 @@

*/
setColors(xAxisColor: Color, yAxisColor: Color, zAxisColor: Color): this;
setColors(xAxisColor: ColorRepresentation, yAxisColor: ColorRepresentation, zAxisColor: ColorRepresentation): this;

@@ -45,0 +45,0 @@ /**

import { Box3 } from './../math/Box3.js';
import { Color } from './../math/Color.js';
import { ColorRepresentation } from './../math/Color.js';
import { LineSegments } from './../objects/LineSegments.js';

@@ -23,3 +23,3 @@

*/
constructor(box: Box3, color?: Color);
constructor(box: Box3, color?: ColorRepresentation);

@@ -26,0 +26,0 @@ /**

@@ -41,4 +41,3 @@ import { Color, ColorRepresentation } from '../math/Color.js';

* The light's intensity, or strength.
* When {@link THREE.WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled, the units of intensity depend on the type of light.
* @remarks Expects a `Float`
* The units of intensity depend on the type of light.
* @defaultValue `1`

@@ -45,0 +44,0 @@ */

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

} from '../constants.js';
import { Color, ColorRepresentation } from '../math/Color.js';

@@ -22,2 +23,4 @@ export interface MaterialParameters {

alphaToCoverage?: boolean | undefined;
blendAlpha?: number | undefined;
blendColor?: ColorRepresentation | undefined;
blendDst?: BlendingDstFactor | undefined;

@@ -92,2 +95,16 @@ blendDstAlpha?: number | undefined;

/**
* Represents the alpha value of the constant blend color. This property has only an effect when using custom
* blending with {@link ConstantAlphaFactor} or {@link OneMinusConstantAlphaFactor}.
* @default 0
*/
blendAlpha: number;
/**
* Represent the RGB values of the constant blend color. This property has only an effect when using custom
* blending with {@link ConstantColorFactor} or {@link OneMinusConstantColorFactor}.
* @default 0x000000
*/
blendColor: Color;
/**
* Blending destination. It's one of the blending mode constants defined in Three.js. Default is {@link OneMinusSrcAlphaFactor}.

@@ -147,3 +164,3 @@ * @default THREE.OneMinusSrcAlphaFactor

*/
clippingPlanes: Plane[];
clippingPlanes: Plane[] | null;

@@ -176,3 +193,4 @@ /**

/**
* Whether to have depth test enabled when rendering this material. Default is true.
* Whether to have depth test enabled when rendering this material. When the depth test is disabled, the depth write
* will also be implicitly disabled.
* @default true

@@ -179,0 +197,0 @@ */

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

import { Texture } from './../textures/Texture.js';
import { Vector2 } from './../math/Vector2.js';
import { Texture } from '../textures/Texture.js';
import { Vector2 } from '../math/Vector2.js';
import { MeshStandardMaterialParameters, MeshStandardMaterial } from './MeshStandardMaterial.js';
import { Color } from './../math/Color.js';
import { Color, ColorRepresentation } from '../math/Color.js';

@@ -18,3 +18,3 @@ export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialParameters {

sheen?: number | undefined;
sheenColor?: Color | undefined;
sheenColor?: ColorRepresentation | undefined;
sheenColorMap?: Texture | null | undefined;

@@ -31,6 +31,6 @@ sheenRoughness?: number | undefined;

attenuationDistance?: number | undefined;
attenuationColor?: Color | undefined;
attenuationColor?: ColorRepresentation | undefined;
specularIntensity?: number | undefined;
specularColor?: Color | undefined;
specularColor?: ColorRepresentation | undefined;
specularIntensityMap?: Texture | null | undefined;

@@ -53,2 +53,4 @@ specularColorMap?: Texture | null | undefined;

isMeshPhysicalMaterial: boolean;
/**

@@ -55,0 +57,0 @@ * @default 'MeshPhysicalMaterial'

@@ -29,3 +29,3 @@ import {

get workingColorSpace(): WorkingColorSpace;
set workingSpaceColor(colorSpace: WorkingColorSpace);
set workingColorSpace(colorSpace: WorkingColorSpace);

@@ -32,0 +32,0 @@ convert: (color: Color, sourceColorSpace: DefinedColorSpace, targetColorSpace: DefinedColorSpace) => Color;

@@ -159,3 +159,4 @@ import { Vector3 } from './Vector3.js';

*/
setPosition(v: Vector3 | number, y?: number, z?: number): Matrix4;
setPosition(v: Vector3): Matrix4;
setPosition(x: number, y: number, z: number): Matrix4;

@@ -162,0 +163,0 @@ /**

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

import { Material } from './../materials/Material.js';
import { Material } from '../materials/Material.js';
import { Box3 } from '../math/Box3.js';
import { Matrix4 } from './../math/Matrix4.js';
import { Vector3 } from './../math/Vector3.js';
import { Matrix4 } from '../math/Matrix4.js';
import { Vector3 } from '../math/Vector3.js';
import { Skeleton } from './Skeleton.js';

@@ -9,2 +9,3 @@ import { Mesh } from './Mesh.js';

import { Sphere } from '../math/Sphere.js';
import { BindMode } from '../constants.js';

@@ -76,8 +77,8 @@ /**

/**
* Either `attached` or `detached`.
* - `attached` uses the {@link THREE.SkinnedMesh.matrixWorld | SkinnedMesh.matrixWorld} property for the base transform matrix of the bones.
* - `detached` uses the {@link THREE.SkinnedMesh.bindMatrix | SkinnedMesh.bindMatrix}.
* @defaultValue `attached`.
* Either {@link AttachedBindMode} or {@link DetachedBindMode}. {@link AttachedBindMode} means the skinned mesh
* shares the same world space as the skeleton. This is not true when using {@link DetachedBindMode} which is useful
* when sharing a skeleton across multiple skinned meshes.
* @defaultValue `AttachedBindMode`
*/
bindMode: 'attached' | 'detached';
bindMode: BindMode;

@@ -84,0 +85,0 @@ /**

@@ -373,7 +373,17 @@ import { Scene } from '../scenes/Scene.js';

/**
* Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.
* Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first
* rendering. If you want to add a 3D object to an existing scene, use the third optional parameter for applying the
* target scene.
* Note that the (target) scene's lighting should be configured before calling this method.
*/
compile(scene: Object3D, camera: Camera): void;
compile: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Set<Material>;
/**
* Asynchronous version of {@link compile}(). The method returns a Promise that resolves when the given scene can be
* rendered without unnecessary stalling due to shader compilation.
* This method makes use of the KHR_parallel_shader_compile WebGL extension.
*/
compileAsync: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise<Object3D>;
/**
* Render a scene or an object using a camera.

@@ -380,0 +390,0 @@ * The render is done to a previously specified {@link WebGLRenderTarget#renderTarget .renderTarget} set by calling

import { FogBase } from './Fog.js';
import { Material } from './../materials/Material.js';
import { Object3D } from './../core/Object3D.js';
import { Material } from '../materials/Material.js';
import { Object3D } from '../core/Object3D.js';
import { Color } from '../math/Color.js';

@@ -5,0 +5,0 @@ import { Texture } from '../textures/Texture.js';

@@ -6,3 +6,3 @@ import { Texture } from './Texture.js';

TextureDataType,
DeepTexturePixelFormat,
DepthTexturePixelFormat,
MagnificationTextureFilter,

@@ -46,3 +46,3 @@ MinificationTextureFilter,

anisotropy?: number,
format?: DeepTexturePixelFormat,
format?: DepthTexturePixelFormat,
);

@@ -93,3 +93,3 @@

*/
format: DeepTexturePixelFormat;
format: DepthTexturePixelFormat;

@@ -96,0 +96,0 @@ /**

@@ -204,4 +204,4 @@ import { Vector2 } from '../math/Vector2.js';

* These define how elements of a 2D texture, or texels, are read by shaders.
* @remarks All {@link Texture} types except {@link THREE.DeepTexture} and {@link THREE.CompressedPixelFormat} expect the _values_ be {@link THREE.PixelFormat}
* @remarks {@link DeepTexture} expect the _values_ be {@link THREE.CubeTextureMapping}
* @remarks All {@link Texture} types except {@link THREE.DepthTexture} and {@link THREE.CompressedPixelFormat} expect the _values_ be {@link THREE.PixelFormat}
* @remarks {@link DepthTexture} expect the _values_ be {@link THREE.CubeTextureMapping}
* @remarks {@link CompressedPixelFormat} expect the _values_ be {@link THREE.CubeTextureMapping}

@@ -208,0 +208,0 @@ * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}

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