@needle-tools/engine 2.58.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 CHANGED
@@ -4,6 +4,10 @@ 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
+
7
11
  ## [2.58.0-pre] - 2023-01-09
8
12
  - Add: EventSystem input events (e.g. IPointerClick) are now invoked for all buttons (e.g. right click)
9
13
  - Add: Hot reload for components
@@ -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 {
@@ -3970,7 +3973,7 @@ declare module "engine/js-extensions/Layers" {
3970
3973
  declare module "engine-components/Renderer" {
3971
3974
  import { Behaviour } from "engine-components/Component";
3972
3975
  import * as THREE from "three";
3973
- import { Mesh, Object3D, Texture } from "three";
3976
+ import { Material, Mesh, Object3D, Texture } from "three";
3974
3977
  import { IRenderer, ISharedMaterials } from "engine/engine_types";
3975
3978
  export { InstancingUtil } from "engine/engine_instancing";
3976
3979
  export enum ReflectionProbeUsage {
@@ -3993,9 +3996,12 @@ declare module "engine-components/Renderer" {
3993
3996
  [num: number]: THREE.Material;
3994
3997
  private _renderer;
3995
3998
  private _targets;
3999
+ private _indexMapMaxIndex?;
4000
+ private _indexMap?;
3996
4001
  is(renderer: Renderer): boolean;
3997
- constructor(renderer: Renderer);
4002
+ constructor(renderer: Renderer, originalMaterials: Material[]);
3998
4003
  get length(): number;
4004
+ private resolveIndex;
3999
4005
  private setMaterial;
4000
4006
  private getMaterial;
4001
4007
  }
@@ -4022,6 +4028,8 @@ declare module "engine-components/Renderer" {
4022
4028
  /**@deprecated please use sharedMaterial */
4023
4029
  set material(mat: THREE.Material);
4024
4030
  private _sharedMaterials;
4031
+ private _originalMaterials;
4032
+ private set sharedMaterials(value);
4025
4033
  get sharedMaterials(): SharedMaterialArray;
4026
4034
  static get shouldSuppressInstancing(): string | number | boolean;
4027
4035
  private _lightmapTextureOverride;