@needle-tools/engine 2.54.2-pre → 2.55.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 +10 -0
- package/dist/needle-engine.d.ts +27 -4
- package/dist/needle-engine.js +352 -352
- package/dist/needle-engine.js.map +3 -3
- package/dist/needle-engine.min.js +38 -38
- package/dist/needle-engine.min.js.map +3 -3
- package/dist/needle-engine.tsbuildinfo +1 -1
- package/lib/engine/engine_lightdata.js +1 -1
- package/lib/engine/engine_lightdata.js.map +1 -1
- package/lib/engine/engine_mainloop_utils.js +8 -0
- package/lib/engine/engine_mainloop_utils.js.map +1 -1
- package/lib/engine/engine_physics.d.ts +1 -1
- package/lib/engine/engine_physics.js +44 -3
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_physics.types.d.ts +13 -0
- package/lib/engine/engine_physics.types.js +7 -0
- package/lib/engine/engine_physics.types.js.map +1 -1
- package/lib/engine/engine_setup.js +2 -2
- package/lib/engine/engine_setup.js.map +1 -1
- package/lib/engine/engine_time.d.ts +1 -0
- package/lib/engine/engine_time.js +7 -0
- package/lib/engine/engine_time.js.map +1 -1
- package/lib/engine/engine_types.d.ts +4 -1
- package/lib/engine/engine_types.js.map +1 -1
- package/lib/engine/engine_utils.d.ts +1 -0
- package/lib/engine/engine_utils.js +3 -0
- package/lib/engine/engine_utils.js.map +1 -1
- package/lib/engine-components/Collider.d.ts +2 -0
- package/lib/engine-components/Collider.js +4 -0
- package/lib/engine-components/Collider.js.map +1 -1
- package/lib/engine-components/ParticleSystem.d.ts +1 -0
- package/lib/engine-components/ParticleSystem.js +10 -5
- package/lib/engine-components/ParticleSystem.js.map +1 -1
- package/lib/engine-components/ParticleSystemModules.d.ts +1 -1
- package/lib/engine-components/ParticleSystemModules.js +25 -19
- package/lib/engine-components/ParticleSystemModules.js.map +1 -1
- package/lib/engine-components/Renderer.d.ts +1 -0
- package/lib/engine-components/Renderer.js +5 -0
- package/lib/engine-components/Renderer.js.map +1 -1
- package/lib/engine-components/RigidBody.js +1 -19
- package/lib/engine-components/RigidBody.js.map +1 -1
- package/lib/engine-components/SyncedTransform.js +1 -3
- package/lib/engine-components/SyncedTransform.js.map +1 -1
- package/lib/engine-components/VideoPlayer.d.ts +2 -1
- package/lib/engine-components/VideoPlayer.js +54 -51
- package/lib/engine-components/VideoPlayer.js.map +1 -1
- package/lib/engine-components/WebARSessionRoot.js +5 -0
- package/lib/engine-components/WebARSessionRoot.js.map +1 -1
- package/lib/engine-components/WebXR.js +13 -13
- package/lib/engine-components/WebXR.js.map +1 -1
- package/lib/engine-components/WebXRController.js +1 -2
- package/lib/engine-components/WebXRController.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/engine/engine_lightdata.ts +1 -1
- package/src/engine/engine_mainloop_utils.ts +6 -0
- package/src/engine/engine_physics.ts +47 -5
- package/src/engine/engine_physics.types.ts +17 -0
- package/src/engine/engine_setup.ts +2 -2
- package/src/engine/engine_time.ts +7 -1
- package/src/engine/engine_types.ts +5 -2
- package/src/engine/engine_utils.ts +4 -0
- package/src/engine-components/Collider.ts +3 -0
- package/src/engine-components/ParticleSystem.ts +10 -5
- package/src/engine-components/ParticleSystemModules.ts +27 -20
- package/src/engine-components/Renderer.ts +6 -0
- package/src/engine-components/RigidBody.ts +1 -20
- package/src/engine-components/SyncedTransform.ts +1 -3
- package/src/engine-components/VideoPlayer.ts +55 -51
- package/src/engine-components/WebARSessionRoot.ts +5 -0
- package/src/engine-components/WebXR.ts +15 -13
- package/src/engine-components/WebXRController.ts +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ 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.55.0-pre] - 2022-12-21
|
|
8
|
+
- Add: PhysicsMaterial support
|
|
9
|
+
- Add: ``Time.timesScale`` factor
|
|
10
|
+
- Change: VideoPlayer exposes underlying HTML video element
|
|
11
|
+
- Change: EffectComposer check if ``setPixelRatio`` method exists before calling
|
|
12
|
+
- Change: WebARSessionRoot and Rig rotation
|
|
13
|
+
- Fix: WebXRController raycast line not being visible in Quest AR
|
|
14
|
+
- Fix: Renderer that is disabled initially now hides object
|
|
15
|
+
- Fix: Some ParticleSystem worldspace settings when calling emit directly
|
|
16
|
+
|
|
7
17
|
## [2.54.2-pre] - 2022-12-19
|
|
8
18
|
- Change: debug parameter can now take ``=0`` for disabling them (e.g. ``freecam=0``)
|
|
9
19
|
- Fix: InputField opens keyboard on iOS
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -30,6 +30,19 @@ declare module "engine-components/js-extensions/RGBAColor" {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
declare module "engine/engine_physics.types" {
|
|
33
|
+
export enum PhysicsMaterialCombine {
|
|
34
|
+
Average = 0,
|
|
35
|
+
Multiply = 1,
|
|
36
|
+
Minimum = 2,
|
|
37
|
+
Maximum = 3
|
|
38
|
+
}
|
|
39
|
+
export type PhysicsMaterial = {
|
|
40
|
+
bounceCombine: PhysicsMaterialCombine;
|
|
41
|
+
bounciness: number;
|
|
42
|
+
frictionCombine: PhysicsMaterialCombine;
|
|
43
|
+
dynamicFriction: number;
|
|
44
|
+
staticFriction: number;
|
|
45
|
+
};
|
|
33
46
|
export enum CollisionDetectionMode {
|
|
34
47
|
Discrete = 0,
|
|
35
48
|
Continuous = 1
|
|
@@ -96,7 +109,7 @@ declare module "engine/engine_three_utils" {
|
|
|
96
109
|
declare module "engine/engine_types" {
|
|
97
110
|
import { Camera, Color, Material, Object3D, Vector3, Quaternion, Ray } from "three";
|
|
98
111
|
import { RGBAColor } from "engine-components/js-extensions/RGBAColor";
|
|
99
|
-
import { CollisionDetectionMode, RigidbodyConstraints } from "engine/engine_physics.types";
|
|
112
|
+
import { CollisionDetectionMode, PhysicsMaterial, RigidbodyConstraints } from "engine/engine_physics.types";
|
|
100
113
|
/** used to find data registered via gltf files e.g. find lightmaps for a Renderer component that were shipped inside a gltf */
|
|
101
114
|
export type SourceIdentifier = string;
|
|
102
115
|
export type Constructor<T> = abstract new (...args: any[]) => T;
|
|
@@ -145,6 +158,8 @@ declare module "engine/engine_types" {
|
|
|
145
158
|
__internalDisable(): any;
|
|
146
159
|
__internalDestroy(): any;
|
|
147
160
|
resolveGuids?(guidsMap: GuidsMap): void;
|
|
161
|
+
/** experimental, called when the script is registered for the first time, this is called even if the component is not enabled. */
|
|
162
|
+
registering?(): any;
|
|
148
163
|
awake(): any;
|
|
149
164
|
onEnable(): any;
|
|
150
165
|
onDisable(): any;
|
|
@@ -201,6 +216,7 @@ declare module "engine/engine_types" {
|
|
|
201
216
|
get isCollider(): any;
|
|
202
217
|
attachedRigidbody: IRigidbody | null;
|
|
203
218
|
isTrigger: boolean;
|
|
219
|
+
sharedMaterial?: PhysicsMaterial;
|
|
204
220
|
}
|
|
205
221
|
export interface IRigidbody extends IComponent {
|
|
206
222
|
constraints: RigidbodyConstraints;
|
|
@@ -310,6 +326,7 @@ declare module "engine/engine_utils" {
|
|
|
310
326
|
export function isMozillaXR(): boolean;
|
|
311
327
|
export function isiOS(): boolean;
|
|
312
328
|
export function isSafari(): boolean;
|
|
329
|
+
export function isQuest(): boolean;
|
|
313
330
|
}
|
|
314
331
|
declare module "engine/engine_networking_utils" {
|
|
315
332
|
export function isLocalNetwork(hostname?: string): boolean;
|
|
@@ -903,7 +920,7 @@ declare module "engine/engine_physics" {
|
|
|
903
920
|
internal_getRigidbody(rb: IRigidbody): RigidBody | null;
|
|
904
921
|
private internalUpdateProperties;
|
|
905
922
|
private lines?;
|
|
906
|
-
step(
|
|
923
|
+
step(dt?: number): void;
|
|
907
924
|
private updateDebugRendering;
|
|
908
925
|
postStep(): void;
|
|
909
926
|
/** sync rendered objects with physics world (except for colliders without rigidbody) */
|
|
@@ -930,6 +947,7 @@ declare module "engine/engine_time" {
|
|
|
930
947
|
export class Time {
|
|
931
948
|
deltaTime: number;
|
|
932
949
|
time: number;
|
|
950
|
+
timeScale: number;
|
|
933
951
|
/** same as frameCount */
|
|
934
952
|
frame: number;
|
|
935
953
|
get realtimeSinceStartup(): number;
|
|
@@ -3990,6 +4008,7 @@ declare module "engine-components/Renderer" {
|
|
|
3990
4008
|
set lightmap(tex: Texture | null | undefined);
|
|
3991
4009
|
get hasLightmap(): boolean;
|
|
3992
4010
|
allowProgressiveLoading: boolean;
|
|
4011
|
+
registering(): void;
|
|
3993
4012
|
awake(): void;
|
|
3994
4013
|
private _isInstancingEnabled;
|
|
3995
4014
|
private handles;
|
|
@@ -4293,10 +4312,12 @@ declare module "engine-components/Collider" {
|
|
|
4293
4312
|
import { Rigidbody } from "engine-components/RigidBody";
|
|
4294
4313
|
import { Mesh, Vector3 } from "three";
|
|
4295
4314
|
import { ICollider } from "engine/engine_types";
|
|
4315
|
+
import { PhysicsMaterial } from "engine/engine_physics.types";
|
|
4296
4316
|
export class Collider extends Behaviour implements ICollider {
|
|
4297
4317
|
get isCollider(): any;
|
|
4298
4318
|
attachedRigidbody: Rigidbody | null;
|
|
4299
4319
|
isTrigger: boolean;
|
|
4320
|
+
sharedMaterial?: PhysicsMaterial;
|
|
4300
4321
|
awake(): void;
|
|
4301
4322
|
start(): void;
|
|
4302
4323
|
onEnable(): void;
|
|
@@ -4895,7 +4916,7 @@ declare module "engine-components/ParticleSystemModules" {
|
|
|
4895
4916
|
get vector(): Vector3;
|
|
4896
4917
|
getPosition(): void;
|
|
4897
4918
|
private _dir;
|
|
4898
|
-
getDirection(
|
|
4919
|
+
getDirection(pos: Vec3): Vector3;
|
|
4899
4920
|
private static _randomQuat;
|
|
4900
4921
|
private static _tempVec;
|
|
4901
4922
|
private randomizePosition;
|
|
@@ -5748,6 +5769,7 @@ declare module "engine-components/ParticleSystem" {
|
|
|
5748
5769
|
onEnable(): void;
|
|
5749
5770
|
onDisable(): void;
|
|
5750
5771
|
onBeforeRender(): void;
|
|
5772
|
+
private onUpdate;
|
|
5751
5773
|
private addSubParticleSystems;
|
|
5752
5774
|
}
|
|
5753
5775
|
}
|
|
@@ -5875,12 +5897,13 @@ declare module "engine-components/VideoPlayer" {
|
|
|
5875
5897
|
get crossOrigin(): string | null;
|
|
5876
5898
|
set crossOrigin(val: string | null);
|
|
5877
5899
|
get videoTexture(): THREE.VideoTexture | null;
|
|
5900
|
+
get videoElement(): HTMLVideoElement | null;
|
|
5878
5901
|
private _crossOrigin;
|
|
5879
5902
|
private audioOutputMode;
|
|
5880
5903
|
private source;
|
|
5881
5904
|
private clip?;
|
|
5882
5905
|
private url?;
|
|
5883
|
-
private
|
|
5906
|
+
private _videoElement;
|
|
5884
5907
|
private _videoTexture;
|
|
5885
5908
|
private videoMaterial;
|
|
5886
5909
|
private _isPlaying;
|