Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed Mar 1, 2022
2 parents 66109aa + 4aa3504 commit 5b51e3d
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ To check an item, place an "x" in the box like so: "- [x] Documentation"
Remove items that are irrelevant to your changes.
-->

- [ ] Checked the target branch (current goes `master`, next goes `dev`)
- [ ] Added myself to contributors table
- [ ] Ready to be merged

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center"><a href="https://xk.io/"><img src="https://avatars.githubusercontent.com/u/1046448?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Max Kaye</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=XertroV" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/LauferAlex"><img src="https://avatars.githubusercontent.com/u/86115165?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alejandro Laufer</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/issues?q=author%3ALauferAlex" title="Bug reports">🐛</a> <a href="https://github.com/three-types/three-ts-types/commits?author=LauferAlex" title="Code">💻</a></td>
<td align="center"><a href="http://www.joemo.co.uk"><img src="https://avatars.githubusercontent.com/u/39060404?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Tipping</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Gallahron" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/r00ster91"><img src="https://avatars.githubusercontent.com/u/35064754?v=4?s=100" width="100px;" alt=""/><br /><sub><b>r00ster91</b></sub></a><br /><a href="https://github.com/three-types/three-ts-types/commits?author=Gallahron" title="Code">💻</a></td>
</tr>
</tr>
</table>

Expand Down
1 change: 1 addition & 0 deletions types/three/OTHER_FILES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ examples/jsm/shaders/VolumeShader.d.ts
examples/jsm/shaders/WaterRefractionShader.d.ts
examples/jsm/utils/BufferGeometryUtils.d.ts
examples/jsm/utils/GeometryCompressionUtils.d.ts
examples/jsm/utils/PackedPhongMaterial.d.ts
examples/jsm/utils/SceneUtils.d.ts
examples/jsm/utils/ShadowMapViewer.d.ts
examples/jsm/utils/SkeletonUtils.d.ts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export namespace WEBGL {
declare namespace WEBGL {
function isWebGLAvailable(): boolean;
function isWebGL2Available(): boolean;
function getWebGLErrorMessage(): HTMLElement;
function getWebGL2ErrorMessage(): HTMLElement;
function getErrorMessage(version: number): HTMLElement;
}

export default WEBGL;
1 change: 0 additions & 1 deletion types/three/examples/jsm/controls/OrbitControls.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export class OrbitControls {
autoRotate: boolean;
autoRotateSpeed: number;

enableKeys: boolean;
keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
touches: { ONE: TOUCH; TWO: TOUCH };
Expand Down
10 changes: 10 additions & 0 deletions types/three/examples/jsm/utils/PackedPhongMaterial.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* `PackedPhongMaterial` inherited from THREE.MeshPhongMaterial
*
* @param {Object} parameters
*/
import { MeshPhongMaterial, MeshPhongMaterialParameters } from '../../../src/Three';

export class PackedPhongMaterial extends MeshPhongMaterial {
constructor(parameters: MeshPhongMaterialParameters);
}
22 changes: 10 additions & 12 deletions types/three/examples/jsm/utils/SceneUtils.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { BufferGeometry, Group, InstancedMesh, Material, Object3D, Scene } from '../../../src/Three';

export namespace SceneUtils {
function createMeshesFromInstancedMesh(instancedMesh: InstancedMesh): Group;
function createMultiMaterialObject(geometry: BufferGeometry, materials: Material[]): Group;
/**
* @deprecated Use scene.attach( child ) instead.
*/
function detach(child: Object3D, parent: Object3D, scene: Scene): void;
/**
* @deprecated Use parent.attach( child ) instead.
*/
function attach(child: Object3D, scene: Scene, parent: Object3D): void;
}
export function createMeshesFromInstancedMesh(instancedMesh: InstancedMesh): Group;
export function createMultiMaterialObject(geometry: BufferGeometry, materials: Material[]): Group;
/**
* @deprecated Use scene.attach( child ) instead.
*/
export function detach(child: Object3D, parent: Object3D, scene: Scene): void;
/**
* @deprecated Use parent.attach( child ) instead.
*/
export function attach(child: Object3D, scene: Scene, parent: Object3D): void;
2 changes: 1 addition & 1 deletion types/three/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for three 0.136
// Type definitions for three 0.137
// Project: https://threejs.org/
// Definitions by: Josh Ellis <https://github.com/joshuaellis>
// Nathan Bierema <https://github.com/Methuselah96>
Expand Down
2 changes: 0 additions & 2 deletions types/three/src/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ export enum TextureEncoding {}
export const LinearEncoding: TextureEncoding;
export const sRGBEncoding: TextureEncoding;
export const LogLuvEncoding: TextureEncoding;
export const RGBM7Encoding: TextureEncoding;
export const RGBM16Encoding: TextureEncoding;

// Depth packing strategies
export enum DepthPackingStrategies {}
Expand Down
5 changes: 3 additions & 2 deletions types/three/src/core/Raycaster.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface Intersection<TIntersected extends Object3D = Object3D> {
faceIndex?: number | undefined;
object: TIntersected;
uv?: Vector2 | undefined;
uv2?: Vector2 | undefined;
instanceId?: number | undefined;
}

Expand Down Expand Up @@ -94,7 +95,7 @@ export class Raycaster {
/**
* Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.
* @param object The object to check for intersection with the ray.
* @param recursive If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is false.
* @param recursive If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is true.
* @param optionalTarget (optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
*/
intersectObject<TIntersected extends Object3D>(
Expand All @@ -108,7 +109,7 @@ export class Raycaster {
* Intersections are returned sorted by distance, closest first.
* Intersections are of the same form as those returned by .intersectObject.
* @param objects The objects to check for intersection with the ray.
* @param recursive If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is false.
* @param recursive If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is true.
* @param optionalTarget (optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
*/
intersectObjects<TIntersected extends Object3D>(
Expand Down
2 changes: 1 addition & 1 deletion types/three/src/renderers/webxr/WebXRManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class WebXRManager extends EventDispatcher {
getSession(): XRSession | null;
setSession(value: XRSession): Promise<void>;
getCamera(camera: Camera): Camera;
setAnimationLoop(callback: XRFrameRequestCallback): void;
setAnimationLoop(callback: XRFrameRequestCallback | null): void;
getFoveation(): number | undefined;
setFoveation(foveation: number): void;
dispose(): void;
Expand Down
2 changes: 1 addition & 1 deletion types/three/test/loaders/loaders-voxloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { VOXLoader, VOXData3DTexture } from 'three/examples/jsm/loaders/VOXLoader';

import { WEBGL } from 'three/examples/jsm/WebGL';
import WEBGL from 'three/examples/jsm/capabilities/WebGL';

if (!WEBGL.isWebGL2Available()) {
document.body.appendChild(WEBGL.getWebGL2ErrorMessage());
Expand Down
11 changes: 6 additions & 5 deletions types/three/test/materials/materials-envmaps-hdr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ function init() {
});

const rgbmUrls = ['px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png'];
rgbmCubeMap = new RGBMLoader().setPath('./textures/cube/pisaRGBM16/').loadCubemap(rgbmUrls, () => {
rgbmCubeMap.encoding = THREE.RGBM16Encoding;

rgbmCubeRenderTarget = pmremGenerator.fromCubemap(rgbmCubeMap);
});
rgbmCubeMap = new RGBMLoader()
.setMaxRange(16)
.setPath('./textures/cube/pisaRGBM16/')
.loadCubemap(rgbmUrls, () => {
rgbmCubeRenderTarget = pmremGenerator.fromCubemap(rgbmCubeMap);
});

const pmremGenerator = new THREE.PMREMGenerator(renderer);
pmremGenerator.compileCubemapShader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { ImprovedNoise } from 'three/examples/jsm/math/ImprovedNoise';

import { WEBGL } from 'three/examples/jsm/WebGL';
import WEBGL from 'three/examples/jsm/capabilities/WebGL';

if (!WEBGL.isWebGL2Available()) {
document.body.appendChild(WEBGL.getWebGL2ErrorMessage());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as THREE from 'three';

import { WEBGL } from 'three/examples/jsm/WebGL';
import WEBGL from 'three/examples/jsm/capabilities/WebGL';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';

let camera: THREE.PerspectiveCamera;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as THREE from 'three';

import { unzipSync } from 'three/examples/jsm/libs/fflate.module.min';
import { WEBGL } from 'three/examples/jsm/WebGL';
import WEBGL from 'three/examples/jsm/capabilities/WebGL';

const vertextPostProcessingShader = /* glsl */ `
out vec2 vUv;
Expand Down

0 comments on commit 5b51e3d

Please sign in to comment.