@needle-tools/engine 2.35.2-pre → 2.35.4-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 +11 -0
- package/dist/needle-engine.d.ts +324 -295
- 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_element_loading.js +19 -8
- package/lib/engine/engine_element_loading.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_networking.js +4 -0
- package/lib/engine/engine_networking.js.map +1 -1
- package/lib/engine/engine_networking_utils.d.ts +1 -0
- package/lib/engine/engine_networking_utils.js +3 -0
- package/lib/engine/engine_networking_utils.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 +7 -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.d.ts +5 -1
- package/lib/engine-components/Renderer.js +11 -3
- 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_element_loading.ts +20 -9
- package/src/engine/engine_gltf.ts +8 -4
- package/src/engine/engine_networking.ts +7 -3
- package/src/engine/engine_networking_utils.ts +4 -0
- 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 +9 -1
- package/src/engine-components/DragControls.ts +10 -8
- package/src/engine-components/Renderer.ts +13 -3
- 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
|
}
|
|
@@ -813,6 +820,10 @@ declare module "engine/engine_networking_peer" {
|
|
|
813
820
|
private trySetupClient;
|
|
814
821
|
}
|
|
815
822
|
}
|
|
823
|
+
declare module "engine/engine_networking_utils" {
|
|
824
|
+
export function isLocalNetwork(hostname?: string): boolean;
|
|
825
|
+
export function isHostedOnGlitch(): boolean;
|
|
826
|
+
}
|
|
816
827
|
declare module "engine/engine_networking" {
|
|
817
828
|
import { Context } from "engine/engine_setup";
|
|
818
829
|
import * as flatbuffers from 'flatbuffers';
|
|
@@ -997,7 +1008,7 @@ declare module "engine/extensions/NEEDLE_components" {
|
|
|
997
1008
|
}
|
|
998
1009
|
}
|
|
999
1010
|
declare module "engine/engine_gltf" {
|
|
1000
|
-
import { SourceIdentifier, UIDProvider } from "engine/engine_types";
|
|
1011
|
+
import { ConstructorConcrete, SourceIdentifier, UIDProvider } from "engine/engine_types";
|
|
1001
1012
|
import { Context } from "engine/engine_setup";
|
|
1002
1013
|
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
1003
1014
|
import { SerializationContext } from "engine/engine_serialization_core";
|
|
@@ -1009,7 +1020,7 @@ declare module "engine/engine_gltf" {
|
|
|
1009
1020
|
loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator: boolean, prog?: (ProgressEvent: any) => void): Promise<GLTF | undefined>;
|
|
1010
1021
|
}
|
|
1011
1022
|
export function getLoader(): INeedleGltfLoader;
|
|
1012
|
-
export function registerLoader(loader:
|
|
1023
|
+
export function registerLoader<T extends INeedleGltfLoader>(loader: ConstructorConcrete<T>): void;
|
|
1013
1024
|
}
|
|
1014
1025
|
declare module "engine/engine_networking_files" {
|
|
1015
1026
|
import { Context } from "engine/engine_setup";
|
|
@@ -1755,70 +1766,6 @@ declare module "engine/engine_loaders" {
|
|
|
1755
1766
|
export function setKtx2TranscoderPath(path: string): void;
|
|
1756
1767
|
export function addDracoAndKTX2Loaders(loader: GLTFLoader, context: Context): void;
|
|
1757
1768
|
}
|
|
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
1769
|
declare module "engine/extensions/NEEDLE_animator_controller_model" {
|
|
1823
1770
|
import { Animator } from "engine-components/Animator";
|
|
1824
1771
|
import { AnimationAction, AnimationClip, Object3D } from "three";
|
|
@@ -1970,6 +1917,17 @@ declare module "engine-components/AnimatorController" {
|
|
|
1970
1917
|
private rootMotionHandler?;
|
|
1971
1918
|
}
|
|
1972
1919
|
}
|
|
1920
|
+
declare module "engine/engine_serialization_decorator" {
|
|
1921
|
+
import { Constructor } from "engine/engine_types";
|
|
1922
|
+
export type TypeResolver<T> = (data: any) => Constructor<T> | null;
|
|
1923
|
+
export const serializeable: <T>(type?: Constructor<T> | TypeResolver<T> | (Constructor<any> | TypeResolver<T>)[] | null | undefined) => (_target: any, _propertyKey: string) => void;
|
|
1924
|
+
export const ALL_PROPERTIES_MARKER = "__NEEDLE__ALL_PROPERTIES";
|
|
1925
|
+
/** @deprecated current not used */
|
|
1926
|
+
export function allProperties(constructor: Function): void;
|
|
1927
|
+
export const STRICT_MARKER = "__NEEDLE__STRICT";
|
|
1928
|
+
/** @deprecated current not used */
|
|
1929
|
+
export function strict(constructor: Function): void;
|
|
1930
|
+
}
|
|
1973
1931
|
declare module "engine-components/Animator" {
|
|
1974
1932
|
import { Behaviour } from "engine-components/Component";
|
|
1975
1933
|
import * as THREE from 'three';
|
|
@@ -2055,15 +2013,292 @@ declare module "engine-components/Animation" {
|
|
|
2055
2013
|
private _currentActions;
|
|
2056
2014
|
private _handles;
|
|
2057
2015
|
awake(): void;
|
|
2058
|
-
onEnable(): void;
|
|
2059
|
-
start(): void;
|
|
2016
|
+
onEnable(): void;
|
|
2017
|
+
start(): void;
|
|
2018
|
+
update(): void;
|
|
2019
|
+
getAction(name: string): THREE.AnimationAction | undefined | null;
|
|
2020
|
+
play(clipOrNumber: AnimationClip | number | string, options?: PlayOptions): Promise<AnimationAction> | void;
|
|
2021
|
+
internalOnPlay(action: AnimationAction, options?: PlayOptions): Promise<AnimationAction>;
|
|
2022
|
+
private tryFindHandle;
|
|
2023
|
+
private _didInit;
|
|
2024
|
+
init(): void;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
declare module "engine/extensions/NEEDLE_techniques_webgl" {
|
|
2028
|
+
import { GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2029
|
+
import * as THREE from 'three';
|
|
2030
|
+
import { RawShaderMaterial } from 'three';
|
|
2031
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2032
|
+
export const NEEDLE_TECHNIQUES_WEBGL_NAME = "NEEDLE_techniques_webgl";
|
|
2033
|
+
export class CustomShader extends RawShaderMaterial {
|
|
2034
|
+
private identifier;
|
|
2035
|
+
private onBeforeRenderSceneCallback;
|
|
2036
|
+
clone(): this;
|
|
2037
|
+
constructor(identifier: SourceIdentifier, ...args: any[]);
|
|
2038
|
+
dispose(): void;
|
|
2039
|
+
waitForLighting(): Promise<void>;
|
|
2040
|
+
private _sphericalHarmonicsName;
|
|
2041
|
+
private _objToWorldName;
|
|
2042
|
+
private _worldToObjectName;
|
|
2043
|
+
private static viewProjection;
|
|
2044
|
+
private static _viewProjectionValues;
|
|
2045
|
+
private _viewProjectionName;
|
|
2046
|
+
private static viewMatrix;
|
|
2047
|
+
private static _viewMatrixValues;
|
|
2048
|
+
private _viewMatrixName;
|
|
2049
|
+
private static _worldSpaceCameraPosName;
|
|
2050
|
+
private static _worldSpaceCameraPos;
|
|
2051
|
+
private static _mainLightColor;
|
|
2052
|
+
private static _mainLightPosition;
|
|
2053
|
+
private static _lightData;
|
|
2054
|
+
private _rendererData;
|
|
2055
|
+
private get depthTextureUniform();
|
|
2056
|
+
private get opaqueTextureUniform();
|
|
2057
|
+
private onBeforeRenderScene;
|
|
2058
|
+
onBeforeRender(_renderer: any, _scene: any, camera: any, _geometry: any, obj: any, _group: any): void;
|
|
2059
|
+
onUpdateUniforms(camera?: THREE.Camera, obj?: any): void;
|
|
2060
|
+
}
|
|
2061
|
+
export class NEEDLE_techniques_webgl implements GLTFLoaderPlugin {
|
|
2062
|
+
get name(): string;
|
|
2063
|
+
private parser;
|
|
2064
|
+
private identifier;
|
|
2065
|
+
constructor(loader: GLTFParser, identifier: SourceIdentifier);
|
|
2066
|
+
loadMaterial(index: number): Promise<THREE.Material> | null;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
declare module "engine/extensions/NEEDLE_gameobject_data" {
|
|
2070
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2071
|
+
export const EXTENSION_NAME = "NEEDLE_gameobject_data";
|
|
2072
|
+
export class NEEDLE_gameobject_data implements GLTFLoaderPlugin {
|
|
2073
|
+
get name(): string;
|
|
2074
|
+
private parser;
|
|
2075
|
+
constructor(parser: GLTFParser);
|
|
2076
|
+
afterRoot(_result: GLTF): Promise<void> | null;
|
|
2077
|
+
private findAndApplyExtensionData;
|
|
2078
|
+
private applyExtensionData;
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
declare module "engine/extensions/NEEDLE_render_objects" {
|
|
2082
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2083
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2084
|
+
import { IRenderer as Renderer } from "engine/engine_types";
|
|
2085
|
+
export class NEEDLE_render_objects implements GLTFLoaderPlugin {
|
|
2086
|
+
private static stencils;
|
|
2087
|
+
static applyStencil(obj?: Renderer | null): void;
|
|
2088
|
+
private parser;
|
|
2089
|
+
private source;
|
|
2090
|
+
constructor(parser: GLTFParser, source: SourceIdentifier);
|
|
2091
|
+
afterRoot(_result: GLTF): Promise<void> | null;
|
|
2092
|
+
}
|
|
2093
|
+
export const EXTENSION_NAME = "NEEDLE_render_objects";
|
|
2094
|
+
}
|
|
2095
|
+
declare module "engine/extensions/NEEDLE_deferred_texture" {
|
|
2096
|
+
import { Material } from "three";
|
|
2097
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2098
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2099
|
+
import { Context } from "engine/engine_setup";
|
|
2100
|
+
export const EXTENSION_NAME = "NEEDLE_deferred_texture";
|
|
2101
|
+
export class NEEDLE_deferred_texture implements GLTFLoaderPlugin {
|
|
2102
|
+
static assignTextureLOD(context: Context, source: SourceIdentifier | undefined, material: Material, level?: number): void;
|
|
2103
|
+
get name(): string;
|
|
2104
|
+
private parser;
|
|
2105
|
+
private sourceId;
|
|
2106
|
+
private context;
|
|
2107
|
+
constructor(parser: GLTFParser, sourceId: SourceIdentifier, context: Context);
|
|
2108
|
+
private _loading;
|
|
2109
|
+
afterRoot(gltf: GLTF): null;
|
|
2110
|
+
private static cache;
|
|
2111
|
+
private static resolved;
|
|
2112
|
+
private static getOrLoadTexture;
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
declare module "engine/extensions/extensions" {
|
|
2116
|
+
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2117
|
+
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
2118
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2119
|
+
import { Context } from "engine/engine_setup";
|
|
2120
|
+
export function registerComponentExtension(loader: GLTFLoader): NEEDLE_components;
|
|
2121
|
+
export function registerExtensions(loader: GLTFLoader, context: Context, sourceId: SourceIdentifier): void;
|
|
2122
|
+
}
|
|
2123
|
+
declare module "engine-components/EventList" {
|
|
2124
|
+
export class CallInfo {
|
|
2125
|
+
method?: Function;
|
|
2126
|
+
enabled: boolean;
|
|
2127
|
+
constructor(method?: Function, enabled?: boolean);
|
|
2128
|
+
invoke(...args: any): void;
|
|
2129
|
+
}
|
|
2130
|
+
export class EventListEvent extends Event {
|
|
2131
|
+
args?: [];
|
|
2132
|
+
}
|
|
2133
|
+
export class EventList {
|
|
2134
|
+
private target?;
|
|
2135
|
+
private key?;
|
|
2136
|
+
/** set an event target to try invoke the EventTarget dispatchEvent when this EventList is invoked */
|
|
2137
|
+
setEventTarget(key: string, target: object): void;
|
|
2138
|
+
private _isInvoking;
|
|
2139
|
+
private methods;
|
|
2140
|
+
constructor(evts?: CallInfo[]);
|
|
2141
|
+
invoke(...args: any): void;
|
|
2142
|
+
addEventListener(cb: Function): Function;
|
|
2143
|
+
removeEventListener(cb: Function | null | undefined): void;
|
|
2144
|
+
removeAllEventListeners(): void;
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
declare module "engine/engine_serialization_builtin_serializer" {
|
|
2148
|
+
import * as THREE from "three";
|
|
2149
|
+
import { RGBAColor } from "engine-components/js-extensions/RGBAColor";
|
|
2150
|
+
import { SerializationContext, TypeSerializer } from "engine/engine_serialization_core";
|
|
2151
|
+
import { Behaviour, GameObject } from "engine-components/Component";
|
|
2152
|
+
import { EventList } from "engine-components/EventList";
|
|
2153
|
+
class ColorSerializer extends TypeSerializer {
|
|
2154
|
+
constructor();
|
|
2155
|
+
onDeserialize(data: any): THREE.Color | RGBAColor | void;
|
|
2156
|
+
onSerialize(data: any): any | void;
|
|
2157
|
+
}
|
|
2158
|
+
export const colorSerializer: ColorSerializer;
|
|
2159
|
+
type ObjectData = {
|
|
2160
|
+
node?: number;
|
|
2161
|
+
guid?: string;
|
|
2162
|
+
};
|
|
2163
|
+
class ObjectSerializer extends TypeSerializer {
|
|
2164
|
+
constructor();
|
|
2165
|
+
onSerialize(data: any, context: SerializationContext): {
|
|
2166
|
+
node: number;
|
|
2167
|
+
} | undefined;
|
|
2168
|
+
onDeserialize(data: ObjectData, context: SerializationContext): THREE.Object3D<THREE.Event> | GameObject | Behaviour | null | undefined;
|
|
2169
|
+
}
|
|
2170
|
+
export const objectSerializer: ObjectSerializer;
|
|
2171
|
+
class ComponentSerializer extends TypeSerializer {
|
|
2172
|
+
constructor();
|
|
2173
|
+
onSerialize(data: any, _context: SerializationContext): {
|
|
2174
|
+
guid: any;
|
|
2175
|
+
} | undefined;
|
|
2176
|
+
onDeserialize(data: any, context: SerializationContext): any;
|
|
2177
|
+
findObjectForGuid(guid: string, root: THREE.Object3D): any;
|
|
2178
|
+
}
|
|
2179
|
+
export const componentSerializer: ComponentSerializer;
|
|
2180
|
+
class EventListData {
|
|
2181
|
+
type: string;
|
|
2182
|
+
calls: Array<EventListCall>;
|
|
2183
|
+
}
|
|
2184
|
+
type EventListCall = {
|
|
2185
|
+
method: string;
|
|
2186
|
+
target: string;
|
|
2187
|
+
argument?: any;
|
|
2188
|
+
enabled?: boolean;
|
|
2189
|
+
};
|
|
2190
|
+
class EventListSerializer extends TypeSerializer {
|
|
2191
|
+
constructor();
|
|
2192
|
+
onSerialize(_data: EventList, _context: SerializationContext): EventListData | undefined;
|
|
2193
|
+
onDeserialize(data: EventListData, context: SerializationContext): EventList | undefined | null;
|
|
2194
|
+
}
|
|
2195
|
+
export const eventListSerializer: EventListSerializer;
|
|
2196
|
+
}
|
|
2197
|
+
declare module "engine/engine_serialization" {
|
|
2198
|
+
import { serializeObject, deserializeObject } from "engine/engine_serialization_core";
|
|
2199
|
+
import * as builtin from "engine/engine_serialization_builtin_serializer";
|
|
2200
|
+
export { serializeObject, deserializeObject, builtin };
|
|
2201
|
+
export { serializeable } from "engine/engine_serialization_decorator";
|
|
2202
|
+
}
|
|
2203
|
+
declare module "engine/engine_gltf_builtin_components" {
|
|
2204
|
+
import "./codegen/register_types";
|
|
2205
|
+
import { Component } from "engine-components/Component";
|
|
2206
|
+
import { Context } from "engine/engine_setup";
|
|
2207
|
+
import { SerializationContext } from "engine/engine_serialization_core";
|
|
2208
|
+
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
2209
|
+
import { SourceIdentifier } from "engine/engine_types";
|
|
2210
|
+
import { UIDProvider } from "engine/engine_types";
|
|
2211
|
+
export function writeBuiltinComponentData(comp: Component, context: SerializationContext): object | null;
|
|
2212
|
+
export function createBuiltinComponents(context: Context, gltfId: SourceIdentifier, gltf: any, seed?: number | null | UIDProvider, extension?: NEEDLE_components): Promise<void>;
|
|
2213
|
+
}
|
|
2214
|
+
declare module "engine/engine_scenetools" {
|
|
2215
|
+
import { Context } from "engine/engine_setup";
|
|
2216
|
+
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
2217
|
+
import { INeedleGltfLoader } from "engine/engine_gltf";
|
|
2218
|
+
import { UIDProvider } from "engine/engine_types";
|
|
2219
|
+
import { SerializationContext } from "engine/engine_serialization_core";
|
|
2220
|
+
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
2221
|
+
export class NeedleGltfLoader implements INeedleGltfLoader {
|
|
2222
|
+
createBuiltinComponents(context: Context, gltfId: string, gltf: any, seed: number | UIDProvider | null, extension?: NEEDLE_components | undefined): Promise<void>;
|
|
2223
|
+
writeBuiltinComponentData(comp: any, context: SerializationContext): object | null;
|
|
2224
|
+
parseSync(context: Context, data: any, path: string, seed: number | UIDProvider | null): Promise<GLTF | undefined>;
|
|
2225
|
+
loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator: boolean, prog?: ((ProgressEvent: any) => void) | undefined): Promise<GLTF | undefined>;
|
|
2226
|
+
}
|
|
2227
|
+
export enum GltfLoadEventType {
|
|
2228
|
+
BeforeLoad = 0,
|
|
2229
|
+
AfterLoaded = 1,
|
|
2230
|
+
FinishedSetup = 10
|
|
2231
|
+
}
|
|
2232
|
+
export class GltfLoadEvent {
|
|
2233
|
+
context: Context;
|
|
2234
|
+
loader: GLTFLoader;
|
|
2235
|
+
path: string;
|
|
2236
|
+
gltf?: GLTF;
|
|
2237
|
+
constructor(context: Context, path: string, loader: GLTFLoader, gltf?: GLTF);
|
|
2238
|
+
}
|
|
2239
|
+
export type GltfLoadEventCallback = (event: GltfLoadEvent) => void;
|
|
2240
|
+
export function addGltfLoadEventListener(type: GltfLoadEventType, listener: GltfLoadEventCallback): void;
|
|
2241
|
+
export function removeGltfLoadEventListener(type: GltfLoadEventType, listener: GltfLoadEventCallback): void;
|
|
2242
|
+
export function parseSync(context: Context, data: any, path: string, seed: number | UIDProvider | null): Promise<GLTF | undefined>;
|
|
2243
|
+
export function loadSync(context: Context, url: string, seed: number | UIDProvider | null, _allowAddingAnimator?: boolean, prog?: (ProgressEvent: any) => void): Promise<GLTF | undefined>;
|
|
2244
|
+
export function findAnimationsLate(_context: Context, gltf: any, callbackarray: any, allowAddingAnimator?: boolean): void;
|
|
2245
|
+
export function findAnimations(gltf: GLTF, allowAddingAnimator?: boolean): void;
|
|
2246
|
+
export function tryFindObjectByName(name: any, obj: any, recursive?: boolean): any;
|
|
2247
|
+
export function tryFindObject(globalObjectIdentifier: any, obj: any, recursive?: boolean): any;
|
|
2248
|
+
export function tryFindScript(globalObjectIdentifier: any, list?: null): import("engine/engine_types").IComponent | null;
|
|
2249
|
+
}
|
|
2250
|
+
declare module "engine/engine_element" {
|
|
2251
|
+
import { Context } from "engine/engine_setup";
|
|
2252
|
+
import { INeedleEngineComponent } from "engine/engine_types";
|
|
2253
|
+
export class EngineElement extends HTMLElement implements INeedleEngineComponent {
|
|
2254
|
+
get loadingProgress01(): number;
|
|
2255
|
+
get loadingFinished(): boolean;
|
|
2256
|
+
getContext(): Promise<Context>;
|
|
2257
|
+
get Context(): Context | null;
|
|
2258
|
+
/**@obsolete use GameObject */
|
|
2259
|
+
private gameObject;
|
|
2260
|
+
private GameObject;
|
|
2261
|
+
private _context;
|
|
2262
|
+
private _overlay_ar;
|
|
2263
|
+
private _loadingProgress01;
|
|
2264
|
+
private _watcher?;
|
|
2265
|
+
private _loadingView?;
|
|
2266
|
+
constructor();
|
|
2267
|
+
connectedCallback(): Promise<void>;
|
|
2268
|
+
disconnectedCallback(): void;
|
|
2269
|
+
static get observedAttributes(): string[];
|
|
2270
|
+
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
|
|
2271
|
+
private registerEventFromAttribute;
|
|
2272
|
+
getAROverlayContainer(): HTMLElement;
|
|
2273
|
+
getVROverlayContainer(): HTMLElement | null;
|
|
2274
|
+
onEnterAR(session: THREE.XRSession, overlayContainer: HTMLElement): void;
|
|
2275
|
+
onExitAR(session: THREE.XRSession): void;
|
|
2276
|
+
onEnterVR(session: THREE.XRSession): void;
|
|
2277
|
+
onExitVR(session: THREE.XRSession): void;
|
|
2278
|
+
private onElementsChanged;
|
|
2279
|
+
private onSetupAR;
|
|
2280
|
+
private onSetupVR;
|
|
2281
|
+
private onSetupDesktop;
|
|
2282
|
+
private setupElementsForMode;
|
|
2283
|
+
private foreachHtmlElement;
|
|
2284
|
+
private onBeforeBeginLoading;
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
declare module "engine/api" {
|
|
2288
|
+
export { InstancingUtil } from "engine/engine_instancing";
|
|
2289
|
+
export * from "engine/engine_gameobject";
|
|
2290
|
+
export * from "engine/engine_components";
|
|
2291
|
+
}
|
|
2292
|
+
declare module "engine-components/AlignmentConstraint" {
|
|
2293
|
+
import { Behaviour } from "engine-components/Component";
|
|
2294
|
+
export class AlignmentConstraint extends Behaviour {
|
|
2295
|
+
private from;
|
|
2296
|
+
private to;
|
|
2297
|
+
private width;
|
|
2298
|
+
private centered;
|
|
2299
|
+
private _centerPos;
|
|
2300
|
+
awake(): void;
|
|
2060
2301
|
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
2302
|
}
|
|
2068
2303
|
}
|
|
2069
2304
|
declare module "engine-components/AnimationCurve" {
|
|
@@ -2708,80 +2943,6 @@ declare module "engine-components/avatar/Avatar_Brain_LookAt" {
|
|
|
2708
2943
|
private selectTarget;
|
|
2709
2944
|
}
|
|
2710
2945
|
}
|
|
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
2946
|
declare module "engine-components/LookAtConstraint" {
|
|
2786
2947
|
import { Behaviour } from "engine-components/Component";
|
|
2787
2948
|
import * as THREE from "three";
|
|
@@ -2947,40 +3108,6 @@ declare module "engine-components/RendererLightmap" {
|
|
|
2947
3108
|
private setLightmapDebugMaterial;
|
|
2948
3109
|
}
|
|
2949
3110
|
}
|
|
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
3111
|
declare module "engine-components/Renderer" {
|
|
2985
3112
|
import { Behaviour } from "engine-components/Component";
|
|
2986
3113
|
import * as THREE from "three";
|
|
@@ -3015,8 +3142,12 @@ declare module "engine-components/Renderer" {
|
|
|
3015
3142
|
renderOrder: number[] | undefined;
|
|
3016
3143
|
allowOcclusionWhenDynamic: boolean;
|
|
3017
3144
|
private _lightmaps?;
|
|
3018
|
-
get
|
|
3145
|
+
get sharedMesh(): Mesh | undefined;
|
|
3146
|
+
get sharedMaterial(): THREE.Material;
|
|
3147
|
+
set sharedMaterial(mat: THREE.Material);
|
|
3148
|
+
/**@deprecated please use sharedMaterial */
|
|
3019
3149
|
get material(): THREE.Material;
|
|
3150
|
+
/**@deprecated please use sharedMaterial */
|
|
3020
3151
|
set material(mat: THREE.Material);
|
|
3021
3152
|
private _sharedMaterials;
|
|
3022
3153
|
get sharedMaterials(): SharedMaterialArray;
|
|
@@ -3370,7 +3501,7 @@ declare module "engine-components/WebXR" {
|
|
|
3370
3501
|
getAROverlayContainer(): HTMLElement | null;
|
|
3371
3502
|
setReticleActive(active: boolean): void;
|
|
3372
3503
|
onBegin(session: THREE.XRSession): Promise<void>;
|
|
3373
|
-
onEnd(
|
|
3504
|
+
onEnd(session: THREE.XRSession): void;
|
|
3374
3505
|
onUpdate(session: THREE.XRSession, frame: THREE.XRFrame): void;
|
|
3375
3506
|
}
|
|
3376
3507
|
}
|
|
@@ -3395,6 +3526,7 @@ declare module "engine-components/DragControls" {
|
|
|
3395
3526
|
private static _active;
|
|
3396
3527
|
static get HasAnySelected(): boolean;
|
|
3397
3528
|
transformSelf: boolean;
|
|
3529
|
+
private orbit;
|
|
3398
3530
|
private selectStartEventListener;
|
|
3399
3531
|
private selectEndEventListener;
|
|
3400
3532
|
constructor();
|
|
@@ -3419,9 +3551,6 @@ declare module "engine-components/DragControls" {
|
|
|
3419
3551
|
private onDragEnd;
|
|
3420
3552
|
}
|
|
3421
3553
|
}
|
|
3422
|
-
declare module "engine/engine_networking_utils" {
|
|
3423
|
-
export function isLocalNetwork(hostname?: string): boolean;
|
|
3424
|
-
}
|
|
3425
3554
|
declare module "engine-components/Networking" {
|
|
3426
3555
|
import { INetworkingWebsocketUrlProvider } from "engine/engine_networking";
|
|
3427
3556
|
import { Behaviour } from "engine-components/Component";
|
|
@@ -3965,12 +4094,6 @@ declare module "engine-components/VideoPlayer" {
|
|
|
3965
4094
|
private updateAspectImpl;
|
|
3966
4095
|
}
|
|
3967
4096
|
}
|
|
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
4097
|
declare module "engine-components/ScreenCapture" {
|
|
3975
4098
|
import { Behaviour } from "engine-components/Component";
|
|
3976
4099
|
import { VideoPlayer } from "engine-components/VideoPlayer";
|
|
@@ -3985,6 +4108,11 @@ declare module "engine-components/ScreenCapture" {
|
|
|
3985
4108
|
Sending = 1,
|
|
3986
4109
|
Receiving = 2
|
|
3987
4110
|
}
|
|
4111
|
+
type ScreenCaptureOptions = {
|
|
4112
|
+
device?: ScreenCaptureDevice;
|
|
4113
|
+
deviceId?: string;
|
|
4114
|
+
constraints?: MediaTrackConstraints;
|
|
4115
|
+
};
|
|
3988
4116
|
export class ScreenCapture extends Behaviour implements IPointerClickHandler {
|
|
3989
4117
|
onPointerClick(): void;
|
|
3990
4118
|
videoPlayer?: VideoPlayer;
|
|
@@ -3999,7 +4127,7 @@ declare module "engine-components/ScreenCapture" {
|
|
|
3999
4127
|
private _currentMode;
|
|
4000
4128
|
awake(): void;
|
|
4001
4129
|
start(): void;
|
|
4002
|
-
share(): Promise<void>;
|
|
4130
|
+
share(opts?: ScreenCaptureOptions): Promise<void>;
|
|
4003
4131
|
close(): void;
|
|
4004
4132
|
private setVideo;
|
|
4005
4133
|
private onReceiveVideo;
|
|
@@ -5236,106 +5364,6 @@ declare module "needle-engine" {
|
|
|
5236
5364
|
export * from "engine-components/codegen/components";
|
|
5237
5365
|
export * from "engine-components/js-extensions/Object3D";
|
|
5238
5366
|
}
|
|
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
5367
|
declare module "engine/debug/error_overlay" {
|
|
5340
5368
|
export function makeErrorsVisibleForDevelopment(): void;
|
|
5341
5369
|
}
|
|
@@ -5355,6 +5383,7 @@ declare module "engine/engine" {
|
|
|
5355
5383
|
tryFindObjectByName(name: any, obj: any, recursive?: boolean): any;
|
|
5356
5384
|
tryFindObject(globalObjectIdentifier: any, obj: any, recursive?: boolean): any;
|
|
5357
5385
|
tryFindScript(globalObjectIdentifier: any, list?: null): import("engine/engine_types").IComponent | null;
|
|
5386
|
+
NeedleGltfLoader: typeof engine_scenetools.NeedleGltfLoader;
|
|
5358
5387
|
GltfLoadEventType: typeof engine_scenetools.GltfLoadEventType;
|
|
5359
5388
|
GltfLoadEvent: typeof engine_scenetools.GltfLoadEvent;
|
|
5360
5389
|
registerComponent(script: import("engine/engine_types").IComponent, context?: engine_setup.Context | undefined): void;
|