@needle-tools/engine 2.33.0-pre → 2.34.0-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 +9 -0
- package/dist/needle-engine.d.ts +177 -153
- package/dist/needle-engine.js +390 -340
- package/dist/needle-engine.js.map +4 -4
- package/dist/needle-engine.min.js +68 -18
- package/dist/needle-engine.min.js.map +4 -4
- package/lib/engine/engine_create_objects.d.ts +11 -0
- package/lib/engine/engine_create_objects.js +20 -0
- package/lib/engine/engine_create_objects.js.map +1 -0
- package/lib/engine/engine_instancing.d.ts +5 -0
- package/lib/engine/engine_instancing.js +22 -0
- package/lib/engine/engine_instancing.js.map +1 -0
- package/lib/engine/engine_physics.d.ts +2 -0
- package/lib/engine/engine_physics.js +7 -1
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine-components/Animation.js +1 -1
- package/lib/engine-components/Animation.js.map +1 -1
- package/lib/engine-components/Collider.d.ts +1 -0
- package/lib/engine-components/Collider.js +4 -0
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/Component.js +2 -1
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/DragControls.js +1 -1
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/Renderer.d.ts +0 -3
- package/lib/engine-components/Renderer.js +1 -20
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/ScreenCapture.d.ts +0 -10
- package/lib/engine-components/ScreenCapture.js +8 -75
- package/lib/engine-components/ScreenCapture.js.map +1 -1
- package/lib/engine-components/SyncedCamera.js +1 -1
- package/lib/engine-components/SyncedCamera.js.map +1 -1
- package/lib/engine-components/SyncedTransform.js +1 -1
- package/lib/engine-components/SyncedTransform.js.map +1 -1
- package/lib/engine-components/VideoPlayer.d.ts +14 -3
- package/lib/engine-components/VideoPlayer.js +390 -47
- package/lib/engine-components/VideoPlayer.js.map +1 -1
- package/lib/engine-components/WebARSessionRoot.js +1 -1
- package/lib/engine-components/WebARSessionRoot.js.map +1 -1
- package/lib/engine-components/WebXRAvatar.js +1 -1
- package/lib/engine-components/WebXRAvatar.js.map +1 -1
- package/lib/engine-components/WebXRController.d.ts +1 -0
- package/lib/engine-components/WebXRController.js +12 -1
- package/lib/engine-components/WebXRController.js.map +1 -1
- package/lib/engine-components/codegen/components.d.ts +0 -1
- package/lib/engine-components/codegen/components.js +0 -1
- package/lib/engine-components/codegen/components.js.map +1 -1
- package/lib/engine-components/ui/EventSystem.d.ts +3 -0
- package/lib/engine-components/ui/EventSystem.js +17 -8
- package/lib/engine-components/ui/EventSystem.js.map +1 -1
- package/package.json +2 -2
- package/src/engine/codegen/register_types.js +2 -4
- package/src/engine/engine_create_objects.ts +27 -0
- package/src/engine/engine_instancing.ts +25 -0
- package/src/engine/engine_physics.ts +9 -1
- package/src/engine-components/Animation.ts +1 -1
- package/src/engine-components/Collider.ts +5 -0
- package/src/engine-components/Component.ts +2 -1
- package/src/engine-components/DragControls.ts +1 -1
- package/src/engine-components/Renderer.ts +2 -20
- package/src/engine-components/ScreenCapture.ts +10 -76
- package/src/engine-components/SyncedCamera.ts +1 -1
- package/src/engine-components/SyncedTransform.ts +1 -1
- package/src/engine-components/VideoPlayer.ts +401 -48
- package/src/engine-components/WebARSessionRoot.ts +1 -1
- package/src/engine-components/WebXRAvatar.ts +1 -1
- package/src/engine-components/WebXRController.ts +11 -1
- package/src/engine-components/codegen/components.ts +0 -1
- package/src/engine-components/ui/EventSystem.ts +19 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ 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.34.0-pre] - 2022-10-17
|
|
8
|
+
- Add: start adding support for 2D video overlay mode
|
|
9
|
+
- Change: Install threejs from @needle-tools/npm - this removes the requirement to have git installed and should fix a case where pulling the package from github would fail
|
|
10
|
+
- Change: Move Screensharing aspect mode settings into VideoPlayer component
|
|
11
|
+
- Change: Move ``InstancingUtils`` into ``engine/engine_instancing.ts``
|
|
12
|
+
- Change: BoxCollider now checks if ``attachedRigidBody`` is assigned at start
|
|
13
|
+
- Change: Collision now exposes internal cannon data via ``__internalCollision`` property
|
|
14
|
+
- Fix: EventSystem now properly unsubscribes WebXRController events
|
|
15
|
+
|
|
7
16
|
## [2.33.0-pre] - 2022-10-17
|
|
8
17
|
- Add: ScreenCapture has mode for capturing webgl canvas (unfortunately it doesnt seem to work well in Chrome or Firefox yet)
|
|
9
18
|
- Change: move threejs prototype extensions into own file and make available to vanilla js builds
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -414,145 +414,6 @@ declare module "engine-components/Rigidbody" {
|
|
|
414
414
|
private updateVelocity;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
declare module "engine-components/RendererLightmap" {
|
|
418
|
-
import { GameObject } from "engine-components/Component";
|
|
419
|
-
import * as THREE from "three";
|
|
420
|
-
import { Texture } from "three";
|
|
421
|
-
import { Context } from "engine/engine_setup";
|
|
422
|
-
export class RendererLightmap {
|
|
423
|
-
get lightmap(): Texture | null;
|
|
424
|
-
set lightmap(tex: Texture | null);
|
|
425
|
-
lightmapIndex: number;
|
|
426
|
-
lightmapScaleOffset: THREE.Vector4;
|
|
427
|
-
private context;
|
|
428
|
-
private gameObject;
|
|
429
|
-
private lightmapTexture;
|
|
430
|
-
private lightmapScaleOffsetUniform;
|
|
431
|
-
private lightmapUniform;
|
|
432
|
-
private beforeRenderCallback?;
|
|
433
|
-
constructor(gameObject: GameObject, context: Context);
|
|
434
|
-
init(lightmapIndex: number, lightmapScaleOffset: THREE.Vector4, lightmapTexture: THREE.Texture, debug?: boolean): void;
|
|
435
|
-
bindOnBeforeRender(): void;
|
|
436
|
-
private onBeforeRenderThreeComplete;
|
|
437
|
-
private setupLightmap;
|
|
438
|
-
onBeforeRenderThree(material: THREE.Material): void;
|
|
439
|
-
private setLightmapDebugMaterial;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
declare module "engine/extensions/NEEDLE_render_objects" {
|
|
443
|
-
import { SourceIdentifier } from "engine/engine_gltf";
|
|
444
|
-
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
445
|
-
import { Renderer } from "engine-components/Renderer";
|
|
446
|
-
export class NEEDLE_render_objects implements GLTFLoaderPlugin {
|
|
447
|
-
private static stencils;
|
|
448
|
-
static applyStencil(obj?: Renderer | null): void;
|
|
449
|
-
private parser;
|
|
450
|
-
private source;
|
|
451
|
-
constructor(parser: GLTFParser, source: SourceIdentifier);
|
|
452
|
-
afterRoot(_result: GLTF): Promise<void> | null;
|
|
453
|
-
}
|
|
454
|
-
export const EXTENSION_NAME = "NEEDLE_render_objects";
|
|
455
|
-
}
|
|
456
|
-
declare module "engine/engine_loaders" {
|
|
457
|
-
import { Context } from "engine/engine_setup";
|
|
458
|
-
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
459
|
-
export function setDracoDecoderPath(path: string | undefined): void;
|
|
460
|
-
export function setDracoDecoderType(type: string | undefined): void;
|
|
461
|
-
export function setKtx2TranscoderPath(path: string): void;
|
|
462
|
-
export function addDracoAndKTX2Loaders(loader: GLTFLoader, context: Context): void;
|
|
463
|
-
}
|
|
464
|
-
declare module "engine/extensions/NEEDLE_deferred_texture" {
|
|
465
|
-
import { Material } from "three";
|
|
466
|
-
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
467
|
-
import { SourceIdentifier } from "engine/engine_gltf";
|
|
468
|
-
import { Context } from "engine/engine_setup";
|
|
469
|
-
export const EXTENSION_NAME = "NEEDLE_deferred_texture";
|
|
470
|
-
export class NEEDLE_deferred_texture implements GLTFLoaderPlugin {
|
|
471
|
-
static assignTextureLOD(context: Context, source: SourceIdentifier | undefined, material: Material, level?: number): void;
|
|
472
|
-
get name(): string;
|
|
473
|
-
private parser;
|
|
474
|
-
private sourceId;
|
|
475
|
-
private context;
|
|
476
|
-
constructor(parser: GLTFParser, sourceId: SourceIdentifier, context: Context);
|
|
477
|
-
private _loading;
|
|
478
|
-
afterRoot(gltf: GLTF): null;
|
|
479
|
-
private static cache;
|
|
480
|
-
private static resolved;
|
|
481
|
-
private static getOrLoadTexture;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
declare module "engine-components/Renderer" {
|
|
485
|
-
import { Behaviour } from "engine-components/Component";
|
|
486
|
-
import * as THREE from "three";
|
|
487
|
-
import { Texture } from "three";
|
|
488
|
-
export class FieldWithDefault {
|
|
489
|
-
path: string | null;
|
|
490
|
-
asset: object | null;
|
|
491
|
-
default: any;
|
|
492
|
-
}
|
|
493
|
-
export enum RenderState {
|
|
494
|
-
Both = 0,
|
|
495
|
-
Back = 1,
|
|
496
|
-
Front = 2
|
|
497
|
-
}
|
|
498
|
-
class SharedMaterialArray {
|
|
499
|
-
private _renderer;
|
|
500
|
-
private _targets;
|
|
501
|
-
is(renderer: Renderer): boolean;
|
|
502
|
-
constructor(renderer: Renderer);
|
|
503
|
-
get length(): number;
|
|
504
|
-
private setMaterial;
|
|
505
|
-
private getMaterial;
|
|
506
|
-
}
|
|
507
|
-
export class Renderer extends Behaviour {
|
|
508
|
-
receiveShadows: boolean;
|
|
509
|
-
shadowCastingMode: ShadowCastingMode;
|
|
510
|
-
lightmapIndex: number;
|
|
511
|
-
lightmapScaleOffset: THREE.Vector4;
|
|
512
|
-
enableInstancing: boolean[] | undefined;
|
|
513
|
-
renderOrder: number[] | undefined;
|
|
514
|
-
allowOcclusionWhenDynamic: boolean;
|
|
515
|
-
private _lightmaps?;
|
|
516
|
-
get material(): THREE.Material;
|
|
517
|
-
set material(mat: THREE.Material);
|
|
518
|
-
private _sharedMaterials;
|
|
519
|
-
get sharedMaterials(): SharedMaterialArray;
|
|
520
|
-
static get shouldSuppressInstancing(): string | boolean;
|
|
521
|
-
private _lightmapTextureOverride;
|
|
522
|
-
get lightmap(): Texture | null;
|
|
523
|
-
set lightmap(tex: Texture | null | undefined);
|
|
524
|
-
get hasLightmap(): boolean;
|
|
525
|
-
awake(): void;
|
|
526
|
-
private _isInstancingEnabled;
|
|
527
|
-
private handles;
|
|
528
|
-
private prevLayers;
|
|
529
|
-
private clearInstancingState;
|
|
530
|
-
setInstancingEnabled(enabled: boolean): boolean;
|
|
531
|
-
start(): void;
|
|
532
|
-
onEnable(): void;
|
|
533
|
-
onDisable(): void;
|
|
534
|
-
onDestroy(): void;
|
|
535
|
-
applyStencil(): void;
|
|
536
|
-
onBeforeRenderThree(_renderer: any, _scene: any, _camera: any, _geometry: any, material: any, _group: any): void;
|
|
537
|
-
onBeforeRender(): void;
|
|
538
|
-
onAfterRender(): void;
|
|
539
|
-
private applySettings;
|
|
540
|
-
}
|
|
541
|
-
export class MeshRenderer extends Renderer {
|
|
542
|
-
}
|
|
543
|
-
export class SkinnedMeshRenderer extends MeshRenderer {
|
|
544
|
-
awake(): void;
|
|
545
|
-
}
|
|
546
|
-
export enum ShadowCastingMode {
|
|
547
|
-
Off = 0,
|
|
548
|
-
On = 1,
|
|
549
|
-
TwoSided = 2,
|
|
550
|
-
ShadowsOnly = 3
|
|
551
|
-
}
|
|
552
|
-
export class InstancingUtil {
|
|
553
|
-
static markDirty(go: THREE.Object3D | null, recursive?: boolean): void;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
417
|
declare module "engine-components/Collider" {
|
|
557
418
|
import { Behaviour } from "engine-components/Component";
|
|
558
419
|
import { Rigidbody } from "engine-components/Rigidbody";
|
|
@@ -562,6 +423,7 @@ declare module "engine-components/Collider" {
|
|
|
562
423
|
isTrigger: boolean;
|
|
563
424
|
protected _shape: Shape | null;
|
|
564
425
|
awake(): void;
|
|
426
|
+
start(): void;
|
|
565
427
|
onEnable(): void;
|
|
566
428
|
onDisable(): void;
|
|
567
429
|
}
|
|
@@ -576,6 +438,13 @@ declare module "engine-components/Collider" {
|
|
|
576
438
|
onEnable(): void;
|
|
577
439
|
}
|
|
578
440
|
}
|
|
441
|
+
declare module "engine/engine_instancing" {
|
|
442
|
+
export const NEED_UPDATE_INSTANCE_KEY: unique symbol;
|
|
443
|
+
export class InstancingUtil {
|
|
444
|
+
static isUsingInstancing(instance: THREE.Object3D): boolean;
|
|
445
|
+
static markDirty(go: THREE.Object3D | null, recursive?: boolean): void;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
579
448
|
declare module "engine/engine_physics" {
|
|
580
449
|
import * as CANNON from 'cannon-es';
|
|
581
450
|
import * as THREE from 'three';
|
|
@@ -669,6 +538,8 @@ declare module "engine/engine_physics" {
|
|
|
669
538
|
private onEndContact;
|
|
670
539
|
}
|
|
671
540
|
export class Collision {
|
|
541
|
+
get __internalCollision(): CannonCollision;
|
|
542
|
+
get __internalInvertedSourceReceiver(): boolean;
|
|
672
543
|
private readonly invert;
|
|
673
544
|
private readonly collision;
|
|
674
545
|
private readonly targetBody;
|
|
@@ -1663,6 +1534,14 @@ declare module "engine/engine_gltf_builtin_components" {
|
|
|
1663
1534
|
export function writeBuiltinComponentData(comp: Component, context: SerializationContext): object | null;
|
|
1664
1535
|
export function createBuiltinComponents(context: Context, gltfId: SourceIdentifier, gltf: any, seed?: number | null | UIDProvider, extension?: NEEDLE_components): Promise<void>;
|
|
1665
1536
|
}
|
|
1537
|
+
declare module "engine/engine_loaders" {
|
|
1538
|
+
import { Context } from "engine/engine_setup";
|
|
1539
|
+
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
1540
|
+
export function setDracoDecoderPath(path: string | undefined): void;
|
|
1541
|
+
export function setDracoDecoderType(type: string | undefined): void;
|
|
1542
|
+
export function setKtx2TranscoderPath(path: string): void;
|
|
1543
|
+
export function addDracoAndKTX2Loaders(loader: GLTFLoader, context: Context): void;
|
|
1544
|
+
}
|
|
1666
1545
|
declare module "engine/shaders/shaderData" {
|
|
1667
1546
|
export class ShaderData {
|
|
1668
1547
|
programs: Array<ShaderProgram>;
|
|
@@ -2325,6 +2204,7 @@ declare module "engine-components/WebXRController" {
|
|
|
2325
2204
|
private static CreateRaycastHitPoint;
|
|
2326
2205
|
static Create(owner: WebXR, index: number, addTo: GameObject, type: ControllerType): WebXRController;
|
|
2327
2206
|
static addEventListener(evt: ControllerEvents, callback: (controller: WebXRController, args: any) => void): void;
|
|
2207
|
+
static removeEventListener(evt: ControllerEvents, callback: (controller: WebXRController, args: any) => void): void;
|
|
2328
2208
|
private static eventSubs;
|
|
2329
2209
|
webXR: WebXR;
|
|
2330
2210
|
index: number;
|
|
@@ -2829,6 +2709,134 @@ declare module "engine/extensions/NEEDLE_lighting_settings" {
|
|
|
2829
2709
|
onDisable(): void;
|
|
2830
2710
|
}
|
|
2831
2711
|
}
|
|
2712
|
+
declare module "engine-components/RendererLightmap" {
|
|
2713
|
+
import { GameObject } from "engine-components/Component";
|
|
2714
|
+
import * as THREE from "three";
|
|
2715
|
+
import { Texture } from "three";
|
|
2716
|
+
import { Context } from "engine/engine_setup";
|
|
2717
|
+
export class RendererLightmap {
|
|
2718
|
+
get lightmap(): Texture | null;
|
|
2719
|
+
set lightmap(tex: Texture | null);
|
|
2720
|
+
lightmapIndex: number;
|
|
2721
|
+
lightmapScaleOffset: THREE.Vector4;
|
|
2722
|
+
private context;
|
|
2723
|
+
private gameObject;
|
|
2724
|
+
private lightmapTexture;
|
|
2725
|
+
private lightmapScaleOffsetUniform;
|
|
2726
|
+
private lightmapUniform;
|
|
2727
|
+
private beforeRenderCallback?;
|
|
2728
|
+
constructor(gameObject: GameObject, context: Context);
|
|
2729
|
+
init(lightmapIndex: number, lightmapScaleOffset: THREE.Vector4, lightmapTexture: THREE.Texture, debug?: boolean): void;
|
|
2730
|
+
bindOnBeforeRender(): void;
|
|
2731
|
+
private onBeforeRenderThreeComplete;
|
|
2732
|
+
private setupLightmap;
|
|
2733
|
+
onBeforeRenderThree(material: THREE.Material): void;
|
|
2734
|
+
private setLightmapDebugMaterial;
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
declare module "engine/extensions/NEEDLE_deferred_texture" {
|
|
2738
|
+
import { Material } from "three";
|
|
2739
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2740
|
+
import { SourceIdentifier } from "engine/engine_gltf";
|
|
2741
|
+
import { Context } from "engine/engine_setup";
|
|
2742
|
+
export const EXTENSION_NAME = "NEEDLE_deferred_texture";
|
|
2743
|
+
export class NEEDLE_deferred_texture implements GLTFLoaderPlugin {
|
|
2744
|
+
static assignTextureLOD(context: Context, source: SourceIdentifier | undefined, material: Material, level?: number): void;
|
|
2745
|
+
get name(): string;
|
|
2746
|
+
private parser;
|
|
2747
|
+
private sourceId;
|
|
2748
|
+
private context;
|
|
2749
|
+
constructor(parser: GLTFParser, sourceId: SourceIdentifier, context: Context);
|
|
2750
|
+
private _loading;
|
|
2751
|
+
afterRoot(gltf: GLTF): null;
|
|
2752
|
+
private static cache;
|
|
2753
|
+
private static resolved;
|
|
2754
|
+
private static getOrLoadTexture;
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
declare module "engine-components/Renderer" {
|
|
2758
|
+
import { Behaviour } from "engine-components/Component";
|
|
2759
|
+
import * as THREE from "three";
|
|
2760
|
+
import { Texture } from "three";
|
|
2761
|
+
export class FieldWithDefault {
|
|
2762
|
+
path: string | null;
|
|
2763
|
+
asset: object | null;
|
|
2764
|
+
default: any;
|
|
2765
|
+
}
|
|
2766
|
+
export enum RenderState {
|
|
2767
|
+
Both = 0,
|
|
2768
|
+
Back = 1,
|
|
2769
|
+
Front = 2
|
|
2770
|
+
}
|
|
2771
|
+
class SharedMaterialArray {
|
|
2772
|
+
private _renderer;
|
|
2773
|
+
private _targets;
|
|
2774
|
+
is(renderer: Renderer): boolean;
|
|
2775
|
+
constructor(renderer: Renderer);
|
|
2776
|
+
get length(): number;
|
|
2777
|
+
private setMaterial;
|
|
2778
|
+
private getMaterial;
|
|
2779
|
+
}
|
|
2780
|
+
export class Renderer extends Behaviour {
|
|
2781
|
+
receiveShadows: boolean;
|
|
2782
|
+
shadowCastingMode: ShadowCastingMode;
|
|
2783
|
+
lightmapIndex: number;
|
|
2784
|
+
lightmapScaleOffset: THREE.Vector4;
|
|
2785
|
+
enableInstancing: boolean[] | undefined;
|
|
2786
|
+
renderOrder: number[] | undefined;
|
|
2787
|
+
allowOcclusionWhenDynamic: boolean;
|
|
2788
|
+
private _lightmaps?;
|
|
2789
|
+
get material(): THREE.Material;
|
|
2790
|
+
set material(mat: THREE.Material);
|
|
2791
|
+
private _sharedMaterials;
|
|
2792
|
+
get sharedMaterials(): SharedMaterialArray;
|
|
2793
|
+
static get shouldSuppressInstancing(): string | boolean;
|
|
2794
|
+
private _lightmapTextureOverride;
|
|
2795
|
+
get lightmap(): Texture | null;
|
|
2796
|
+
set lightmap(tex: Texture | null | undefined);
|
|
2797
|
+
get hasLightmap(): boolean;
|
|
2798
|
+
awake(): void;
|
|
2799
|
+
private _isInstancingEnabled;
|
|
2800
|
+
private handles;
|
|
2801
|
+
private prevLayers;
|
|
2802
|
+
private clearInstancingState;
|
|
2803
|
+
setInstancingEnabled(enabled: boolean): boolean;
|
|
2804
|
+
start(): void;
|
|
2805
|
+
onEnable(): void;
|
|
2806
|
+
onDisable(): void;
|
|
2807
|
+
onDestroy(): void;
|
|
2808
|
+
applyStencil(): void;
|
|
2809
|
+
onBeforeRenderThree(_renderer: any, _scene: any, _camera: any, _geometry: any, material: any, _group: any): void;
|
|
2810
|
+
onBeforeRender(): void;
|
|
2811
|
+
onAfterRender(): void;
|
|
2812
|
+
private applySettings;
|
|
2813
|
+
}
|
|
2814
|
+
export class MeshRenderer extends Renderer {
|
|
2815
|
+
}
|
|
2816
|
+
export class SkinnedMeshRenderer extends MeshRenderer {
|
|
2817
|
+
awake(): void;
|
|
2818
|
+
}
|
|
2819
|
+
export enum ShadowCastingMode {
|
|
2820
|
+
Off = 0,
|
|
2821
|
+
On = 1,
|
|
2822
|
+
TwoSided = 2,
|
|
2823
|
+
ShadowsOnly = 3
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
declare module "engine/extensions/NEEDLE_render_objects" {
|
|
2827
|
+
import { SourceIdentifier } from "engine/engine_gltf";
|
|
2828
|
+
import { GLTF, GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2829
|
+
import { Renderer } from "engine-components/Renderer";
|
|
2830
|
+
export class NEEDLE_render_objects implements GLTFLoaderPlugin {
|
|
2831
|
+
private static stencils;
|
|
2832
|
+
static applyStencil(obj?: Renderer | null): void;
|
|
2833
|
+
private parser;
|
|
2834
|
+
private source;
|
|
2835
|
+
constructor(parser: GLTFParser, source: SourceIdentifier);
|
|
2836
|
+
afterRoot(_result: GLTF): Promise<void> | null;
|
|
2837
|
+
}
|
|
2838
|
+
export const EXTENSION_NAME = "NEEDLE_render_objects";
|
|
2839
|
+
}
|
|
2832
2840
|
declare module "engine/extensions/extensions" {
|
|
2833
2841
|
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
|
2834
2842
|
import { NEEDLE_components } from "engine/extensions/NEEDLE_components";
|
|
@@ -2939,6 +2947,9 @@ declare module "engine-components/ui/EventSystem" {
|
|
|
2939
2947
|
start(): void;
|
|
2940
2948
|
register(rc: Raycaster): void;
|
|
2941
2949
|
unregister(rc: Raycaster): void;
|
|
2950
|
+
private _selectStartFn?;
|
|
2951
|
+
private _selectEndFn?;
|
|
2952
|
+
private _selectUpdateFn?;
|
|
2942
2953
|
onEnable(): void;
|
|
2943
2954
|
onDisable(): void;
|
|
2944
2955
|
onPointerDown(): void;
|
|
@@ -3768,10 +3779,27 @@ declare module "engine/engine_input_utils" {
|
|
|
3768
3779
|
export function awaitInputAsync(): Promise<void>;
|
|
3769
3780
|
export function awaitInput(cb: any): Promise<void>;
|
|
3770
3781
|
}
|
|
3782
|
+
declare module "engine/engine_create_objects" {
|
|
3783
|
+
import { Mesh, Material } from "three";
|
|
3784
|
+
export enum PrimitiveType {
|
|
3785
|
+
Quad = 0
|
|
3786
|
+
}
|
|
3787
|
+
export type ObjectOptions = {
|
|
3788
|
+
name?: string;
|
|
3789
|
+
material?: Material;
|
|
3790
|
+
};
|
|
3791
|
+
export class ObjectUtils {
|
|
3792
|
+
static createPrimitive(type: PrimitiveType, opts?: ObjectOptions): Mesh;
|
|
3793
|
+
}
|
|
3794
|
+
}
|
|
3771
3795
|
declare module "engine-components/VideoPlayer" {
|
|
3772
3796
|
import { Behaviour } from "engine-components/Component";
|
|
3773
3797
|
import * as THREE from "three";
|
|
3774
|
-
|
|
3798
|
+
export enum AspectMode {
|
|
3799
|
+
None = 0,
|
|
3800
|
+
AdjustHeight = 1,
|
|
3801
|
+
AdjustWidth = 2
|
|
3802
|
+
}
|
|
3775
3803
|
export enum VideoSource {
|
|
3776
3804
|
VideoClip = 0,
|
|
3777
3805
|
Url = 1
|
|
@@ -3792,6 +3820,7 @@ declare module "engine-components/VideoPlayer" {
|
|
|
3792
3820
|
renderer: THREE.Object3D | null;
|
|
3793
3821
|
playOnAwake: boolean;
|
|
3794
3822
|
playOnEnable?: boolean;
|
|
3823
|
+
aspectMode: AspectMode;
|
|
3795
3824
|
private renderMode?;
|
|
3796
3825
|
private targetMaterialProperty?;
|
|
3797
3826
|
private targetMaterialRenderer?;
|
|
@@ -3808,13 +3837,14 @@ declare module "engine-components/VideoPlayer" {
|
|
|
3808
3837
|
get isPlaying(): boolean;
|
|
3809
3838
|
get crossOrigin(): string | null;
|
|
3810
3839
|
set crossOrigin(val: string | null);
|
|
3840
|
+
get videoTexture(): THREE.VideoTexture | null;
|
|
3811
3841
|
private _crossOrigin;
|
|
3812
3842
|
private audioOutputMode;
|
|
3813
3843
|
private source;
|
|
3814
3844
|
private clip?;
|
|
3815
3845
|
private url?;
|
|
3816
3846
|
private videoElement;
|
|
3817
|
-
private
|
|
3847
|
+
private _videoTexture;
|
|
3818
3848
|
private videoMaterial;
|
|
3819
3849
|
private _isPlaying;
|
|
3820
3850
|
private wasPlaying;
|
|
@@ -3830,12 +3860,17 @@ declare module "engine-components/VideoPlayer" {
|
|
|
3830
3860
|
stop(): void;
|
|
3831
3861
|
pause(): void;
|
|
3832
3862
|
create(playAutomatically: boolean): void;
|
|
3863
|
+
updateAspect(): void;
|
|
3864
|
+
private _overlay;
|
|
3865
|
+
get screenspace(): boolean;
|
|
3866
|
+
set screenspace(val: boolean);
|
|
3833
3867
|
private _targetObjects;
|
|
3834
|
-
getTargetObjects(): Array<Object3D>;
|
|
3835
3868
|
private createVideoElement;
|
|
3836
3869
|
private handleBeginPlaying;
|
|
3837
3870
|
private updateVideoElementSettings;
|
|
3838
3871
|
private updateVideoElementStyles;
|
|
3872
|
+
private _updateAspectRoutineId;
|
|
3873
|
+
private updateAspectImpl;
|
|
3839
3874
|
}
|
|
3840
3875
|
}
|
|
3841
3876
|
declare module "engine-components/ScreenCapture" {
|
|
@@ -3852,16 +3887,10 @@ declare module "engine-components/ScreenCapture" {
|
|
|
3852
3887
|
Sending = 1,
|
|
3853
3888
|
Receiving = 2
|
|
3854
3889
|
}
|
|
3855
|
-
export enum AspectMode {
|
|
3856
|
-
None = 0,
|
|
3857
|
-
AdjustHeight = 1,
|
|
3858
|
-
AdjustWidth = 2
|
|
3859
|
-
}
|
|
3860
3890
|
export class ScreenCapture extends Behaviour implements IPointerClickHandler {
|
|
3861
3891
|
onPointerClick(): void;
|
|
3862
3892
|
videoPlayer?: VideoPlayer;
|
|
3863
3893
|
device: ScreenCaptureDevice;
|
|
3864
|
-
aspectMode: AspectMode;
|
|
3865
3894
|
get currentScream(): MediaStream | null;
|
|
3866
3895
|
get currentMode(): ScreenCaptureMode;
|
|
3867
3896
|
get isSending(): boolean | undefined;
|
|
@@ -3877,10 +3906,6 @@ declare module "engine-components/ScreenCapture" {
|
|
|
3877
3906
|
private setVideo;
|
|
3878
3907
|
private onReceiveVideo;
|
|
3879
3908
|
private tryShareUserCamera;
|
|
3880
|
-
private _targetObjects?;
|
|
3881
|
-
private updateAspect;
|
|
3882
|
-
private _updateAspectRoutineId;
|
|
3883
|
-
private updateAspectImpl;
|
|
3884
3909
|
}
|
|
3885
3910
|
}
|
|
3886
3911
|
declare module "engine-components/ShadowCatcher" {
|
|
@@ -5042,7 +5067,6 @@ declare module "engine-components/codegen/components" {
|
|
|
5042
5067
|
export { Renderer } from "engine-components/Renderer";
|
|
5043
5068
|
export { MeshRenderer } from "engine-components/Renderer";
|
|
5044
5069
|
export { SkinnedMeshRenderer } from "engine-components/Renderer";
|
|
5045
|
-
export { InstancingUtil } from "engine-components/Renderer";
|
|
5046
5070
|
export { RendererLightmap } from "engine-components/RendererLightmap";
|
|
5047
5071
|
export { Rigidbody } from "engine-components/Rigidbody";
|
|
5048
5072
|
export { ScreenCapture } from "engine-components/ScreenCapture";
|