@needle-tools/engine 2.35.2-pre → 2.35.3-pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/needle-engine.d.ts +315 -291
- package/dist/needle-engine.js +3339 -230
- package/dist/needle-engine.js.map +4 -4
- package/dist/needle-engine.min.js +34 -34
- package/dist/needle-engine.min.js.map +4 -4
- package/lib/engine/engine.d.ts +1 -0
- package/lib/engine/engine_components.js +5 -0
- package/lib/engine/engine_components.js.map +1 -1
- package/lib/engine/engine_element.d.ts +2 -1
- package/lib/engine/engine_element.js +4 -1
- package/lib/engine/engine_element.js.map +1 -1
- package/lib/engine/engine_gltf.d.ts +2 -2
- package/lib/engine/engine_gltf.js +5 -1
- package/lib/engine/engine_gltf.js.map +1 -1
- package/lib/engine/engine_scenetools.d.ts +9 -0
- package/lib/engine/engine_scenetools.js +2 -2
- package/lib/engine/engine_scenetools.js.map +1 -1
- package/lib/engine/engine_types.d.ts +5 -0
- package/lib/engine/engine_types.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_deferred_texture.js +33 -1
- package/lib/engine/extensions/NEEDLE_deferred_texture.js.map +1 -1
- package/lib/engine-components/Component.js +5 -1
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/DragControls.d.ts +1 -0
- package/lib/engine-components/DragControls.js +11 -6
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/Renderer.js +2 -2
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/ScreenCapture.d.ts +7 -1
- package/lib/engine-components/ScreenCapture.js +12 -5
- package/lib/engine-components/ScreenCapture.js.map +1 -1
- package/lib/engine-components/WebXR.d.ts +1 -1
- package/lib/engine-components/WebXR.js +12 -8
- package/lib/engine-components/WebXR.js.map +1 -1
- package/lib/engine-components/js-extensions/ExtensionUtils.d.ts +3 -1
- package/lib/engine-components/js-extensions/ExtensionUtils.js +18 -8
- package/lib/engine-components/js-extensions/ExtensionUtils.js.map +1 -1
- package/lib/engine-components/js-extensions/Object3D.js +18 -15
- package/lib/engine-components/js-extensions/Object3D.js.map +1 -1
- package/lib/engine-components/js-extensions/Vector.js +3 -3
- package/lib/engine-components/js-extensions/Vector.js.map +1 -1
- package/package.json +10 -1
- package/src/engine/engine_components.ts +5 -0
- package/src/engine/engine_element.ts +7 -2
- package/src/engine/engine_gltf.ts +8 -4
- package/src/engine/engine_scenetools.ts +2 -2
- package/src/engine/engine_types.ts +10 -6
- package/src/engine/extensions/NEEDLE_deferred_texture.ts +36 -3
- package/src/engine-components/Component.ts +7 -1
- package/src/engine-components/DragControls.ts +10 -8
- package/src/engine-components/Renderer.ts +2 -2
- package/src/engine-components/ScreenCapture.ts +20 -5
- package/src/engine-components/WebXR.ts +17 -11
- package/src/engine-components/js-extensions/ExtensionUtils.ts +27 -12
- package/src/engine-components/js-extensions/Object3D.ts +23 -16
- package/src/engine-components/js-extensions/Vector.ts +6 -4
package/dist/needle-engine.d.ts
CHANGED
|
@@ -38,6 +38,11 @@ declare module "engine/engine_types" {
|
|
|
38
38
|
seed: number;
|
|
39
39
|
generateUUID(): string;
|
|
40
40
|
}
|
|
41
|
+
export interface INeedleEngineComponent extends HTMLElement {
|
|
42
|
+
getAROverlayContainer(): HTMLElement;
|
|
43
|
+
onEnterAR(session: THREE.XRSession, overlayContainer: HTMLElement): any;
|
|
44
|
+
onExitAR(session: THREE.XRSession): any;
|
|
45
|
+
}
|
|
41
46
|
export interface IGameObject extends Object3D {
|
|
42
47
|
guid: string | undefined;
|
|
43
48
|
}
|
|
@@ -568,7 +573,9 @@ declare module "engine/engine_networking_instantiate" {
|
|
|
568
573
|
export function registerPrefabProvider(key: string, fn: PrefabProviderCallback): void;
|
|
569
574
|
}
|
|
570
575
|
declare module "engine-components/js-extensions/ExtensionUtils" {
|
|
571
|
-
|
|
576
|
+
import { Constructor } from "engine/engine_types";
|
|
577
|
+
export function applyPrototypeExtensions<T>(obj: any, prototype: Constructor<T>): void;
|
|
578
|
+
export function registerPrototypeExtensions<T>(type: Constructor<T>): void;
|
|
572
579
|
export interface IApplyPrototypeExtension {
|
|
573
580
|
apply(object: object): void;
|
|
574
581
|
}
|
|
@@ -997,7 +1004,7 @@ declare module "engine/extensions/NEEDLE_components" {
|
|
|
997
1004
|
}
|
|
998
1005
|
}
|
|
999
1006
|
declare module "engine/engine_gltf" {
|
|
1000
|
-
import { SourceIdentifier, UIDProvider } from "engine/engine_types";
|
|
1007
|
+
import { ConstructorConcrete, SourceIdentifier, UIDProvider } from "engine/engine_types";
|
|
1001
1008
|
import { Context } from "engine/engine_setup";
|
|
1002
1009
|
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
1003
1010
|
import { SerializationContext } from "engine/engine_serialization_core";
|
|
@@ -1009,7 +1016,7 @@ declare module "engine/engine_gltf" {
|
|
|
1009
1016
|
loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator: boolean, prog?: (ProgressEvent: any) => void): Promise<GLTF | undefined>;
|
|
1010
1017
|
}
|
|
1011
1018
|
export function getLoader(): INeedleGltfLoader;
|
|
1012
|
-
export function registerLoader(loader:
|
|
1019
|
+
export function registerLoader<T extends INeedleGltfLoader>(loader: ConstructorConcrete<T>): void;
|
|
1013
1020
|
}
|
|
1014
1021
|
declare module "engine/engine_networking_files" {
|
|
1015
1022
|
import { Context } from "engine/engine_setup";
|
|
@@ -1755,70 +1762,6 @@ declare module "engine/engine_loaders" {
|
|
|
1755
1762
|
export function setKtx2TranscoderPath(path: string): void;
|
|
1756
1763
|
export function addDracoAndKTX2Loaders(loader: GLTFLoader, context: Context): void;
|
|
1757
1764
|
}
|
|
1758
|
-
declare module "engine/engine_element" {
|
|
1759
|
-
import { Context } from "engine/engine_setup";
|
|
1760
|
-
export class EngineElement extends HTMLElement {
|
|
1761
|
-
get loadingProgress01(): number;
|
|
1762
|
-
get loadingFinished(): boolean;
|
|
1763
|
-
getContext(): Promise<Context>;
|
|
1764
|
-
get Context(): Context | null;
|
|
1765
|
-
/**@obsolete use GameObject */
|
|
1766
|
-
private gameObject;
|
|
1767
|
-
private GameObject;
|
|
1768
|
-
private _context;
|
|
1769
|
-
private _overlay_ar;
|
|
1770
|
-
private _loadingProgress01;
|
|
1771
|
-
private _watcher?;
|
|
1772
|
-
private _loadingView?;
|
|
1773
|
-
constructor();
|
|
1774
|
-
connectedCallback(): Promise<void>;
|
|
1775
|
-
disconnectedCallback(): void;
|
|
1776
|
-
static get observedAttributes(): string[];
|
|
1777
|
-
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
1778
|
-
private registerEventFromAttribute;
|
|
1779
|
-
getAROverlayContainer(): HTMLElement;
|
|
1780
|
-
getVROverlayContainer(): HTMLElement | null;
|
|
1781
|
-
onEnterAR(session: THREE.XRSession, overlayContainer: HTMLElement): void;
|
|
1782
|
-
onExitAR(session: THREE.XRSession): void;
|
|
1783
|
-
onEnterVR(session: THREE.XRSession): void;
|
|
1784
|
-
onExitVR(session: THREE.XRSession): void;
|
|
1785
|
-
private onElementsChanged;
|
|
1786
|
-
private onSetupAR;
|
|
1787
|
-
private onSetupVR;
|
|
1788
|
-
private onSetupDesktop;
|
|
1789
|
-
private setupElementsForMode;
|
|
1790
|
-
private foreachHtmlElement;
|
|
1791
|
-
private onBeforeBeginLoading;
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
declare module "engine/engine_serialization_decorator" {
|
|
1795
|
-
import { Constructor } from "engine/engine_types";
|
|
1796
|
-
export type TypeResolver<T> = (data: any) => Constructor<T> | null;
|
|
1797
|
-
export const serializeable: <T>(type?: Constructor<T> | TypeResolver<T> | (Constructor<any> | TypeResolver<T>)[] | null | undefined) => (_target: any, _propertyKey: string) => void;
|
|
1798
|
-
export const ALL_PROPERTIES_MARKER = "__NEEDLE__ALL_PROPERTIES";
|
|
1799
|
-
/** @deprecated current not used */
|
|
1800
|
-
export function allProperties(constructor: Function): void;
|
|
1801
|
-
export const STRICT_MARKER = "__NEEDLE__STRICT";
|
|
1802
|
-
/** @deprecated current not used */
|
|
1803
|
-
export function strict(constructor: Function): void;
|
|
1804
|
-
}
|
|
1805
|
-
declare module "engine/api" {
|
|
1806
|
-
export { InstancingUtil } from "engine/engine_instancing";
|
|
1807
|
-
export * from "engine/engine_gameobject";
|
|
1808
|
-
export * from "engine/engine_components";
|
|
1809
|
-
}
|
|
1810
|
-
declare module "engine-components/AlignmentConstraint" {
|
|
1811
|
-
import { Behaviour } from "engine-components/Component";
|
|
1812
|
-
export class AlignmentConstraint extends Behaviour {
|
|
1813
|
-
private from;
|
|
1814
|
-
private to;
|
|
1815
|
-
private width;
|
|
1816
|
-
private centered;
|
|
1817
|
-
private _centerPos;
|
|
1818
|
-
awake(): void;
|
|
1819
|
-
update(): void;
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
1765
|
declare module "engine/extensions/NEEDLE_animator_controller_model" {
|
|
1823
1766
|
import { Animator } from "engine-components/Animator";
|
|
1824
1767
|
import { AnimationAction, AnimationClip, Object3D } from "three";
|
|
@@ -1970,6 +1913,17 @@ declare module "engine-components/AnimatorController" {
|
|
|
1970
1913
|
private rootMotionHandler?;
|
|
1971
1914
|
}
|
|
1972
1915
|
}
|
|
1916
|
+
declare module "engine/engine_serialization_decorator" {
|
|
1917
|
+
import { Constructor } from "engine/engine_types";
|
|
1918
|
+
export type TypeResolver<T> = (data: any) => Constructor<T> | null;
|
|
1919
|
+
export const serializeable: <T>(type?: Constructor<T> | TypeResolver<T> | (Constructor<any> | TypeResolver<T>)[] | null | undefined) => (_target: any, _propertyKey: string) => void;
|
|
1920
|
+
export const ALL_PROPERTIES_MARKER = "__NEEDLE__ALL_PROPERTIES";
|
|
1921
|
+
/** @deprecated current not used */
|
|
1922
|
+
export function allProperties(constructor: Function): void;
|
|
1923
|
+
export const STRICT_MARKER = "__NEEDLE__STRICT";
|
|
1924
|
+
/** @deprecated current not used */
|
|
1925
|
+
export function strict(constructor: Function): void;
|
|
1926
|
+
}
|
|
1973
1927
|
declare module "engine-components/Animator" {
|
|
1974
1928
|
import { Behaviour } from "engine-components/Component";
|
|
1975
1929
|
import * as THREE from 'three';
|
|
@@ -2055,15 +2009,292 @@ declare module "engine-components/Animation" {
|
|
|
2055
2009
|
private _currentActions;
|
|
2056
2010
|
private _handles;
|
|
2057
2011
|
awake(): void;
|
|
2058
|
-
onEnable(): void;
|
|
2059
|
-
start(): void;
|
|
2012
|
+
onEnable(): void;
|
|
2013
|
+
start(): void;
|
|
2014
|
+
update(): void;
|
|
2015
|
+
getAction(name: string): THREE.AnimationAction | undefined | null;
|
|
2016
|
+
play(clipOrNumber: AnimationClip | number | string, options?: PlayOptions): Promise<AnimationAction> | void;
|
|
2017
|
+
internalOnPlay(action: AnimationAction, options?: PlayOptions): Promise<AnimationAction>;
|
|
2018
|
+
private tryFindHandle;
|
|
2019
|
+
private _didInit;
|
|
2020
|
+
init(): void;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
declare module "engine/extensions/NEEDLE_techniques_webgl" {
|
|
2024
|
+
import { GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2025
|
+
import * as THREE from 'three';
|
|
2026
|
+
import { RawShaderMaterial } from 'three';
|
|
2027
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2028
|
+
export const NEEDLE_TECHNIQUES_WEBGL_NAME = "NEEDLE_techniques_webgl";
|
|
2029
|
+
export class CustomShader extends RawShaderMaterial {
|
|
2030
|
+
private identifier;
|
|
2031
|
+
private onBeforeRenderSceneCallback;
|
|
2032
|
+
clone(): this;
|
|
2033
|
+
constructor(identifier: SourceIdentifier, ...args: any[]);
|
|
2034
|
+
dispose(): void;
|
|
2035
|
+
waitForLighting(): Promise<void>;
|
|
2036
|
+
private _sphericalHarmonicsName;
|
|
2037
|
+
private _objToWorldName;
|
|
2038
|
+
private _worldToObjectName;
|
|
2039
|
+
private static viewProjection;
|
|
2040
|
+
private static _viewProjectionValues;
|
|
2041
|
+
private _viewProjectionName;
|
|
2042
|
+
private static viewMatrix;
|
|
2043
|
+
private static _viewMatrixValues;
|
|
2044
|
+
private _viewMatrixName;
|
|
2045
|
+
private static _worldSpaceCameraPosName;
|
|
2046
|
+
private static _worldSpaceCameraPos;
|
|
2047
|
+
private static _mainLightColor;
|
|
2048
|
+
private static _mainLightPosition;
|
|
2049
|
+
private static _lightData;
|
|
2050
|
+
private _rendererData;
|
|
2051
|
+
private get depthTextureUniform();
|
|
2052
|
+
private get opaqueTextureUniform();
|
|
2053
|
+
private onBeforeRenderScene;
|
|
2054
|
+
onBeforeRender(_renderer: any, _scene: any, camera: any, _geometry: any, obj: any, _group: any): void;
|
|
2055
|
+
onUpdateUniforms(camera?: THREE.Camera, obj?: any): void;
|
|
2056
|
+
}
|
|
2057
|
+
export class NEEDLE_techniques_webgl implements GLTFLoaderPlugin {
|
|
2058
|
+
get name(): string;
|
|
2059
|
+
private parser;
|
|
2060
|
+
private identifier;
|
|
2061
|
+
constructor(loader: GLTFParser, identifier: SourceIdentifier);
|
|
2062
|
+
loadMaterial(index: number): Promise<THREE.Material> | null;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
declare module "engine/extensions/NEEDLE_gameobject_data" {
|
|
2066
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2067
|
+
export const EXTENSION_NAME = "NEEDLE_gameobject_data";
|
|
2068
|
+
export class NEEDLE_gameobject_data implements GLTFLoaderPlugin {
|
|
2069
|
+
get name(): string;
|
|
2070
|
+
private parser;
|
|
2071
|
+
constructor(parser: GLTFParser);
|
|
2072
|
+
afterRoot(_result: GLTF): Promise<void> | null;
|
|
2073
|
+
private findAndApplyExtensionData;
|
|
2074
|
+
private applyExtensionData;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
declare module "engine/extensions/NEEDLE_render_objects" {
|
|
2078
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2079
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2080
|
+
import { IRenderer as Renderer } from "engine/engine_types";
|
|
2081
|
+
export class NEEDLE_render_objects implements GLTFLoaderPlugin {
|
|
2082
|
+
private static stencils;
|
|
2083
|
+
static applyStencil(obj?: Renderer | null): void;
|
|
2084
|
+
private parser;
|
|
2085
|
+
private source;
|
|
2086
|
+
constructor(parser: GLTFParser, source: SourceIdentifier);
|
|
2087
|
+
afterRoot(_result: GLTF): Promise<void> | null;
|
|
2088
|
+
}
|
|
2089
|
+
export const EXTENSION_NAME = "NEEDLE_render_objects";
|
|
2090
|
+
}
|
|
2091
|
+
declare module "engine/extensions/NEEDLE_deferred_texture" {
|
|
2092
|
+
import { Material } from "three";
|
|
2093
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2094
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2095
|
+
import { Context } from "engine/engine_setup";
|
|
2096
|
+
export const EXTENSION_NAME = "NEEDLE_deferred_texture";
|
|
2097
|
+
export class NEEDLE_deferred_texture implements GLTFLoaderPlugin {
|
|
2098
|
+
static assignTextureLOD(context: Context, source: SourceIdentifier | undefined, material: Material, level?: number): void;
|
|
2099
|
+
get name(): string;
|
|
2100
|
+
private parser;
|
|
2101
|
+
private sourceId;
|
|
2102
|
+
private context;
|
|
2103
|
+
constructor(parser: GLTFParser, sourceId: SourceIdentifier, context: Context);
|
|
2104
|
+
private _loading;
|
|
2105
|
+
afterRoot(gltf: GLTF): null;
|
|
2106
|
+
private static cache;
|
|
2107
|
+
private static resolved;
|
|
2108
|
+
private static getOrLoadTexture;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
declare module "engine/extensions/extensions" {
|
|
2112
|
+
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2113
|
+
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
2114
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2115
|
+
import { Context } from "engine/engine_setup";
|
|
2116
|
+
export function registerComponentExtension(loader: GLTFLoader): NEEDLE_components;
|
|
2117
|
+
export function registerExtensions(loader: GLTFLoader, context: Context, sourceId: SourceIdentifier): void;
|
|
2118
|
+
}
|
|
2119
|
+
declare module "engine-components/EventList" {
|
|
2120
|
+
export class CallInfo {
|
|
2121
|
+
method?: Function;
|
|
2122
|
+
enabled: boolean;
|
|
2123
|
+
constructor(method?: Function, enabled?: boolean);
|
|
2124
|
+
invoke(...args: any): void;
|
|
2125
|
+
}
|
|
2126
|
+
export class EventListEvent extends Event {
|
|
2127
|
+
args?: [];
|
|
2128
|
+
}
|
|
2129
|
+
export class EventList {
|
|
2130
|
+
private target?;
|
|
2131
|
+
private key?;
|
|
2132
|
+
/** set an event target to try invoke the EventTarget dispatchEvent when this EventList is invoked */
|
|
2133
|
+
setEventTarget(key: string, target: object): void;
|
|
2134
|
+
private _isInvoking;
|
|
2135
|
+
private methods;
|
|
2136
|
+
constructor(evts?: CallInfo[]);
|
|
2137
|
+
invoke(...args: any): void;
|
|
2138
|
+
addEventListener(cb: Function): Function;
|
|
2139
|
+
removeEventListener(cb: Function | null | undefined): void;
|
|
2140
|
+
removeAllEventListeners(): void;
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
declare module "engine/engine_serialization_builtin_serializer" {
|
|
2144
|
+
import * as THREE from "three";
|
|
2145
|
+
import { RGBAColor } from "engine-components/js-extensions/RGBAColor";
|
|
2146
|
+
import { SerializationContext, TypeSerializer } from "engine/engine_serialization_core";
|
|
2147
|
+
import { Behaviour, GameObject } from "engine-components/Component";
|
|
2148
|
+
import { EventList } from "engine-components/EventList";
|
|
2149
|
+
class ColorSerializer extends TypeSerializer {
|
|
2150
|
+
constructor();
|
|
2151
|
+
onDeserialize(data: any): THREE.Color | RGBAColor | void;
|
|
2152
|
+
onSerialize(data: any): any | void;
|
|
2153
|
+
}
|
|
2154
|
+
export const colorSerializer: ColorSerializer;
|
|
2155
|
+
type ObjectData = {
|
|
2156
|
+
node?: number;
|
|
2157
|
+
guid?: string;
|
|
2158
|
+
};
|
|
2159
|
+
class ObjectSerializer extends TypeSerializer {
|
|
2160
|
+
constructor();
|
|
2161
|
+
onSerialize(data: any, context: SerializationContext): {
|
|
2162
|
+
node: number;
|
|
2163
|
+
} | undefined;
|
|
2164
|
+
onDeserialize(data: ObjectData, context: SerializationContext): THREE.Object3D<THREE.Event> | GameObject | Behaviour | null | undefined;
|
|
2165
|
+
}
|
|
2166
|
+
export const objectSerializer: ObjectSerializer;
|
|
2167
|
+
class ComponentSerializer extends TypeSerializer {
|
|
2168
|
+
constructor();
|
|
2169
|
+
onSerialize(data: any, _context: SerializationContext): {
|
|
2170
|
+
guid: any;
|
|
2171
|
+
} | undefined;
|
|
2172
|
+
onDeserialize(data: any, context: SerializationContext): any;
|
|
2173
|
+
findObjectForGuid(guid: string, root: THREE.Object3D): any;
|
|
2174
|
+
}
|
|
2175
|
+
export const componentSerializer: ComponentSerializer;
|
|
2176
|
+
class EventListData {
|
|
2177
|
+
type: string;
|
|
2178
|
+
calls: Array<EventListCall>;
|
|
2179
|
+
}
|
|
2180
|
+
type EventListCall = {
|
|
2181
|
+
method: string;
|
|
2182
|
+
target: string;
|
|
2183
|
+
argument?: any;
|
|
2184
|
+
enabled?: boolean;
|
|
2185
|
+
};
|
|
2186
|
+
class EventListSerializer extends TypeSerializer {
|
|
2187
|
+
constructor();
|
|
2188
|
+
onSerialize(_data: EventList, _context: SerializationContext): EventListData | undefined;
|
|
2189
|
+
onDeserialize(data: EventListData, context: SerializationContext): EventList | undefined | null;
|
|
2190
|
+
}
|
|
2191
|
+
export const eventListSerializer: EventListSerializer;
|
|
2192
|
+
}
|
|
2193
|
+
declare module "engine/engine_serialization" {
|
|
2194
|
+
import { serializeObject, deserializeObject } from "engine/engine_serialization_core";
|
|
2195
|
+
import * as builtin from "engine/engine_serialization_builtin_serializer";
|
|
2196
|
+
export { serializeObject, deserializeObject, builtin };
|
|
2197
|
+
export { serializeable } from "engine/engine_serialization_decorator";
|
|
2198
|
+
}
|
|
2199
|
+
declare module "engine/engine_gltf_builtin_components" {
|
|
2200
|
+
import "./codegen/register_types";
|
|
2201
|
+
import { Component } from "engine-components/Component";
|
|
2202
|
+
import { Context } from "engine/engine_setup";
|
|
2203
|
+
import { SerializationContext } from "engine/engine_serialization_core";
|
|
2204
|
+
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
2205
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2206
|
+
import { UIDProvider } from "engine/engine_types";
|
|
2207
|
+
export function writeBuiltinComponentData(comp: Component, context: SerializationContext): object | null;
|
|
2208
|
+
export function createBuiltinComponents(context: Context, gltfId: SourceIdentifier, gltf: any, seed?: number | null | UIDProvider, extension?: NEEDLE_components): Promise<void>;
|
|
2209
|
+
}
|
|
2210
|
+
declare module "engine/engine_scenetools" {
|
|
2211
|
+
import { Context } from "engine/engine_setup";
|
|
2212
|
+
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
2213
|
+
import { INeedleGltfLoader } from "engine/engine_gltf";
|
|
2214
|
+
import { UIDProvider } from "engine/engine_types";
|
|
2215
|
+
import { SerializationContext } from "engine/engine_serialization_core";
|
|
2216
|
+
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
2217
|
+
export class NeedleGltfLoader implements INeedleGltfLoader {
|
|
2218
|
+
createBuiltinComponents(context: Context, gltfId: string, gltf: any, seed: number | UIDProvider | null, extension?: NEEDLE_components | undefined): Promise<void>;
|
|
2219
|
+
writeBuiltinComponentData(comp: any, context: SerializationContext): object | null;
|
|
2220
|
+
parseSync(context: Context, data: any, path: string, seed: number | UIDProvider | null): Promise<GLTF | undefined>;
|
|
2221
|
+
loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator: boolean, prog?: ((ProgressEvent: any) => void) | undefined): Promise<GLTF | undefined>;
|
|
2222
|
+
}
|
|
2223
|
+
export enum GltfLoadEventType {
|
|
2224
|
+
BeforeLoad = 0,
|
|
2225
|
+
AfterLoaded = 1,
|
|
2226
|
+
FinishedSetup = 10
|
|
2227
|
+
}
|
|
2228
|
+
export class GltfLoadEvent {
|
|
2229
|
+
context: Context;
|
|
2230
|
+
loader: GLTFLoader;
|
|
2231
|
+
path: string;
|
|
2232
|
+
gltf?: GLTF;
|
|
2233
|
+
constructor(context: Context, path: string, loader: GLTFLoader, gltf?: GLTF);
|
|
2234
|
+
}
|
|
2235
|
+
export type GltfLoadEventCallback = (event: GltfLoadEvent) => void;
|
|
2236
|
+
export function addGltfLoadEventListener(type: GltfLoadEventType, listener: GltfLoadEventCallback): void;
|
|
2237
|
+
export function removeGltfLoadEventListener(type: GltfLoadEventType, listener: GltfLoadEventCallback): void;
|
|
2238
|
+
export function parseSync(context: Context, data: any, path: string, seed: number | UIDProvider | null): Promise<GLTF | undefined>;
|
|
2239
|
+
export function loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator?: boolean, prog?: (ProgressEvent: any) => void): Promise<GLTF | undefined>;
|
|
2240
|
+
export function findAnimationsLate(_context: Context, gltf: any, callbackarray: any, allowAddingAnimator?: boolean): void;
|
|
2241
|
+
export function findAnimations(gltf: GLTF, allowAddingAnimator?: boolean): void;
|
|
2242
|
+
export function tryFindObjectByName(name: any, obj: any, recursive?: boolean): any;
|
|
2243
|
+
export function tryFindObject(globalObjectIdentifier: any, obj: any, recursive?: boolean): any;
|
|
2244
|
+
export function tryFindScript(globalObjectIdentifier: any, list?: null): import("engine/engine_types").IComponent | null;
|
|
2245
|
+
}
|
|
2246
|
+
declare module "engine/engine_element" {
|
|
2247
|
+
import { Context } from "engine/engine_setup";
|
|
2248
|
+
import { INeedleEngineComponent } from "engine/engine_types";
|
|
2249
|
+
export class EngineElement extends HTMLElement implements INeedleEngineComponent {
|
|
2250
|
+
get loadingProgress01(): number;
|
|
2251
|
+
get loadingFinished(): boolean;
|
|
2252
|
+
getContext(): Promise<Context>;
|
|
2253
|
+
get Context(): Context | null;
|
|
2254
|
+
/**@obsolete use GameObject */
|
|
2255
|
+
private gameObject;
|
|
2256
|
+
private GameObject;
|
|
2257
|
+
private _context;
|
|
2258
|
+
private _overlay_ar;
|
|
2259
|
+
private _loadingProgress01;
|
|
2260
|
+
private _watcher?;
|
|
2261
|
+
private _loadingView?;
|
|
2262
|
+
constructor();
|
|
2263
|
+
connectedCallback(): Promise<void>;
|
|
2264
|
+
disconnectedCallback(): void;
|
|
2265
|
+
static get observedAttributes(): string[];
|
|
2266
|
+
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
2267
|
+
private registerEventFromAttribute;
|
|
2268
|
+
getAROverlayContainer(): HTMLElement;
|
|
2269
|
+
getVROverlayContainer(): HTMLElement | null;
|
|
2270
|
+
onEnterAR(session: THREE.XRSession, overlayContainer: HTMLElement): void;
|
|
2271
|
+
onExitAR(session: THREE.XRSession): void;
|
|
2272
|
+
onEnterVR(session: THREE.XRSession): void;
|
|
2273
|
+
onExitVR(session: THREE.XRSession): void;
|
|
2274
|
+
private onElementsChanged;
|
|
2275
|
+
private onSetupAR;
|
|
2276
|
+
private onSetupVR;
|
|
2277
|
+
private onSetupDesktop;
|
|
2278
|
+
private setupElementsForMode;
|
|
2279
|
+
private foreachHtmlElement;
|
|
2280
|
+
private onBeforeBeginLoading;
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
declare module "engine/api" {
|
|
2284
|
+
export { InstancingUtil } from "engine/engine_instancing";
|
|
2285
|
+
export * from "engine/engine_gameobject";
|
|
2286
|
+
export * from "engine/engine_components";
|
|
2287
|
+
}
|
|
2288
|
+
declare module "engine-components/AlignmentConstraint" {
|
|
2289
|
+
import { Behaviour } from "engine-components/Component";
|
|
2290
|
+
export class AlignmentConstraint extends Behaviour {
|
|
2291
|
+
private from;
|
|
2292
|
+
private to;
|
|
2293
|
+
private width;
|
|
2294
|
+
private centered;
|
|
2295
|
+
private _centerPos;
|
|
2296
|
+
awake(): void;
|
|
2060
2297
|
update(): void;
|
|
2061
|
-
getAction(name: string): THREE.AnimationAction | undefined | null;
|
|
2062
|
-
play(clipOrNumber: AnimationClip | number | string, options?: PlayOptions): Promise<AnimationAction> | void;
|
|
2063
|
-
internalOnPlay(action: AnimationAction, options?: PlayOptions): Promise<AnimationAction>;
|
|
2064
|
-
private tryFindHandle;
|
|
2065
|
-
private _didInit;
|
|
2066
|
-
init(): void;
|
|
2067
2298
|
}
|
|
2068
2299
|
}
|
|
2069
2300
|
declare module "engine-components/AnimationCurve" {
|
|
@@ -2708,80 +2939,6 @@ declare module "engine-components/avatar/Avatar_Brain_LookAt" {
|
|
|
2708
2939
|
private selectTarget;
|
|
2709
2940
|
}
|
|
2710
2941
|
}
|
|
2711
|
-
declare module "engine-components/EventList" {
|
|
2712
|
-
export class CallInfo {
|
|
2713
|
-
method?: Function;
|
|
2714
|
-
enabled: boolean;
|
|
2715
|
-
constructor(method?: Function, enabled?: boolean);
|
|
2716
|
-
invoke(...args: any): void;
|
|
2717
|
-
}
|
|
2718
|
-
export class EventListEvent extends Event {
|
|
2719
|
-
args?: [];
|
|
2720
|
-
}
|
|
2721
|
-
export class EventList {
|
|
2722
|
-
private target?;
|
|
2723
|
-
private key?;
|
|
2724
|
-
/** set an event target to try invoke the EventTarget dispatchEvent when this EventList is invoked */
|
|
2725
|
-
setEventTarget(key: string, target: object): void;
|
|
2726
|
-
private _isInvoking;
|
|
2727
|
-
private methods;
|
|
2728
|
-
constructor(evts?: CallInfo[]);
|
|
2729
|
-
invoke(...args: any): void;
|
|
2730
|
-
addEventListener(cb: Function): Function;
|
|
2731
|
-
removeEventListener(cb: Function | null | undefined): void;
|
|
2732
|
-
removeAllEventListeners(): void;
|
|
2733
|
-
}
|
|
2734
|
-
}
|
|
2735
|
-
declare module "engine/engine_serialization_builtin_serializer" {
|
|
2736
|
-
import * as THREE from "three";
|
|
2737
|
-
import { RGBAColor } from "engine-components/js-extensions/RGBAColor";
|
|
2738
|
-
import { SerializationContext, TypeSerializer } from "engine/engine_serialization_core";
|
|
2739
|
-
import { Behaviour, GameObject } from "engine-components/Component";
|
|
2740
|
-
import { EventList } from "engine-components/EventList";
|
|
2741
|
-
class ColorSerializer extends TypeSerializer {
|
|
2742
|
-
constructor();
|
|
2743
|
-
onDeserialize(data: any): THREE.Color | RGBAColor | void;
|
|
2744
|
-
onSerialize(data: any): any | void;
|
|
2745
|
-
}
|
|
2746
|
-
export const colorSerializer: ColorSerializer;
|
|
2747
|
-
type ObjectData = {
|
|
2748
|
-
node?: number;
|
|
2749
|
-
guid?: string;
|
|
2750
|
-
};
|
|
2751
|
-
class ObjectSerializer extends TypeSerializer {
|
|
2752
|
-
constructor();
|
|
2753
|
-
onSerialize(data: any, context: SerializationContext): {
|
|
2754
|
-
node: number;
|
|
2755
|
-
} | undefined;
|
|
2756
|
-
onDeserialize(data: ObjectData, context: SerializationContext): THREE.Object3D<THREE.Event> | GameObject | Behaviour | null | undefined;
|
|
2757
|
-
}
|
|
2758
|
-
export const objectSerializer: ObjectSerializer;
|
|
2759
|
-
class ComponentSerializer extends TypeSerializer {
|
|
2760
|
-
constructor();
|
|
2761
|
-
onSerialize(data: any, _context: SerializationContext): {
|
|
2762
|
-
guid: any;
|
|
2763
|
-
} | undefined;
|
|
2764
|
-
onDeserialize(data: any, context: SerializationContext): any;
|
|
2765
|
-
findObjectForGuid(guid: string, root: THREE.Object3D): any;
|
|
2766
|
-
}
|
|
2767
|
-
export const componentSerializer: ComponentSerializer;
|
|
2768
|
-
class EventListData {
|
|
2769
|
-
type: string;
|
|
2770
|
-
calls: Array<EventListCall>;
|
|
2771
|
-
}
|
|
2772
|
-
type EventListCall = {
|
|
2773
|
-
method: string;
|
|
2774
|
-
target: string;
|
|
2775
|
-
argument?: any;
|
|
2776
|
-
enabled?: boolean;
|
|
2777
|
-
};
|
|
2778
|
-
class EventListSerializer extends TypeSerializer {
|
|
2779
|
-
constructor();
|
|
2780
|
-
onSerialize(_data: EventList, _context: SerializationContext): EventListData | undefined;
|
|
2781
|
-
onDeserialize(data: EventListData, context: SerializationContext): EventList | undefined | null;
|
|
2782
|
-
}
|
|
2783
|
-
export const eventListSerializer: EventListSerializer;
|
|
2784
|
-
}
|
|
2785
2942
|
declare module "engine-components/LookAtConstraint" {
|
|
2786
2943
|
import { Behaviour } from "engine-components/Component";
|
|
2787
2944
|
import * as THREE from "three";
|
|
@@ -2947,40 +3104,6 @@ declare module "engine-components/RendererLightmap" {
|
|
|
2947
3104
|
private setLightmapDebugMaterial;
|
|
2948
3105
|
}
|
|
2949
3106
|
}
|
|
2950
|
-
declare module "engine/extensions/NEEDLE_render_objects" {
|
|
2951
|
-
import { SourceIdentifier } from "engine/engine_types";
|
|
2952
|
-
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2953
|
-
import { IRenderer as Renderer } from "engine/engine_types";
|
|
2954
|
-
export class NEEDLE_render_objects implements GLTFLoaderPlugin {
|
|
2955
|
-
private static stencils;
|
|
2956
|
-
static applyStencil(obj?: Renderer | null): void;
|
|
2957
|
-
private parser;
|
|
2958
|
-
private source;
|
|
2959
|
-
constructor(parser: GLTFParser, source: SourceIdentifier);
|
|
2960
|
-
afterRoot(_result: GLTF): Promise<void> | null;
|
|
2961
|
-
}
|
|
2962
|
-
export const EXTENSION_NAME = "NEEDLE_render_objects";
|
|
2963
|
-
}
|
|
2964
|
-
declare module "engine/extensions/NEEDLE_deferred_texture" {
|
|
2965
|
-
import { Material } from "three";
|
|
2966
|
-
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2967
|
-
import { SourceIdentifier } from "engine/engine_types";
|
|
2968
|
-
import { Context } from "engine/engine_setup";
|
|
2969
|
-
export const EXTENSION_NAME = "NEEDLE_deferred_texture";
|
|
2970
|
-
export class NEEDLE_deferred_texture implements GLTFLoaderPlugin {
|
|
2971
|
-
static assignTextureLOD(context: Context, source: SourceIdentifier | undefined, material: Material, level?: number): void;
|
|
2972
|
-
get name(): string;
|
|
2973
|
-
private parser;
|
|
2974
|
-
private sourceId;
|
|
2975
|
-
private context;
|
|
2976
|
-
constructor(parser: GLTFParser, sourceId: SourceIdentifier, context: Context);
|
|
2977
|
-
private _loading;
|
|
2978
|
-
afterRoot(gltf: GLTF): null;
|
|
2979
|
-
private static cache;
|
|
2980
|
-
private static resolved;
|
|
2981
|
-
private static getOrLoadTexture;
|
|
2982
|
-
}
|
|
2983
|
-
}
|
|
2984
3107
|
declare module "engine-components/Renderer" {
|
|
2985
3108
|
import { Behaviour } from "engine-components/Component";
|
|
2986
3109
|
import * as THREE from "three";
|
|
@@ -3370,7 +3493,7 @@ declare module "engine-components/WebXR" {
|
|
|
3370
3493
|
getAROverlayContainer(): HTMLElement | null;
|
|
3371
3494
|
setReticleActive(active: boolean): void;
|
|
3372
3495
|
onBegin(session: THREE.XRSession): Promise<void>;
|
|
3373
|
-
onEnd(
|
|
3496
|
+
onEnd(session: THREE.XRSession): void;
|
|
3374
3497
|
onUpdate(session: THREE.XRSession, frame: THREE.XRFrame): void;
|
|
3375
3498
|
}
|
|
3376
3499
|
}
|
|
@@ -3395,6 +3518,7 @@ declare module "engine-components/DragControls" {
|
|
|
3395
3518
|
private static _active;
|
|
3396
3519
|
static get HasAnySelected(): boolean;
|
|
3397
3520
|
transformSelf: boolean;
|
|
3521
|
+
private orbit;
|
|
3398
3522
|
private selectStartEventListener;
|
|
3399
3523
|
private selectEndEventListener;
|
|
3400
3524
|
constructor();
|
|
@@ -3965,12 +4089,6 @@ declare module "engine-components/VideoPlayer" {
|
|
|
3965
4089
|
private updateAspectImpl;
|
|
3966
4090
|
}
|
|
3967
4091
|
}
|
|
3968
|
-
declare module "engine/engine_serialization" {
|
|
3969
|
-
import { serializeObject, deserializeObject } from "engine/engine_serialization_core";
|
|
3970
|
-
import * as builtin from "engine/engine_serialization_builtin_serializer";
|
|
3971
|
-
export { serializeObject, deserializeObject, builtin };
|
|
3972
|
-
export { serializeable } from "engine/engine_serialization_decorator";
|
|
3973
|
-
}
|
|
3974
4092
|
declare module "engine-components/ScreenCapture" {
|
|
3975
4093
|
import { Behaviour } from "engine-components/Component";
|
|
3976
4094
|
import { VideoPlayer } from "engine-components/VideoPlayer";
|
|
@@ -3985,6 +4103,11 @@ declare module "engine-components/ScreenCapture" {
|
|
|
3985
4103
|
Sending = 1,
|
|
3986
4104
|
Receiving = 2
|
|
3987
4105
|
}
|
|
4106
|
+
type ScreenCaptureOptions = {
|
|
4107
|
+
device?: ScreenCaptureDevice;
|
|
4108
|
+
deviceId?: string;
|
|
4109
|
+
constraints?: MediaTrackConstraints;
|
|
4110
|
+
};
|
|
3988
4111
|
export class ScreenCapture extends Behaviour implements IPointerClickHandler {
|
|
3989
4112
|
onPointerClick(): void;
|
|
3990
4113
|
videoPlayer?: VideoPlayer;
|
|
@@ -3999,7 +4122,7 @@ declare module "engine-components/ScreenCapture" {
|
|
|
3999
4122
|
private _currentMode;
|
|
4000
4123
|
awake(): void;
|
|
4001
4124
|
start(): void;
|
|
4002
|
-
share(): Promise<void>;
|
|
4125
|
+
share(opts?: ScreenCaptureOptions): Promise<void>;
|
|
4003
4126
|
close(): void;
|
|
4004
4127
|
private setVideo;
|
|
4005
4128
|
private onReceiveVideo;
|
|
@@ -5236,106 +5359,6 @@ declare module "needle-engine" {
|
|
|
5236
5359
|
export * from "engine-components/codegen/components";
|
|
5237
5360
|
export * from "engine-components/js-extensions/Object3D";
|
|
5238
5361
|
}
|
|
5239
|
-
declare module "engine/extensions/NEEDLE_techniques_webgl" {
|
|
5240
|
-
import { GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
5241
|
-
import * as THREE from 'three';
|
|
5242
|
-
import { RawShaderMaterial } from 'three';
|
|
5243
|
-
import { SourceIdentifier } from "engine/engine_types";
|
|
5244
|
-
export const NEEDLE_TECHNIQUES_WEBGL_NAME = "NEEDLE_techniques_webgl";
|
|
5245
|
-
export class CustomShader extends RawShaderMaterial {
|
|
5246
|
-
private identifier;
|
|
5247
|
-
private onBeforeRenderSceneCallback;
|
|
5248
|
-
clone(): this;
|
|
5249
|
-
constructor(identifier: SourceIdentifier, ...args: any[]);
|
|
5250
|
-
dispose(): void;
|
|
5251
|
-
waitForLighting(): Promise<void>;
|
|
5252
|
-
private _sphericalHarmonicsName;
|
|
5253
|
-
private _objToWorldName;
|
|
5254
|
-
private _worldToObjectName;
|
|
5255
|
-
private static viewProjection;
|
|
5256
|
-
private static _viewProjectionValues;
|
|
5257
|
-
private _viewProjectionName;
|
|
5258
|
-
private static viewMatrix;
|
|
5259
|
-
private static _viewMatrixValues;
|
|
5260
|
-
private _viewMatrixName;
|
|
5261
|
-
private static _worldSpaceCameraPosName;
|
|
5262
|
-
private static _worldSpaceCameraPos;
|
|
5263
|
-
private static _mainLightColor;
|
|
5264
|
-
private static _mainLightPosition;
|
|
5265
|
-
private static _lightData;
|
|
5266
|
-
private _rendererData;
|
|
5267
|
-
private get depthTextureUniform();
|
|
5268
|
-
private get opaqueTextureUniform();
|
|
5269
|
-
private onBeforeRenderScene;
|
|
5270
|
-
onBeforeRender(_renderer: any, _scene: any, camera: any, _geometry: any, obj: any, _group: any): void;
|
|
5271
|
-
onUpdateUniforms(camera?: THREE.Camera, obj?: any): void;
|
|
5272
|
-
}
|
|
5273
|
-
export class NEEDLE_techniques_webgl implements GLTFLoaderPlugin {
|
|
5274
|
-
get name(): string;
|
|
5275
|
-
private parser;
|
|
5276
|
-
private identifier;
|
|
5277
|
-
constructor(loader: GLTFParser, identifier: SourceIdentifier);
|
|
5278
|
-
loadMaterial(index: number): Promise<THREE.Material> | null;
|
|
5279
|
-
}
|
|
5280
|
-
}
|
|
5281
|
-
declare module "engine/extensions/NEEDLE_gameobject_data" {
|
|
5282
|
-
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
5283
|
-
export const EXTENSION_NAME = "NEEDLE_gameobject_data";
|
|
5284
|
-
export class NEEDLE_gameobject_data implements GLTFLoaderPlugin {
|
|
5285
|
-
get name(): string;
|
|
5286
|
-
private parser;
|
|
5287
|
-
constructor(parser: GLTFParser);
|
|
5288
|
-
afterRoot(_result: GLTF): Promise<void> | null;
|
|
5289
|
-
private findAndApplyExtensionData;
|
|
5290
|
-
private applyExtensionData;
|
|
5291
|
-
}
|
|
5292
|
-
}
|
|
5293
|
-
declare module "engine/extensions/extensions" {
|
|
5294
|
-
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
|
5295
|
-
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
5296
|
-
import { SourceIdentifier } from "engine/engine_types";
|
|
5297
|
-
import { Context } from "engine/engine_setup";
|
|
5298
|
-
export function registerComponentExtension(loader: GLTFLoader): NEEDLE_components;
|
|
5299
|
-
export function registerExtensions(loader: GLTFLoader, context: Context, sourceId: SourceIdentifier): void;
|
|
5300
|
-
}
|
|
5301
|
-
declare module "engine/engine_gltf_builtin_components" {
|
|
5302
|
-
import "./codegen/register_types";
|
|
5303
|
-
import { Component } from "engine-components/Component";
|
|
5304
|
-
import { Context } from "engine/engine_setup";
|
|
5305
|
-
import { SerializationContext } from "engine/engine_serialization_core";
|
|
5306
|
-
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
5307
|
-
import { SourceIdentifier } from "engine/engine_types";
|
|
5308
|
-
import { UIDProvider } from "engine/engine_types";
|
|
5309
|
-
export function writeBuiltinComponentData(comp: Component, context: SerializationContext): object | null;
|
|
5310
|
-
export function createBuiltinComponents(context: Context, gltfId: SourceIdentifier, gltf: any, seed?: number | null | UIDProvider, extension?: NEEDLE_components): Promise<void>;
|
|
5311
|
-
}
|
|
5312
|
-
declare module "engine/engine_scenetools" {
|
|
5313
|
-
import { Context } from "engine/engine_setup";
|
|
5314
|
-
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
5315
|
-
import { UIDProvider } from "engine/engine_types";
|
|
5316
|
-
export enum GltfLoadEventType {
|
|
5317
|
-
BeforeLoad = 0,
|
|
5318
|
-
AfterLoaded = 1,
|
|
5319
|
-
FinishedSetup = 10
|
|
5320
|
-
}
|
|
5321
|
-
export class GltfLoadEvent {
|
|
5322
|
-
context: Context;
|
|
5323
|
-
loader: GLTFLoader;
|
|
5324
|
-
path: string;
|
|
5325
|
-
gltf?: GLTF;
|
|
5326
|
-
constructor(context: Context, path: string, loader: GLTFLoader, gltf?: GLTF);
|
|
5327
|
-
}
|
|
5328
|
-
export type GltfLoadEventCallback = (event: GltfLoadEvent) => void;
|
|
5329
|
-
export function addGltfLoadEventListener(type: GltfLoadEventType, listener: GltfLoadEventCallback): void;
|
|
5330
|
-
export function removeGltfLoadEventListener(type: GltfLoadEventType, listener: GltfLoadEventCallback): void;
|
|
5331
|
-
export function parseSync(context: Context, data: any, path: string, seed: number | UIDProvider | null): Promise<GLTF | undefined>;
|
|
5332
|
-
export function loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator?: boolean, prog?: (ProgressEvent: any) => void): Promise<GLTF | undefined>;
|
|
5333
|
-
export function findAnimationsLate(_context: Context, gltf: any, callbackarray: any, allowAddingAnimator?: boolean): void;
|
|
5334
|
-
export function findAnimations(gltf: GLTF, allowAddingAnimator?: boolean): void;
|
|
5335
|
-
export function tryFindObjectByName(name: any, obj: any, recursive?: boolean): any;
|
|
5336
|
-
export function tryFindObject(globalObjectIdentifier: any, obj: any, recursive?: boolean): any;
|
|
5337
|
-
export function tryFindScript(globalObjectIdentifier: any, list?: null): import("engine/engine_types").IComponent | null;
|
|
5338
|
-
}
|
|
5339
5362
|
declare module "engine/debug/error_overlay" {
|
|
5340
5363
|
export function makeErrorsVisibleForDevelopment(): void;
|
|
5341
5364
|
}
|
|
@@ -5355,6 +5378,7 @@ declare module "engine/engine" {
|
|
|
5355
5378
|
tryFindObjectByName(name: any, obj: any, recursive?: boolean): any;
|
|
5356
5379
|
tryFindObject(globalObjectIdentifier: any, obj: any, recursive?: boolean): any;
|
|
5357
5380
|
tryFindScript(globalObjectIdentifier: any, list?: null): import("engine/engine_types").IComponent | null;
|
|
5381
|
+
NeedleGltfLoader: typeof engine_scenetools.NeedleGltfLoader;
|
|
5358
5382
|
GltfLoadEventType: typeof engine_scenetools.GltfLoadEventType;
|
|
5359
5383
|
GltfLoadEvent: typeof engine_scenetools.GltfLoadEvent;
|
|
5360
5384
|
registerComponent(script: import("engine/engine_types").IComponent, context?: engine_setup.Context | undefined): void;
|