Skip to content

Commit

Permalink
Add loader examples to testing (#622)
Browse files Browse the repository at this point in the history
* Add examples

* Updates

* Remove example

* Remove example

* Remove example

* Remove example

* Add controls types

* Remove examples

* Remove example

* Updates

* Updates

* Update patch

* Delete examples

* Add back

* Remove obsolete

* OTHER_FILES

* OTHER_FILES

* OTHER_FILES

* OTHER_FILES

* OTHER_FILES

* OTHER_FILES
  • Loading branch information
Methuselah96 authored Sep 30, 2023
1 parent c828a0e commit 7686a12
Show file tree
Hide file tree
Showing 15 changed files with 1,194 additions and 845 deletions.
1,125 changes: 1,125 additions & 0 deletions examples-testing/changes.patch

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions examples-testing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,66 +75,66 @@ const files = {
'webgl_lines_fat',
'webgl_lines_fat_raycasting',
'webgl_lines_fat_wireframe',
// 'webgl_loader_3dm',
// 'webgl_loader_3ds',
// 'webgl_loader_3mf',
// 'webgl_loader_3mf_materials',
// 'webgl_loader_amf',
// 'webgl_loader_bvh',
// 'webgl_loader_collada',
'webgl_loader_3dm',
'webgl_loader_3ds',
'webgl_loader_3mf',
'webgl_loader_3mf_materials',
'webgl_loader_amf',
'webgl_loader_bvh',
'webgl_loader_collada',
// 'webgl_loader_collada_kinematics',
// 'webgl_loader_collada_skinning',
// 'webgl_loader_draco',
// 'webgl_loader_fbx',
// 'webgl_loader_fbx_nurbs',
// 'webgl_loader_gcode',
// 'webgl_loader_gltf',
// 'webgl_loader_gltf_avif',
// 'webgl_loader_gltf_compressed',
// 'webgl_loader_gltf_instancing',
// 'webgl_loader_gltf_iridescence',
// 'webgl_loader_gltf_lights',
// 'webgl_loader_gltf_sheen',
// 'webgl_loader_gltf_transmission',
'webgl_loader_collada_skinning',
'webgl_loader_draco',
'webgl_loader_fbx',
'webgl_loader_fbx_nurbs',
'webgl_loader_gcode',
'webgl_loader_gltf',
'webgl_loader_gltf_avif',
'webgl_loader_gltf_compressed',
'webgl_loader_gltf_instancing',
'webgl_loader_gltf_iridescence',
'webgl_loader_gltf_lights',
'webgl_loader_gltf_sheen',
'webgl_loader_gltf_transmission',
// 'webgl_loader_gltf_variants',
// 'webgl_loader_gltf_anisotropy',
'webgl_loader_gltf_anisotropy',
// 'webgl_loader_ifc',
// 'webgl_loader_imagebitmap',
// 'webgl_loader_kmz',
'webgl_loader_imagebitmap',
'webgl_loader_kmz',
// 'webgl_loader_ldraw',
// 'webgl_loader_lwo',
'webgl_loader_lwo',
// 'webgl_loader_md2',
// 'webgl_loader_md2_control',
// 'webgl_loader_mdd',
'webgl_loader_md2_control',
'webgl_loader_mdd',
// 'webgl_loader_mmd',
// 'webgl_loader_mmd_pose',
// 'webgl_loader_mmd_audio',
// 'webgl_loader_nrrd',
// 'webgl_loader_obj',
// 'webgl_loader_obj_mtl',
// 'webgl_loader_pcd',
// 'webgl_loader_pdb',
// 'webgl_loader_ply',
'webgl_loader_obj',
'webgl_loader_obj_mtl',
'webgl_loader_pcd',
'webgl_loader_pdb',
'webgl_loader_ply',
// 'webgl_loader_stl',
// 'webgl_loader_svg',
// 'webgl_loader_tilt',
// 'webgl_loader_texture_dds',
'webgl_loader_svg',
'webgl_loader_tilt',
'webgl_loader_texture_dds',
// 'webgl_loader_texture_exr',
// 'webgl_loader_texture_hdr',
// 'webgl_loader_texture_ktx',
'webgl_loader_texture_ktx',
// 'webgl_loader_texture_ktx2',
// 'webgl_loader_texture_logluv',
'webgl_loader_texture_logluv',
// 'webgl_loader_texture_lottie',
// 'webgl_loader_texture_pvrtc',
// 'webgl_loader_texture_rgbm',
// 'webgl_loader_texture_tga',
// 'webgl_loader_texture_tiff',
// 'webgl_loader_ttf',
// 'webgl_loader_usdz',
// 'webgl_loader_vox',
// 'webgl_loader_vrml',
// 'webgl_loader_vtk',
// 'webgl_loader_xyz',
'webgl_loader_texture_rgbm',
'webgl_loader_texture_tga',
'webgl_loader_texture_tiff',
'webgl_loader_ttf',
'webgl_loader_usdz',
'webgl_loader_vox',
'webgl_loader_vrml',
'webgl_loader_vtk',
'webgl_loader_xyz',
// 'webgl_lod',
// 'webgl_marchingcubes',
// 'webgl_materials_alphahash',
Expand Down
6 changes: 6 additions & 0 deletions types/three/OTHER_FILES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ examples/jsm/loaders/3MFLoader.d.ts
examples/jsm/loaders/AMFLoader.d.ts
examples/jsm/loaders/BVHLoader.d.ts
examples/jsm/loaders/ColladaLoader.d.ts
examples/jsm/loaders/DDSLoader.d.ts
examples/jsm/loaders/EXRLoader.d.ts
examples/jsm/loaders/FBXLoader.d.ts
examples/jsm/loaders/GCodeLoader.d.ts
Expand All @@ -78,13 +79,18 @@ examples/jsm/loaders/LWOLoader.d.ts
examples/jsm/loaders/MD2Loader.d.ts
examples/jsm/loaders/MDDLoader.d.ts
examples/jsm/loaders/NRRDLoader.d.ts
examples/jsm/loaders/PCDLoader.d.ts
examples/jsm/loaders/PDBLoader.d.ts
examples/jsm/loaders/PLYLoader.d.ts
examples/jsm/loaders/PVRLoader.d.ts
examples/jsm/loaders/STLLoader.d.ts
examples/jsm/loaders/SVGLoader.d.ts
examples/jsm/loaders/TDSLoader.d.ts
examples/jsm/loaders/TGALoader.d.ts
examples/jsm/loaders/TIFFLoader.d.ts
examples/jsm/loaders/TiltLoader.d.ts
examples/jsm/loaders/TTFLoader.d.ts
examples/jsm/loaders/USDZLoader.d.ts
examples/jsm/loaders/VOXLoader.d.ts
examples/jsm/loaders/VRMLLoader.d.ts
examples/jsm/loaders/VTKLoader.d.ts
Expand Down
10 changes: 5 additions & 5 deletions types/three/examples/jsm/libs/lil-gui.module.min.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export class Controller<T = Record<string, unknown>, K extends keyof T = keyof T
/**
* The object this controller will modify.
*/
object: object;
object: T;
/**
* The name of the property to control.
*/
Expand Down Expand Up @@ -398,12 +398,12 @@ export class Controller<T = Record<string, unknown>, K extends keyof T = keyof T
* console.assert( this === controller );
* } );
*/
onChange(callback: (value: T[K]) => void): this;
onChange(callback: (this: this, value: T[K]) => void): this;
/**
* Used to access the function bound to `onChange` events. Don't modify this value directly.
* Use the `controller.onChange( callback )` method instead.
*/
_onChange: (value: T[K]) => void;
_onChange: (this: this, value: T[K]) => void;
/**
* Calls the onChange methods of this controller and its parent GUI.
*/
Expand All @@ -420,12 +420,12 @@ export class Controller<T = Record<string, unknown>, K extends keyof T = keyof T
* console.assert( this === controller );
* } );
*/
onFinishChange(callback: (value: T[K]) => void): this;
onFinishChange(callback: (this: this, value: T[K]) => void): this;
/**
* Used to access the function bound to `onFinishChange` events. Don't modify this value
* directly. Use the `controller.onFinishChange( callback )` method instead.
*/
_onFinishChange: (value: T[K]) => void;
_onFinishChange: (this: this, value: T[K]) => void;
/**
* Should be called by Controller when its widgets lose focus.
*/
Expand Down
2 changes: 1 addition & 1 deletion types/three/examples/jsm/loaders/LogLuvLoader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface LogLuv {

export class LogLuvLoader extends DataTextureLoader {
type: TextureDataType;
constructor(manager: LoadingManager);
constructor(manager?: LoadingManager);

parse(buffer: Iterable<number>): LogLuv;

Expand Down
6 changes: 3 additions & 3 deletions types/three/examples/jsm/loaders/PCDLoader.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,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>;
}
10 changes: 9 additions & 1 deletion types/three/examples/jsm/misc/MD2CharacterComplex.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ export class MD2CharacterComplex {
root: Object3D;
meshBody: Mesh | null;
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[];
skinsWeapon: Texture[];
weapons: Mesh[];
Expand Down
72 changes: 0 additions & 72 deletions types/three/test/integration/three-examples/webgl_loader_gltf.ts

This file was deleted.

Loading

0 comments on commit 7686a12

Please sign in to comment.