@needle-tools/engine 2.57.0-pre → 2.58.1-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 +8 -0
- package/dist/needle-engine.d.ts +43 -4
- package/dist/needle-engine.js +240 -240
- package/dist/needle-engine.js.map +4 -4
- package/dist/needle-engine.min.js +26 -26
- package/dist/needle-engine.min.js.map +4 -4
- package/dist/needle-engine.tsbuildinfo +1 -1
- package/lib/engine/codegen/register_types.js +2 -0
- package/lib/engine/codegen/register_types.js.map +1 -1
- package/lib/engine/engine.d.ts +1 -0
- package/lib/engine/engine.js +1 -0
- package/lib/engine/engine.js.map +1 -1
- package/lib/engine/engine_hot_reload.d.ts +3 -0
- package/lib/engine/engine_hot_reload.js +168 -0
- package/lib/engine/engine_hot_reload.js.map +1 -0
- package/lib/engine/engine_input.js +1 -1
- package/lib/engine/engine_mainloop_utils.d.ts +3 -0
- package/lib/engine/engine_mainloop_utils.js +61 -0
- package/lib/engine/engine_mainloop_utils.js.map +1 -1
- package/lib/engine/engine_scenetools.js +3 -0
- package/lib/engine/engine_scenetools.js.map +1 -1
- package/lib/engine/engine_setup.js +42 -36
- package/lib/engine/engine_setup.js.map +1 -1
- package/lib/engine-components/Fog.d.ts +20 -0
- package/lib/engine-components/Fog.js +61 -0
- package/lib/engine-components/Fog.js.map +1 -0
- package/lib/engine-components/Renderer.d.ts +7 -2
- package/lib/engine-components/Renderer.js +62 -2
- package/lib/engine-components/Renderer.js.map +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/lib/engine-components/ui/EventSystem.d.ts +1 -1
- package/lib/engine-components/ui/EventSystem.js +25 -10
- package/lib/engine-components/ui/EventSystem.js.map +1 -1
- package/lib/engine-components/ui/PointerEvents.d.ts +3 -1
- package/lib/engine-components/ui/PointerEvents.js +1 -0
- package/lib/engine-components/ui/PointerEvents.js.map +1 -1
- package/lib/engine-components/ui/Raycaster.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/engine/codegen/register_types.js +2 -0
- package/src/engine/engine.ts +2 -0
- package/src/engine/engine_hot_reload.ts +186 -0
- package/src/engine/engine_input.ts +1 -1
- package/src/engine/engine_mainloop_utils.ts +61 -1
- package/src/engine/engine_scenetools.ts +3 -0
- package/src/engine/engine_setup.ts +40 -36
- package/src/engine-components/Fog.ts +60 -0
- package/src/engine-components/Renderer.ts +59 -2
- package/src/engine-components/codegen/components.ts +1 -0
- package/src/engine-components/ui/EventSystem.ts +30 -15
- package/src/engine-components/ui/PointerEvents.ts +7 -4
- package/src/engine-components/ui/Raycaster.ts +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ 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.58.1-pre] - 2023-01-09
|
|
8
|
+
- Add: Prewarm rendering of newly loaded objects to remove lag/jitter when they become visible for the first time
|
|
9
|
+
- Change: renderer now warns when sharedMaterials have missing entries. It then tries to remap those values when accessing them by index (e.g. when another component has a material index serialized and relies on that index to be pointing to the correct object)
|
|
10
|
+
|
|
11
|
+
## [2.58.0-pre] - 2023-01-09
|
|
12
|
+
- Add: EventSystem input events (e.g. IPointerClick) are now invoked for all buttons (e.g. right click)
|
|
13
|
+
- Add: Hot reload for components
|
|
14
|
+
|
|
7
15
|
## [2.57.0-pre] - 2023-01-07
|
|
8
16
|
- Remove: Meshline dependency
|
|
9
17
|
- Fix: Testrunner Rigidbody import error
|
package/dist/needle-engine.d.ts
CHANGED
|
@@ -700,6 +700,9 @@ declare module "engine/engine_mainloop_utils" {
|
|
|
700
700
|
export function removeScriptFromContext(script: any, context: Context): void;
|
|
701
701
|
export function updateIsActive(obj?: Object3D): void;
|
|
702
702
|
export function updateActiveInHierarchyWithoutEventCall(go: THREE.Object3D): void;
|
|
703
|
+
export function registerPrewarmObject(obj: Object3D, context: Context): void;
|
|
704
|
+
export function runPrewarm(context: Context): void;
|
|
705
|
+
export function clearPrewarmList(context: Context): void;
|
|
703
706
|
}
|
|
704
707
|
declare module "engine/engine_networking_types" {
|
|
705
708
|
export interface IModel {
|
|
@@ -3653,6 +3656,7 @@ declare module "engine-components/avatar/Avatar_Brain_LookAt" {
|
|
|
3653
3656
|
}
|
|
3654
3657
|
}
|
|
3655
3658
|
declare module "engine-components/ui/PointerEvents" {
|
|
3659
|
+
import { Input } from "engine/engine_input";
|
|
3656
3660
|
export interface IInputEventArgs {
|
|
3657
3661
|
get used(): boolean;
|
|
3658
3662
|
Use(): void;
|
|
@@ -3662,8 +3666,9 @@ declare module "engine-components/ui/PointerEvents" {
|
|
|
3662
3666
|
used: boolean;
|
|
3663
3667
|
Use(): void;
|
|
3664
3668
|
StopPropagation(): void;
|
|
3665
|
-
inputSource: any;
|
|
3669
|
+
inputSource: Input | any;
|
|
3666
3670
|
object: THREE.Object3D;
|
|
3671
|
+
pointerId: number | undefined;
|
|
3667
3672
|
isDown: boolean | undefined;
|
|
3668
3673
|
isUp: boolean | undefined;
|
|
3669
3674
|
isPressed: boolean | undefined;
|
|
@@ -3865,9 +3870,9 @@ declare module "engine-components/ui/EventSystem" {
|
|
|
3865
3870
|
private _selectStartFn?;
|
|
3866
3871
|
private _selectEndFn?;
|
|
3867
3872
|
private _selectUpdateFn?;
|
|
3873
|
+
private _onBeforeUpdateFn?;
|
|
3868
3874
|
onEnable(): void;
|
|
3869
3875
|
onDisable(): void;
|
|
3870
|
-
onPointerDown(): void;
|
|
3871
3876
|
private lastPointerEvent;
|
|
3872
3877
|
private objectsHoveredThisFrame;
|
|
3873
3878
|
private objectsHoveredLastFrame;
|
|
@@ -3968,7 +3973,7 @@ declare module "engine/js-extensions/Layers" {
|
|
|
3968
3973
|
declare module "engine-components/Renderer" {
|
|
3969
3974
|
import { Behaviour } from "engine-components/Component";
|
|
3970
3975
|
import * as THREE from "three";
|
|
3971
|
-
import { Mesh, Object3D, Texture } from "three";
|
|
3976
|
+
import { Material, Mesh, Object3D, Texture } from "three";
|
|
3972
3977
|
import { IRenderer, ISharedMaterials } from "engine/engine_types";
|
|
3973
3978
|
export { InstancingUtil } from "engine/engine_instancing";
|
|
3974
3979
|
export enum ReflectionProbeUsage {
|
|
@@ -3991,9 +3996,12 @@ declare module "engine-components/Renderer" {
|
|
|
3991
3996
|
[num: number]: THREE.Material;
|
|
3992
3997
|
private _renderer;
|
|
3993
3998
|
private _targets;
|
|
3999
|
+
private _indexMapMaxIndex?;
|
|
4000
|
+
private _indexMap?;
|
|
3994
4001
|
is(renderer: Renderer): boolean;
|
|
3995
|
-
constructor(renderer: Renderer);
|
|
4002
|
+
constructor(renderer: Renderer, originalMaterials: Material[]);
|
|
3996
4003
|
get length(): number;
|
|
4004
|
+
private resolveIndex;
|
|
3997
4005
|
private setMaterial;
|
|
3998
4006
|
private getMaterial;
|
|
3999
4007
|
}
|
|
@@ -4020,6 +4028,8 @@ declare module "engine-components/Renderer" {
|
|
|
4020
4028
|
/**@deprecated please use sharedMaterial */
|
|
4021
4029
|
set material(mat: THREE.Material);
|
|
4022
4030
|
private _sharedMaterials;
|
|
4031
|
+
private _originalMaterials;
|
|
4032
|
+
private set sharedMaterials(value);
|
|
4023
4033
|
get sharedMaterials(): SharedMaterialArray;
|
|
4024
4034
|
static get shouldSuppressInstancing(): string | number | boolean;
|
|
4025
4035
|
private _lightmapTextureOverride;
|
|
@@ -5336,6 +5346,28 @@ declare module "engine-components/FlyControls" {
|
|
|
5336
5346
|
update(): void;
|
|
5337
5347
|
}
|
|
5338
5348
|
}
|
|
5349
|
+
declare module "engine-components/Fog" {
|
|
5350
|
+
import { Behaviour } from "engine-components/Component";
|
|
5351
|
+
import { Color, Fog as Fog3 } from "three";
|
|
5352
|
+
export enum FogMode {
|
|
5353
|
+
Linear = 1,
|
|
5354
|
+
Exponential = 2,
|
|
5355
|
+
ExponentialSquared = 3
|
|
5356
|
+
}
|
|
5357
|
+
export class Fog extends Behaviour {
|
|
5358
|
+
get fog(): Fog3;
|
|
5359
|
+
get mode(): FogMode;
|
|
5360
|
+
set near(value: number);
|
|
5361
|
+
get near(): number;
|
|
5362
|
+
set far(value: number);
|
|
5363
|
+
get far(): number;
|
|
5364
|
+
set color(value: Color);
|
|
5365
|
+
get color(): Color;
|
|
5366
|
+
private _fog?;
|
|
5367
|
+
onEnable(): void;
|
|
5368
|
+
onDisable(): void;
|
|
5369
|
+
}
|
|
5370
|
+
}
|
|
5339
5371
|
declare module "include/three/EXT_mesh_gpu_instancing_exporter" {
|
|
5340
5372
|
export default class GLTFMeshGPUInstancingExtension {
|
|
5341
5373
|
constructor(writer: any);
|
|
@@ -6416,6 +6448,7 @@ declare module "engine-components/codegen/components" {
|
|
|
6416
6448
|
export { FieldWithDefault } from "engine-components/Renderer";
|
|
6417
6449
|
export { FixedJoint } from "engine-components/Joints";
|
|
6418
6450
|
export { FlyControls } from "engine-components/FlyControls";
|
|
6451
|
+
export { Fog } from "engine-components/Fog";
|
|
6419
6452
|
export { GltfExport } from "engine-components/export/gltf/GltfExport";
|
|
6420
6453
|
export { GltfExportBox } from "engine-components/export/gltf/GltfExport";
|
|
6421
6454
|
export { Gradient } from "engine-components/ParticleSystemModules";
|
|
@@ -6538,7 +6571,13 @@ declare module "needle-engine" {
|
|
|
6538
6571
|
export * from "engine-components/codegen/components";
|
|
6539
6572
|
export * from "engine-components/js-extensions/Object3D";
|
|
6540
6573
|
}
|
|
6574
|
+
declare module "engine/engine_hot_reload" {
|
|
6575
|
+
export function register(instance: object): void;
|
|
6576
|
+
export function unregister(instance: object): void;
|
|
6577
|
+
export function applyChanges(newModule: any): boolean;
|
|
6578
|
+
}
|
|
6541
6579
|
declare module "engine/engine" {
|
|
6580
|
+
import "engine/engine_hot_reload";
|
|
6542
6581
|
import "engine/tests/test_utils";
|
|
6543
6582
|
const engine: any;
|
|
6544
6583
|
export { engine as engine };
|