@needle-tools/engine 2.38.0-pre.2 → 2.40.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 +21 -0
- package/dist/needle-engine.d.ts +129 -36
- package/dist/needle-engine.js +356 -356
- package/dist/needle-engine.js.map +3 -3
- package/dist/needle-engine.min.js +61 -61
- package/dist/needle-engine.min.js.map +3 -3
- package/lib/engine/api.d.ts +1 -0
- package/lib/engine/api.js +1 -0
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/engine_gizmos.d.ts +24 -0
- package/lib/engine/engine_gizmos.js +97 -5
- package/lib/engine/engine_gizmos.js.map +1 -1
- package/lib/engine/engine_gltf_builtin_components.js +4 -2
- package/lib/engine/engine_gltf_builtin_components.js.map +1 -1
- package/lib/engine/engine_input.d.ts +2 -0
- package/lib/engine/engine_input.js +9 -2
- package/lib/engine/engine_input.js.map +1 -1
- package/lib/engine/engine_networking.d.ts +1 -0
- package/lib/engine/engine_networking.js +9 -0
- package/lib/engine/engine_networking.js.map +1 -1
- package/lib/engine/engine_physics.d.ts +20 -2
- package/lib/engine/engine_physics.js +133 -16
- package/lib/engine/engine_physics.js.map +1 -1
- package/lib/engine/engine_serialization_core.d.ts +11 -1
- package/lib/engine/engine_serialization_core.js +41 -10
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_three_utils.js +1 -22
- package/lib/engine/engine_three_utils.js.map +1 -1
- package/lib/engine/engine_types.d.ts +12 -6
- package/lib/engine/engine_types.js +22 -5
- package/lib/engine/engine_types.js.map +1 -1
- package/lib/engine/engine_utils.d.ts +8 -0
- package/lib/engine/engine_utils.js +22 -0
- package/lib/engine/engine_utils.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_lightmaps.js +1 -1
- package/lib/engine/extensions/NEEDLE_lightmaps.js.map +1 -1
- package/lib/engine-components/Component.d.ts +18 -0
- package/lib/engine-components/Component.js +15 -2
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/Joints.d.ts +5 -1
- package/lib/engine-components/Joints.js +17 -7
- package/lib/engine-components/Joints.js.map +1 -1
- package/lib/engine-components/Light.js +1 -1
- package/lib/engine-components/codegen/components.d.ts +1 -0
- package/lib/engine-components/codegen/components.js +1 -0
- package/lib/engine-components/codegen/components.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/api.ts +2 -1
- package/src/engine/codegen/register_types.js +4 -0
- package/src/engine/engine_gizmos.ts +117 -5
- package/src/engine/engine_gltf_builtin_components.ts +5 -2
- package/src/engine/engine_input.ts +12 -2
- package/src/engine/engine_networking.ts +10 -0
- package/src/engine/engine_physics.ts +159 -17
- package/src/engine/engine_serialization_core.ts +49 -12
- package/src/engine/engine_three_utils.ts +1 -29
- package/src/engine/engine_types.ts +33 -14
- package/src/engine/engine_utils.ts +27 -0
- package/src/engine/extensions/NEEDLE_lightmaps.ts +1 -1
- package/src/engine-components/Component.ts +30 -4
- package/src/engine-components/Joints.ts +19 -7
- package/src/engine-components/Light.ts +1 -1
- package/src/engine-components/codegen/components.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ 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.40.0-pre] - 2022-11-05
|
|
8
|
+
- Add support for deleting all room state by calling ``context.connection.sendDeleteRemoteStateAll()`` (requires backend to update ``@needle-tools/needle-tiny-networking-ws`` to ``^1.1.0-pre``)
|
|
9
|
+
- Add Hinge joint
|
|
10
|
+
- Add ``Gizmos.DrawLine``, ``DrawRay`` ``DrawWireSphere`` and ``DrawSphere``
|
|
11
|
+
- Add: physics Collision Contacts now contain information about ``impulse`` and ``friction``
|
|
12
|
+
- Add ``physics.raycastPhysicsFast`` as a first method to raycast against physics colliders, the returning object contains the point in worldspace and the collider. This is the most simplest and thus fastest way to raycast using Rapier. More complex options will follow in future versions.
|
|
13
|
+
- Fix joint matrix calculation
|
|
14
|
+
- Fix and improve physics Contacts point calculations
|
|
15
|
+
- Fix issue in physics event callbacks where ``onCollisionStay`` and ``onCollisionExit`` would only be called when ``onCollisionEnter`` was defined
|
|
16
|
+
|
|
17
|
+
## [2.39.0-pre] - 2022-11-04
|
|
18
|
+
- Add: physics FixedJoint
|
|
19
|
+
- Change: CharacterController now rotates with camera
|
|
20
|
+
- Change: scaled mesh colliders are now cached
|
|
21
|
+
- Change: disable OrbitControls when in XR
|
|
22
|
+
- Change: first enabled camera component sets itself as rendering camera if no camera is yet assigned (mainCamera still overrides that)
|
|
23
|
+
- Change: package module field now shows to ``src/needle-engine``
|
|
24
|
+
- Change: ``Camera.backgroundColor`` assigning Color without alpha sets alpha to 1 now
|
|
25
|
+
- Fix: improved missing ``serializable`` detection / warning: now only shows warning for members actually declared in script
|
|
26
|
+
- Fix: wrong light intensity in VR when light is child of WebARSessionRoot [issue 103](https://github.com/needle-tools/needle-engine-support/issues/103)
|
|
27
|
+
|
|
7
28
|
## [2.38.0-pre] - 2022-11-02
|
|
8
29
|
- Add ``context.isInAR`` and ``context.isInVR`` properties
|
|
9
30
|
- Add physics capsule collider support
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -48,6 +48,28 @@ declare module "engine/engine_physics.types" {
|
|
|
48
48
|
All = -1
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
declare module "engine/engine_three_utils" {
|
|
52
|
+
import * as THREE from "three";
|
|
53
|
+
import { Vector3 } from "three";
|
|
54
|
+
export function lookAtInverse(obj: THREE.Object3D, target: Vector3): void;
|
|
55
|
+
export function getWorldPosition(obj: THREE.Object3D, vec?: THREE.Vector3 | null, updateParents?: boolean): THREE.Vector3;
|
|
56
|
+
export function setWorldPosition(obj: THREE.Object3D, val: THREE.Vector3): void;
|
|
57
|
+
export function setWorldPositionXYZ(obj: THREE.Object3D, x: number, y: number, z: number): void;
|
|
58
|
+
export function getWorldQuaternion(obj: THREE.Object3D, target?: THREE.Quaternion | null): THREE.Quaternion;
|
|
59
|
+
export function setWorldQuaternion(obj: THREE.Object3D, val: THREE.Quaternion): void;
|
|
60
|
+
export function setWorldQuaternionXYZW(obj: THREE.Object3D, x: number, y: number, z: number, w: number): void;
|
|
61
|
+
export function getWorldScale(obj: THREE.Object3D, vec?: THREE.Vector3 | null): THREE.Vector3;
|
|
62
|
+
export function setWorldScale(obj: THREE.Object3D, vec: THREE.Vector3): void;
|
|
63
|
+
export function forward(obj: THREE.Object3D): THREE.Vector3;
|
|
64
|
+
export function getWorldEuler(obj: THREE.Object3D): THREE.Euler;
|
|
65
|
+
export function setWorldEuler(obj: THREE.Object3D, val: THREE.Euler): void;
|
|
66
|
+
export function getWorldRotation(obj: THREE.Object3D): THREE.Vector3;
|
|
67
|
+
export function setWorldRotation(obj: THREE.Object3D, val: THREE.Vector3): void;
|
|
68
|
+
export function setWorldRotationXYZ(obj: THREE.Object3D, x: number, y: number, z: number, degrees?: boolean): void;
|
|
69
|
+
export function logHierarchy(root: THREE.Object3D | null | undefined, collapsible?: boolean): void;
|
|
70
|
+
export function copyTexture(texture: THREE.Texture): THREE.Texture;
|
|
71
|
+
export function textureToCanvas(texture: THREE.Texture, force?: boolean): HTMLCanvasElement | null;
|
|
72
|
+
}
|
|
51
73
|
declare module "engine/engine_types" {
|
|
52
74
|
import { Camera, Color, Material, Object3D, Vector3, Quaternion } from "three";
|
|
53
75
|
import { RGBAColor } from "engine-components/js-extensions/RGBAColor";
|
|
@@ -160,20 +182,26 @@ declare module "engine/engine_types" {
|
|
|
160
182
|
export type ICollisionContext = {
|
|
161
183
|
getCollider(obj: Object3D): ICollider;
|
|
162
184
|
};
|
|
163
|
-
export type
|
|
185
|
+
export type Vec2 = {
|
|
164
186
|
x: number;
|
|
165
187
|
y: number;
|
|
166
|
-
z: number;
|
|
167
188
|
};
|
|
168
|
-
export type
|
|
189
|
+
export type Vec3 = {
|
|
169
190
|
x: number;
|
|
170
191
|
y: number;
|
|
192
|
+
z: number;
|
|
171
193
|
};
|
|
172
194
|
export class ContactPoint {
|
|
173
|
-
readonly
|
|
195
|
+
private readonly _point;
|
|
196
|
+
private readonly _normal;
|
|
174
197
|
readonly distance: number;
|
|
175
|
-
readonly
|
|
176
|
-
|
|
198
|
+
readonly impulse: number;
|
|
199
|
+
readonly friction: number;
|
|
200
|
+
/** worldspace point */
|
|
201
|
+
get point(): Vector3;
|
|
202
|
+
/** worldspace normal */
|
|
203
|
+
get normal(): Vector3;
|
|
204
|
+
constructor(point: Vec3, dist: number, normal: Vec3, impulse: number, friction: number);
|
|
177
205
|
}
|
|
178
206
|
export class Collision {
|
|
179
207
|
readonly contacts: ContactPoint[];
|
|
@@ -194,6 +222,14 @@ declare module "engine/engine_utils" {
|
|
|
194
222
|
export const nameofFactory: <T>() => (name: keyof T) => keyof T;
|
|
195
223
|
export function nameof<T>(name: keyof T): keyof T;
|
|
196
224
|
export function isDebugMode(): boolean;
|
|
225
|
+
export class CircularBuffer<T> {
|
|
226
|
+
private _factory;
|
|
227
|
+
private _cache;
|
|
228
|
+
private _maxSize;
|
|
229
|
+
private _index;
|
|
230
|
+
constructor(factory: () => T, maxSize: number);
|
|
231
|
+
get(): T;
|
|
232
|
+
}
|
|
197
233
|
export function getUrlParams(): URLSearchParams;
|
|
198
234
|
export function getParam(paramName: string): string | boolean;
|
|
199
235
|
export function setParam(paramName: string, paramValue: string): void;
|
|
@@ -346,6 +382,14 @@ declare module "engine/engine_serialization_core" {
|
|
|
346
382
|
export interface ITypeInformation {
|
|
347
383
|
type?: Constructor<any>;
|
|
348
384
|
}
|
|
385
|
+
/** holds information if a field was undefined before serialization. This gives us info if we might want to warn the user about missing attributes */
|
|
386
|
+
export class ImplementationInformation {
|
|
387
|
+
private isDevMode;
|
|
388
|
+
private cache;
|
|
389
|
+
/** only call when assigning values for the very first time */
|
|
390
|
+
registerDefinedKeys(typeName: string, type: object): void;
|
|
391
|
+
getDefinedKey(typeName: string, key: string): boolean;
|
|
392
|
+
}
|
|
349
393
|
export class SerializationContext {
|
|
350
394
|
root: THREE.Object3D;
|
|
351
395
|
gltf?: GLTF;
|
|
@@ -357,6 +401,8 @@ declare module "engine/engine_serialization_core" {
|
|
|
357
401
|
objectToNode?: ObjectToNodeMap;
|
|
358
402
|
context?: Context;
|
|
359
403
|
path?: string;
|
|
404
|
+
/** holds information if a field was undefined before serialization. This gives us info if we might want to warn the user about missing attributes */
|
|
405
|
+
implementationInformation?: ImplementationInformation;
|
|
360
406
|
constructor(root: THREE.Object3D);
|
|
361
407
|
}
|
|
362
408
|
export interface ISerializable {
|
|
@@ -374,11 +420,12 @@ declare module "engine/engine_serialization_core" {
|
|
|
374
420
|
* Used for validate decorator to not invoke callbacks on components that are currently in the process of being built */
|
|
375
421
|
export const $isAssigningProperties: unique symbol;
|
|
376
422
|
/** Object.assign behaviour but check if property is writeable (e.g. getter only properties are skipped) */
|
|
377
|
-
export function assign(target: any, source: any): void;
|
|
423
|
+
export function assign(target: any, source: any, info?: ImplementationInformation): void;
|
|
378
424
|
}
|
|
379
425
|
declare module "engine/engine_input" {
|
|
380
426
|
import * as THREE from 'three';
|
|
381
427
|
import { Context } from "engine/engine_setup";
|
|
428
|
+
import { Vec2 } from "engine/engine_types";
|
|
382
429
|
export type PointerEventArgs = {
|
|
383
430
|
button: number;
|
|
384
431
|
clientX: number;
|
|
@@ -460,6 +507,7 @@ declare module "engine/engine_input" {
|
|
|
460
507
|
createPointerDown(args: PointerEventArgs): void;
|
|
461
508
|
createPointerMove(args: PointerEventArgs): void;
|
|
462
509
|
createPointerUp(args: PointerEventArgs): void;
|
|
510
|
+
convertScreenspaceToRaycastSpace(vec2: Vec2): void;
|
|
463
511
|
constructor(context: Context);
|
|
464
512
|
private onLostFocus;
|
|
465
513
|
private onEndOfFrame;
|
|
@@ -570,28 +618,6 @@ declare module "engine/engine_input" {
|
|
|
570
618
|
F12 = "F12"
|
|
571
619
|
}
|
|
572
620
|
}
|
|
573
|
-
declare module "engine/engine_three_utils" {
|
|
574
|
-
import * as THREE from "three";
|
|
575
|
-
import { Vector3 } from "three";
|
|
576
|
-
export function lookAtInverse(obj: THREE.Object3D, target: Vector3): void;
|
|
577
|
-
export function getWorldPosition(obj: THREE.Object3D, vec?: THREE.Vector3 | null, updateParents?: boolean): THREE.Vector3;
|
|
578
|
-
export function setWorldPosition(obj: THREE.Object3D, val: THREE.Vector3): void;
|
|
579
|
-
export function setWorldPositionXYZ(obj: THREE.Object3D, x: number, y: number, z: number): void;
|
|
580
|
-
export function getWorldQuaternion(obj: THREE.Object3D, target?: THREE.Quaternion | null): THREE.Quaternion;
|
|
581
|
-
export function setWorldQuaternion(obj: THREE.Object3D, val: THREE.Quaternion): void;
|
|
582
|
-
export function setWorldQuaternionXYZW(obj: THREE.Object3D, x: number, y: number, z: number, w: number): void;
|
|
583
|
-
export function getWorldScale(obj: THREE.Object3D, vec?: THREE.Vector3 | null): THREE.Vector3;
|
|
584
|
-
export function setWorldScale(obj: THREE.Object3D, vec: THREE.Vector3): void;
|
|
585
|
-
export function forward(obj: THREE.Object3D): THREE.Vector3;
|
|
586
|
-
export function getWorldEuler(obj: THREE.Object3D): THREE.Euler;
|
|
587
|
-
export function setWorldEuler(obj: THREE.Object3D, val: THREE.Euler): void;
|
|
588
|
-
export function getWorldRotation(obj: THREE.Object3D): THREE.Vector3;
|
|
589
|
-
export function setWorldRotation(obj: THREE.Object3D, val: THREE.Vector3): void;
|
|
590
|
-
export function setWorldRotationXYZ(obj: THREE.Object3D, x: number, y: number, z: number, degrees?: boolean): void;
|
|
591
|
-
export function logHierarchy(root: THREE.Object3D | null | undefined, collapsible?: boolean): void;
|
|
592
|
-
export function copyTexture(texture: THREE.Texture): THREE.Texture;
|
|
593
|
-
export function textureToCanvas(texture: THREE.Texture, force?: boolean): HTMLCanvasElement | null;
|
|
594
|
-
}
|
|
595
621
|
declare module "engine/engine_instancing" {
|
|
596
622
|
export const NEED_UPDATE_INSTANCE_KEY: unique symbol;
|
|
597
623
|
export class InstancingUtil {
|
|
@@ -739,7 +765,7 @@ declare module "engine/engine_gameobject" {
|
|
|
739
765
|
declare module "engine/engine_physics" {
|
|
740
766
|
import { Camera, Intersection, Layers, Mesh, Object3D, Ray, Raycaster, Vector2, Vector3 } from 'three';
|
|
741
767
|
import { Context } from "engine/engine_setup";
|
|
742
|
-
import { IComponent, ICollider, IRigidbody } from "engine/engine_types";
|
|
768
|
+
import { IComponent, ICollider, IRigidbody, Vec3, Vec2 } from "engine/engine_types";
|
|
743
769
|
import RAPIER, { RigidBody } from '@dimforge/rapier3d-compat';
|
|
744
770
|
export type Rapier = typeof RAPIER;
|
|
745
771
|
export class RaycastOptions {
|
|
@@ -776,7 +802,19 @@ declare module "engine/engine_physics" {
|
|
|
776
802
|
private tempBoundingBox;
|
|
777
803
|
private onSphereOverlap;
|
|
778
804
|
raycastFromRay(ray: Ray, options?: RaycastOptions | null): Array<Intersection>;
|
|
805
|
+
/** raycast against rendered three objects. This might be very slow depending on your scene complexity.
|
|
806
|
+
* We recommend setting objects to IgnoreRaycast layer (2) when you don't need them to be raycasted.
|
|
807
|
+
* Raycasting SkinnedMeshes is specially expensive.
|
|
808
|
+
*/
|
|
779
809
|
raycast(options?: RaycastOptions | null): Array<Intersection>;
|
|
810
|
+
private rapierRay;
|
|
811
|
+
private raycastVectorsBuffer;
|
|
812
|
+
/** raycast against colliders */
|
|
813
|
+
raycastPhysicsFast(origin: Vec2 | Vec3, direction?: Vec3 | undefined, maxDistance?: number, solid?: boolean): null | {
|
|
814
|
+
point: Vector3;
|
|
815
|
+
collider: ICollider;
|
|
816
|
+
};
|
|
817
|
+
private getPhysicsRay;
|
|
780
818
|
private _tempPosition;
|
|
781
819
|
private _tempQuaternion;
|
|
782
820
|
private _tempScale;
|
|
@@ -817,11 +855,17 @@ declare module "engine/engine_physics" {
|
|
|
817
855
|
private getRigidbodyRelativeMatrix;
|
|
818
856
|
private static centerConnectionPos;
|
|
819
857
|
private static centerConnectionRot;
|
|
820
|
-
addFixedJoint(body1: IRigidbody, body2: IRigidbody
|
|
858
|
+
addFixedJoint(body1: IRigidbody, body2: IRigidbody): void;
|
|
859
|
+
addHingeJoint(body1: IRigidbody, body2: IRigidbody, anchor: {
|
|
860
|
+
x: number;
|
|
861
|
+
y: number;
|
|
862
|
+
z: number;
|
|
863
|
+
}, axis: {
|
|
821
864
|
x: number;
|
|
822
865
|
y: number;
|
|
823
866
|
z: number;
|
|
824
867
|
}): void;
|
|
868
|
+
private calculateJointRelativeMatrices;
|
|
825
869
|
}
|
|
826
870
|
}
|
|
827
871
|
declare module "engine/engine_time" {
|
|
@@ -1014,6 +1058,7 @@ declare module "engine/engine_networking" {
|
|
|
1014
1058
|
leaveRoom(room?: string | null): void;
|
|
1015
1059
|
send(key: string | OwnershipEvent, data?: IModel | object | boolean | null | string | number, queue?: SendQueue): void;
|
|
1016
1060
|
sendDeleteRemoteState(guid: string): void;
|
|
1061
|
+
sendDeleteRemoteStateAll(): void;
|
|
1017
1062
|
sendBinary(bin: Uint8Array): void;
|
|
1018
1063
|
private _defaultMessagesBuffer;
|
|
1019
1064
|
private _defaultMessagesBufferArray;
|
|
@@ -1272,10 +1317,15 @@ declare module "engine-components/Component" {
|
|
|
1272
1317
|
sourceId?: SourceIdentifier;
|
|
1273
1318
|
/** called on a component with a map of old to new guids (e.g. when instantiate generated new guids and e.g. timeline track bindings needs to remape them) */
|
|
1274
1319
|
resolveGuids?(guidsMap: GuidsMap): void;
|
|
1320
|
+
/** called once when the component becomes active for the first time */
|
|
1275
1321
|
awake(): void;
|
|
1322
|
+
/** called every time when the component gets enabled (this is invoked after awake and before start) */
|
|
1276
1323
|
onEnable(): void;
|
|
1277
1324
|
onDisable(): void;
|
|
1278
1325
|
onDestroy(): void;
|
|
1326
|
+
/** called when you decorate fields with the @validate() decorator
|
|
1327
|
+
* @param field the name of the field that was changed
|
|
1328
|
+
*/
|
|
1279
1329
|
onValidate?(prop?: string): void;
|
|
1280
1330
|
start?(): void;
|
|
1281
1331
|
earlyUpdate?(): void;
|
|
@@ -1293,18 +1343,31 @@ declare module "engine-components/Component" {
|
|
|
1293
1343
|
stopCoroutine(routine: Generator, evt?: FrameEvent): void;
|
|
1294
1344
|
get destroyed(): boolean;
|
|
1295
1345
|
destroy(): void;
|
|
1346
|
+
/** @internal */
|
|
1296
1347
|
protected __didAwake: boolean;
|
|
1348
|
+
/** @internal */
|
|
1297
1349
|
private __didStart;
|
|
1350
|
+
/** @internal */
|
|
1298
1351
|
protected __didEnable: boolean;
|
|
1352
|
+
/** @internal */
|
|
1299
1353
|
protected __isEnabled: boolean | undefined;
|
|
1354
|
+
/** @internal */
|
|
1300
1355
|
private __destroyed;
|
|
1356
|
+
/** @internal */
|
|
1301
1357
|
get __internalDidAwakeAndStart(): boolean;
|
|
1358
|
+
/** @internal */
|
|
1302
1359
|
constructor();
|
|
1360
|
+
/** @internal */
|
|
1303
1361
|
__internalNewInstanceCreated(): void;
|
|
1362
|
+
/** @internal */
|
|
1304
1363
|
__internalAwake(): void;
|
|
1364
|
+
/** @internal */
|
|
1305
1365
|
__internalStart(): void;
|
|
1366
|
+
/** @internal */
|
|
1306
1367
|
__internalEnable(): boolean;
|
|
1368
|
+
/** @internal */
|
|
1307
1369
|
__internalDisable(): void;
|
|
1370
|
+
/** @internal */
|
|
1308
1371
|
__internalDestroy(): void;
|
|
1309
1372
|
get enabled(): boolean;
|
|
1310
1373
|
set enabled(val: boolean);
|
|
@@ -2371,6 +2434,34 @@ declare module "engine/engine_util_decorator" {
|
|
|
2371
2434
|
/** create accessor callbacks for a field */
|
|
2372
2435
|
export const validate: (set?: setter, get?: getter) => (target: IComponent | any, propertyKey: string, descriptor?: undefined) => void;
|
|
2373
2436
|
}
|
|
2437
|
+
declare module "engine/engine_gizmos" {
|
|
2438
|
+
import * as THREE from 'three';
|
|
2439
|
+
import { ColorRepresentation } from 'three';
|
|
2440
|
+
import { Vec3 } from "engine/engine_types";
|
|
2441
|
+
export class Gizmos {
|
|
2442
|
+
static DrawRay(origin: Vec3, dir: Vec3, color?: ColorRepresentation, duration?: number, depthTest?: boolean): void;
|
|
2443
|
+
static DrawLine(pt0: {
|
|
2444
|
+
x: number;
|
|
2445
|
+
y: number;
|
|
2446
|
+
z: number;
|
|
2447
|
+
}, pt1: {
|
|
2448
|
+
x: number;
|
|
2449
|
+
y: number;
|
|
2450
|
+
z: number;
|
|
2451
|
+
}, color?: ColorRepresentation, duration?: number, depthTest?: boolean): void;
|
|
2452
|
+
static DrawWireSphere(center: {
|
|
2453
|
+
x: number;
|
|
2454
|
+
y: number;
|
|
2455
|
+
z: number;
|
|
2456
|
+
}, radius: number, color?: ColorRepresentation, duration?: number, depthTest?: boolean): void;
|
|
2457
|
+
static DrawSphere(center: {
|
|
2458
|
+
x: number;
|
|
2459
|
+
y: number;
|
|
2460
|
+
z: number;
|
|
2461
|
+
}, radius: number, color?: ColorRepresentation, duration?: number, depthTest?: boolean): void;
|
|
2462
|
+
}
|
|
2463
|
+
export function CreateWireCube(col?: THREE.ColorRepresentation | null): THREE.LineSegments;
|
|
2464
|
+
}
|
|
2374
2465
|
declare module "engine/api" {
|
|
2375
2466
|
export { InstancingUtil } from "engine/engine_instancing";
|
|
2376
2467
|
export * from "engine/engine_gameobject";
|
|
@@ -2379,6 +2470,7 @@ declare module "engine/api" {
|
|
|
2379
2470
|
export { FrameEvent } from "engine/engine_setup";
|
|
2380
2471
|
export * from "engine/debug/debug";
|
|
2381
2472
|
export { validate } from "engine/engine_util_decorator";
|
|
2473
|
+
export { Gizmos } from "engine/engine_gizmos";
|
|
2382
2474
|
}
|
|
2383
2475
|
declare module "engine-components/AlignmentConstraint" {
|
|
2384
2476
|
import { Behaviour } from "engine-components/Component";
|
|
@@ -2566,10 +2658,6 @@ declare module "engine-components/BasicIKConstraint" {
|
|
|
2566
2658
|
update(): void;
|
|
2567
2659
|
}
|
|
2568
2660
|
}
|
|
2569
|
-
declare module "engine/engine_gizmos" {
|
|
2570
|
-
import * as THREE from 'three';
|
|
2571
|
-
export function CreateWireCube(col?: THREE.ColorRepresentation | null): THREE.LineSegments;
|
|
2572
|
-
}
|
|
2573
2661
|
declare module "engine-components/BoxHelperComponent" {
|
|
2574
2662
|
import { Behaviour } from "engine-components/Component";
|
|
2575
2663
|
import * as THREE from "three";
|
|
@@ -3917,7 +4005,6 @@ declare module "engine-components/Joints" {
|
|
|
3917
4005
|
connectedBody?: Rigidbody;
|
|
3918
4006
|
get rigidBody(): Rigidbody | null;
|
|
3919
4007
|
private _rigidBody;
|
|
3920
|
-
connectedAnchor?: Vector3;
|
|
3921
4008
|
onEnable(): void;
|
|
3922
4009
|
private create;
|
|
3923
4010
|
protected abstract createJoint(self: Rigidbody, other: Rigidbody): any;
|
|
@@ -3925,6 +4012,11 @@ declare module "engine-components/Joints" {
|
|
|
3925
4012
|
export class FixedJoint extends Joint {
|
|
3926
4013
|
protected createJoint(self: Rigidbody, other: Rigidbody): void;
|
|
3927
4014
|
}
|
|
4015
|
+
export class HingeJoint extends Joint {
|
|
4016
|
+
anchor?: Vector3;
|
|
4017
|
+
axis?: Vector3;
|
|
4018
|
+
protected createJoint(self: Rigidbody, other: Rigidbody): void;
|
|
4019
|
+
}
|
|
3928
4020
|
}
|
|
3929
4021
|
declare module "engine-components/Light" {
|
|
3930
4022
|
import { Behaviour } from "engine-components/Component";
|
|
@@ -5453,6 +5545,7 @@ declare module "engine-components/codegen/components" {
|
|
|
5453
5545
|
export { Interactable } from "engine-components/Interactable";
|
|
5454
5546
|
export { UsageMarker } from "engine-components/Interactable";
|
|
5455
5547
|
export { FixedJoint } from "engine-components/Joints";
|
|
5548
|
+
export { HingeJoint } from "engine-components/Joints";
|
|
5456
5549
|
export { Light } from "engine-components/Light";
|
|
5457
5550
|
export { LODModel } from "engine-components/LODGroup";
|
|
5458
5551
|
export { LODGroup } from "engine-components/LODGroup";
|