@needle-tools/engine 2.35.4-pre → 2.35.5-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 +53 -34
- package/dist/needle-engine.js +394 -343
- package/dist/needle-engine.js.map +4 -4
- package/dist/needle-engine.min.js +96 -45
- package/dist/needle-engine.min.js.map +4 -4
- package/lib/engine/api.d.ts +3 -0
- package/lib/engine/api.js +3 -0
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/debug/debug.d.ts +3 -0
- package/lib/engine/debug/debug.js +8 -0
- package/lib/engine/debug/debug.js.map +1 -0
- package/lib/engine/debug/debug_overlay.d.ts +7 -0
- package/lib/engine/debug/debug_overlay.js +202 -0
- package/lib/engine/debug/debug_overlay.js.map +1 -0
- package/lib/engine/engine.js +1 -1
- package/lib/engine/engine.js.map +1 -1
- package/lib/engine/engine_serialization_core.js +35 -0
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_types.d.ts +5 -1
- package/lib/engine/engine_types.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_render_objects.d.ts +2 -2
- package/lib/engine/extensions/NEEDLE_render_objects.js +2 -2
- package/lib/engine/extensions/NEEDLE_render_objects.js.map +1 -1
- package/lib/engine-components/AudioSource.d.ts +1 -1
- package/lib/engine-components/AudioSource.js +2 -2
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/Renderer.d.ts +3 -2
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/WebXRController.js +6 -2
- package/lib/engine-components/WebXRController.js.map +1 -1
- package/lib/engine-components/js-extensions/ExtensionUtils.js +1 -1
- package/lib/engine-components/js-extensions/ExtensionUtils.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/api.ts +3 -0
- package/src/engine/debug/debug.ts +9 -0
- package/src/engine/debug/debug_overlay.ts +217 -0
- package/src/engine/engine.ts +1 -1
- package/src/engine/engine_serialization_core.ts +34 -0
- package/src/engine/engine_types.ts +6 -1
- package/src/engine/extensions/NEEDLE_render_objects.ts +4 -4
- package/src/engine-components/AudioSource.ts +3 -3
- package/src/engine-components/Renderer.ts +737 -734
- package/src/engine-components/WebXRController.ts +6 -2
- package/src/engine-components/js-extensions/ExtensionUtils.ts +1 -1
- package/lib/engine/debug/error_overlay.d.ts +0 -1
- package/lib/engine/debug/error_overlay.js +0 -114
- package/lib/engine/debug/error_overlay.js.map +0 -1
- package/src/engine/debug/error_overlay.ts +0 -126
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this package will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.35.5-pre] - 2022-10-24
|
|
8
|
+
- Change: AudioSource exposes ``clip`` field
|
|
9
|
+
- Change: improve error and messaging overlay
|
|
10
|
+
- Change: detect when serialized Object3D and AssetReference are missing ``@serializable`` attribute and show message in overlay
|
|
11
|
+
- Change: add WebXR hands path to controllers
|
|
12
|
+
- Fix: WebXR controllers now use interactable object when grabbing (instead of hit object previously) which fixes interaction with nested hierarchies in XR and DragControls
|
|
13
|
+
|
|
7
14
|
## [2.35.4-pre] - 2022-10-23
|
|
8
15
|
- Change: Renderer ``material`` is now ``sharedMaterial`` to make it more clear for Unity devs that the material is not being cloned when accessed
|
|
9
16
|
- Fix: When not specifying any explicit networking backend for glitch deployment it now falls back to the current glitch instance for networking
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -100,8 +100,12 @@ declare module "engine/engine_types" {
|
|
|
100
100
|
intensity: number;
|
|
101
101
|
color: Color;
|
|
102
102
|
}
|
|
103
|
+
export interface ISharedMaterials {
|
|
104
|
+
[num: number]: Material;
|
|
105
|
+
}
|
|
103
106
|
export interface IRenderer extends IComponent {
|
|
104
|
-
|
|
107
|
+
sharedMaterial: Material;
|
|
108
|
+
get sharedMaterials(): ISharedMaterials;
|
|
105
109
|
}
|
|
106
110
|
export interface ICollider extends IComponent {
|
|
107
111
|
get isCollider(): any;
|
|
@@ -210,6 +214,45 @@ declare module "engine/extensions/NEEDLE_persistent_assets" {
|
|
|
210
214
|
resolve(parser: GLTFParser, path: string): Promise<void> | null | any;
|
|
211
215
|
}
|
|
212
216
|
}
|
|
217
|
+
declare module "engine/engine_networking_utils" {
|
|
218
|
+
export function isLocalNetwork(hostname?: string): boolean;
|
|
219
|
+
export function isHostedOnGlitch(): boolean;
|
|
220
|
+
}
|
|
221
|
+
declare module "engine/engine_element_overlay" {
|
|
222
|
+
import { Context } from "engine/engine_setup";
|
|
223
|
+
export const arContainerClassName = "ar";
|
|
224
|
+
export const quitARClassName = "quit-ar";
|
|
225
|
+
export class AROverlayHandler {
|
|
226
|
+
get ARContainer(): HTMLElement | null;
|
|
227
|
+
constructor();
|
|
228
|
+
private arContainer;
|
|
229
|
+
closeARCallback: any;
|
|
230
|
+
currentSession: THREE.XRSession | null;
|
|
231
|
+
registeredCloseEventElements: Element[];
|
|
232
|
+
private _createdAROnlyElements;
|
|
233
|
+
private _reparentedObjects;
|
|
234
|
+
requestEndAR(): void;
|
|
235
|
+
onBegin(context: Context, overlayContainer: HTMLElement, session: THREE.XRSession): void;
|
|
236
|
+
onEnd(_context: Context): void;
|
|
237
|
+
findOrCreateARContainer(element: HTMLElement): HTMLElement;
|
|
238
|
+
private onRequestedEndAR;
|
|
239
|
+
private createFallbackCloseARButton;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
declare module "engine/debug/debug_overlay" {
|
|
243
|
+
export enum LogType {
|
|
244
|
+
Log = 0,
|
|
245
|
+
Warn = 1,
|
|
246
|
+
Error = 2
|
|
247
|
+
}
|
|
248
|
+
export function makeErrorsVisibleForDevelopment(): void;
|
|
249
|
+
export function addLog(type: LogType, message: string | any[], _file?: string | null, _line?: number | null): void;
|
|
250
|
+
}
|
|
251
|
+
declare module "engine/debug/debug" {
|
|
252
|
+
import { LogType } from "engine/debug/debug_overlay";
|
|
253
|
+
export { LogType };
|
|
254
|
+
export function showBalloonMessage(text: string, logType?: LogType): void;
|
|
255
|
+
}
|
|
213
256
|
declare module "engine/engine_serialization_core" {
|
|
214
257
|
import { GLTF } from "three/examples/jsm/loaders/GLTFLoader";
|
|
215
258
|
import { Object3D } from "three";
|
|
@@ -820,10 +863,6 @@ declare module "engine/engine_networking_peer" {
|
|
|
820
863
|
private trySetupClient;
|
|
821
864
|
}
|
|
822
865
|
}
|
|
823
|
-
declare module "engine/engine_networking_utils" {
|
|
824
|
-
export function isLocalNetwork(hostname?: string): boolean;
|
|
825
|
-
export function isHostedOnGlitch(): boolean;
|
|
826
|
-
}
|
|
827
866
|
declare module "engine/engine_networking" {
|
|
828
867
|
import { Context } from "engine/engine_setup";
|
|
829
868
|
import * as flatbuffers from 'flatbuffers';
|
|
@@ -1704,27 +1743,6 @@ declare module "engine/engine_setup" {
|
|
|
1704
1743
|
private executeCoroutines;
|
|
1705
1744
|
}
|
|
1706
1745
|
}
|
|
1707
|
-
declare module "engine/engine_element_overlay" {
|
|
1708
|
-
import { Context } from "engine/engine_setup";
|
|
1709
|
-
export const arContainerClassName = "ar";
|
|
1710
|
-
export const quitARClassName = "quit-ar";
|
|
1711
|
-
export class AROverlayHandler {
|
|
1712
|
-
get ARContainer(): HTMLElement | null;
|
|
1713
|
-
constructor();
|
|
1714
|
-
private arContainer;
|
|
1715
|
-
closeARCallback: any;
|
|
1716
|
-
currentSession: THREE.XRSession | null;
|
|
1717
|
-
registeredCloseEventElements: Element[];
|
|
1718
|
-
private _createdAROnlyElements;
|
|
1719
|
-
private _reparentedObjects;
|
|
1720
|
-
requestEndAR(): void;
|
|
1721
|
-
onBegin(context: Context, overlayContainer: HTMLElement, session: THREE.XRSession): void;
|
|
1722
|
-
onEnd(_context: Context): void;
|
|
1723
|
-
findOrCreateARContainer(element: HTMLElement): HTMLElement;
|
|
1724
|
-
private onRequestedEndAR;
|
|
1725
|
-
private createFallbackCloseARButton;
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
1746
|
declare module "engine/engine_element_loading" {
|
|
1729
1747
|
import { LoadingProgressArgs } from "engine/engine_setup";
|
|
1730
1748
|
export class LoadingElementOptions {
|
|
@@ -2081,10 +2099,10 @@ declare module "engine/extensions/NEEDLE_gameobject_data" {
|
|
|
2081
2099
|
declare module "engine/extensions/NEEDLE_render_objects" {
|
|
2082
2100
|
import { SourceIdentifier } from "engine/engine_types";
|
|
2083
2101
|
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2084
|
-
import { IRenderer
|
|
2102
|
+
import { IRenderer } from "engine/engine_types";
|
|
2085
2103
|
export class NEEDLE_render_objects implements GLTFLoaderPlugin {
|
|
2086
2104
|
private static stencils;
|
|
2087
|
-
static applyStencil(obj?:
|
|
2105
|
+
static applyStencil(obj?: IRenderer | null): void;
|
|
2088
2106
|
private parser;
|
|
2089
2107
|
private source;
|
|
2090
2108
|
constructor(parser: GLTFParser, source: SourceIdentifier);
|
|
@@ -2288,6 +2306,9 @@ declare module "engine/api" {
|
|
|
2288
2306
|
export { InstancingUtil } from "engine/engine_instancing";
|
|
2289
2307
|
export * from "engine/engine_gameobject";
|
|
2290
2308
|
export * from "engine/engine_components";
|
|
2309
|
+
export { AssetReference } from "engine/engine_addressables";
|
|
2310
|
+
export { FrameEvent } from "engine/engine_setup";
|
|
2311
|
+
export * from "engine/debug/debug";
|
|
2291
2312
|
}
|
|
2292
2313
|
declare module "engine-components/AlignmentConstraint" {
|
|
2293
2314
|
import { Behaviour } from "engine-components/Component";
|
|
@@ -2332,7 +2353,7 @@ declare module "engine-components/AudioSource" {
|
|
|
2332
2353
|
static registerWaitForAllowAudio(cb: Function): void;
|
|
2333
2354
|
private static _userInteractionRegistered;
|
|
2334
2355
|
private static _beginWaitForUserInteraction;
|
|
2335
|
-
|
|
2356
|
+
clip: string;
|
|
2336
2357
|
playOnAwake: boolean;
|
|
2337
2358
|
get loop(): boolean;
|
|
2338
2359
|
set loop(val: boolean);
|
|
@@ -3112,7 +3133,7 @@ declare module "engine-components/Renderer" {
|
|
|
3112
3133
|
import { Behaviour } from "engine-components/Component";
|
|
3113
3134
|
import * as THREE from "three";
|
|
3114
3135
|
import { Mesh, Texture } from "three";
|
|
3115
|
-
import { IRenderer } from "engine/engine_types";
|
|
3136
|
+
import { IRenderer, ISharedMaterials } from "engine/engine_types";
|
|
3116
3137
|
export { InstancingUtil } from "engine/engine_instancing";
|
|
3117
3138
|
export class FieldWithDefault {
|
|
3118
3139
|
path: string | null;
|
|
@@ -3124,7 +3145,8 @@ declare module "engine-components/Renderer" {
|
|
|
3124
3145
|
Back = 1,
|
|
3125
3146
|
Front = 2
|
|
3126
3147
|
}
|
|
3127
|
-
class SharedMaterialArray {
|
|
3148
|
+
class SharedMaterialArray implements ISharedMaterials {
|
|
3149
|
+
[num: number]: THREE.Material;
|
|
3128
3150
|
private _renderer;
|
|
3129
3151
|
private _targets;
|
|
3130
3152
|
is(renderer: Renderer): boolean;
|
|
@@ -5364,9 +5386,6 @@ declare module "needle-engine" {
|
|
|
5364
5386
|
export * from "engine-components/codegen/components";
|
|
5365
5387
|
export * from "engine-components/js-extensions/Object3D";
|
|
5366
5388
|
}
|
|
5367
|
-
declare module "engine/debug/error_overlay" {
|
|
5368
|
-
export function makeErrorsVisibleForDevelopment(): void;
|
|
5369
|
-
}
|
|
5370
5389
|
declare module "engine/engine" {
|
|
5371
5390
|
import * as engine_setup from "engine/engine_setup";
|
|
5372
5391
|
import * as engine_scenetools from "engine/engine_scenetools";
|