@needle-tools/engine 4.4.0-ci.1 → 4.4.2
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 +67 -0
- package/dist/assets/generateMeshBVH.worker-b7788939.js +25 -0
- package/dist/needle-engine.bundle.js +7043 -6766
- package/dist/needle-engine.bundle.light.js +7205 -6928
- package/dist/needle-engine.bundle.light.min.js +169 -139
- package/dist/needle-engine.bundle.light.umd.cjs +173 -143
- package/dist/needle-engine.bundle.min.js +169 -139
- package/dist/needle-engine.bundle.umd.cjs +172 -142
- package/dist/needle-engine.js +468 -467
- package/dist/needle-engine.light.js +468 -467
- package/dist/needle-engine.light.min.js +1 -1
- package/dist/needle-engine.light.umd.cjs +1 -1
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/vendor.js +5108 -5122
- package/dist/vendor.light.js +5108 -5122
- package/dist/vendor.light.min.js +84 -84
- package/dist/vendor.light.umd.cjs +78 -78
- package/dist/vendor.min.js +84 -84
- package/dist/vendor.umd.cjs +78 -78
- package/lib/engine/codegen/register_types.js +2 -0
- package/lib/engine/codegen/register_types.js.map +1 -1
- package/lib/engine/engine_addressables.js.map +1 -1
- package/lib/engine/engine_components.js +3 -1
- package/lib/engine/engine_components.js.map +1 -1
- package/lib/engine/engine_context.d.ts +141 -14
- package/lib/engine/engine_context.js +164 -26
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_element.js +12 -10
- package/lib/engine/engine_element.js.map +1 -1
- package/lib/engine/engine_gameobject.js +5 -0
- package/lib/engine/engine_gameobject.js.map +1 -1
- package/lib/engine/engine_license.d.ts +2 -0
- package/lib/engine/engine_license.js +103 -62
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_networking_blob.js +40 -24
- package/lib/engine/engine_networking_blob.js.map +1 -1
- package/lib/engine/engine_physics_rapier.js +10 -9
- package/lib/engine/engine_physics_rapier.js.map +1 -1
- package/lib/engine/engine_serialization_core.js +6 -2
- package/lib/engine/engine_serialization_core.js.map +1 -1
- package/lib/engine/engine_utils_screenshot.js +1 -1
- package/lib/engine/engine_utils_screenshot.js.map +1 -1
- package/lib/engine/js-extensions/RGBAColor.d.ts +1 -0
- package/lib/engine/js-extensions/RGBAColor.js +56 -7
- package/lib/engine/js-extensions/RGBAColor.js.map +1 -1
- package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +4 -3
- package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +6 -6
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +4 -0
- package/lib/engine/webcomponents/needle menu/needle-menu.js +13 -2
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/xr/NeedleXRController.js +2 -3
- package/lib/engine/xr/NeedleXRController.js.map +1 -1
- package/lib/engine/xr/NeedleXRSession.js +12 -12
- package/lib/engine/xr/NeedleXRSession.js.map +1 -1
- package/lib/engine-components/AudioSource.js +7 -0
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/Camera.js +18 -12
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/CameraUtils.js +8 -14
- package/lib/engine-components/CameraUtils.js.map +1 -1
- package/lib/engine-components/GroundProjection.js +1 -1
- package/lib/engine-components/GroundProjection.js.map +1 -1
- package/lib/engine-components/NeedleMenu.js +1 -1
- package/lib/engine-components/NeedleMenu.js.map +1 -1
- package/lib/engine-components/OrbitControls.js +3 -1
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/ReflectionProbe.d.ts +1 -0
- package/lib/engine-components/ReflectionProbe.js +16 -9
- package/lib/engine-components/ReflectionProbe.js.map +1 -1
- package/lib/engine-components/SceneSwitcher.js +28 -7
- package/lib/engine-components/SceneSwitcher.js.map +1 -1
- package/lib/engine-components/SyncedTransform.d.ts +6 -0
- package/lib/engine-components/SyncedTransform.js +10 -5
- package/lib/engine-components/SyncedTransform.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/export/usdz/extensions/USDZUI.js +2 -1
- package/lib/engine-components/export/usdz/extensions/USDZUI.js.map +1 -1
- package/lib/engine-components/ui/BaseUIComponent.d.ts +0 -1
- package/lib/engine-components/ui/BaseUIComponent.js +1 -1
- package/lib/engine-components/ui/BaseUIComponent.js.map +1 -1
- package/lib/engine-components/ui/EventSystem.js +1 -1
- package/lib/engine-components/ui/EventSystem.js.map +1 -1
- package/lib/engine-components/ui/Graphic.js +1 -0
- package/lib/engine-components/ui/Graphic.js.map +1 -1
- package/lib/engine-components/ui/RaycastUtils.js +1 -1
- package/lib/engine-components/ui/RaycastUtils.js.map +1 -1
- package/lib/engine-components/ui/RectTransform.d.ts +2 -2
- package/lib/engine-components/ui/RectTransform.js +9 -6
- package/lib/engine-components/ui/RectTransform.js.map +1 -1
- package/lib/engine-components/ui/Symbols.d.ts +1 -0
- package/lib/engine-components/ui/Symbols.js +2 -0
- package/lib/engine-components/ui/Symbols.js.map +1 -0
- package/lib/engine-components/ui/Utils.js +1 -1
- package/lib/engine-components/ui/Utils.js.map +1 -1
- package/lib/engine-components/utils/EnvironmentScene.d.ts +1 -1
- package/lib/engine-components/utils/EnvironmentScene.js +1 -1
- package/lib/engine-components/utils/EnvironmentScene.js.map +1 -1
- package/package.json +3 -3
- package/plugins/common/license.js +115 -27
- package/plugins/types/userconfig.d.ts +8 -0
- package/plugins/vite/build-pipeline.js +1 -1
- package/plugins/vite/defines.js +3 -1
- package/plugins/vite/dependencies.js +23 -4
- package/plugins/vite/facebook-instant-games.js +7 -4
- package/plugins/vite/index.js +1 -1
- package/plugins/vite/license.js +2 -1
- package/src/engine/codegen/register_types.ts +2 -0
- package/src/engine/engine_addressables.ts +3 -2
- package/src/engine/engine_components.ts +2 -1
- package/src/engine/engine_context.ts +169 -33
- package/src/engine/engine_element.ts +10 -9
- package/src/engine/engine_gameobject.ts +7 -0
- package/src/engine/engine_license.ts +116 -67
- package/src/engine/engine_networking_blob.ts +47 -26
- package/src/engine/engine_physics_rapier.ts +10 -12
- package/src/engine/engine_serialization_core.ts +6 -1
- package/src/engine/engine_utils_screenshot.ts +1 -1
- package/src/engine/js-extensions/RGBAColor.ts +59 -8
- package/src/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +6 -6
- package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +6 -6
- package/src/engine/webcomponents/needle menu/needle-menu.ts +13 -2
- package/src/engine/xr/NeedleXRController.ts +2 -3
- package/src/engine/xr/NeedleXRSession.ts +12 -12
- package/src/engine-components/AudioSource.ts +8 -3
- package/src/engine-components/Camera.ts +34 -22
- package/src/engine-components/CameraUtils.ts +8 -16
- package/src/engine-components/GroundProjection.ts +1 -1
- package/src/engine-components/NeedleMenu.ts +1 -1
- package/src/engine-components/OrbitControls.ts +2 -1
- package/src/engine-components/ReflectionProbe.ts +15 -8
- package/src/engine-components/SceneSwitcher.ts +28 -11
- package/src/engine-components/SyncedTransform.ts +11 -6
- package/src/engine-components/codegen/components.ts +1 -0
- package/src/engine-components/export/usdz/extensions/USDZUI.ts +2 -2
- package/src/engine-components/ui/BaseUIComponent.ts +1 -1
- package/src/engine-components/ui/EventSystem.ts +1 -1
- package/src/engine-components/ui/Graphic.ts +1 -1
- package/src/engine-components/ui/RaycastUtils.ts +1 -1
- package/src/engine-components/ui/RectTransform.ts +10 -7
- package/src/engine-components/ui/Symbols.ts +2 -0
- package/src/engine-components/ui/Utils.ts +2 -1
- package/src/engine-components/utils/EnvironmentScene.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,73 @@ 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
|
+
## [4.4.2] - 2025-04-24
|
|
8
|
+
- Fix: Vite license server timeout
|
|
9
|
+
- Fix: Vite `manualChunks` should not be declared if `rollupOutput.inlineDynamicImports` is set to true
|
|
10
|
+
|
|
11
|
+
## [4.4.0] - 2025-04-17
|
|
12
|
+
**Added**
|
|
13
|
+
- Add: The needle-engine web-component `contactshadows` attribute now allows you to specify a factor for controlling the darkness/lightness. E.g. `<needle-engine contactshadows="1">` will make the shadows appear darker vs. `<needle-engine contactshadows=".2">` will make the contact shadow appear lighter.
|
|
14
|
+
- Add: The needle-engine web-component does now support transparency for `background-color`. For example: `rgba(255, 255, 100, .5)` or `#ffdddd99` or `transparent` are valid values: `<needle-engine background-color="rgba(255, 255, 100, .5)" />`
|
|
15
|
+
- Add: `ObjectUtils.createPrimitive()` now supports scale as array
|
|
16
|
+
e.g. `ObjectUtils.createPrimitive("Cube", { scale: [1, .25, 1] } );`
|
|
17
|
+
- Add: Input `getGamepad(<index>)` function to query a connected gamepad. Example: `this.context.input.getGamepad()`
|
|
18
|
+
- Add: `lookAtScreenPoint()` function which allows 3D object to look at points in 2D screen coordinates (e.g. your mouse position).
|
|
19
|
+
**Example Component that makes the object look at the mouse**
|
|
20
|
+
```ts
|
|
21
|
+
import { Behaviour, lookAtScreenPoint } from "@needle-tools/engine";
|
|
22
|
+
|
|
23
|
+
export class LookAtMouse extends Behaviour {
|
|
24
|
+
update() {
|
|
25
|
+
lookAtScreenPoint(this.gameObject, this.context.input.mousePosition, this.context.mainCamera);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
- Add: Default environment lighting. If you don't configure any environment-image needle engine will now create a default scene to light your objects. Previously the scene was just black when the loaded model didn't contain any lighting information.
|
|
30
|
+
- Add: SyncedTransform does now also sync scale changes
|
|
31
|
+
- Add: SyncedTransform `freeOwnership()` method
|
|
32
|
+
- Add: ReflectionProbe bounding box intersection check to automatically apply reflections to object's in a specific area (handled by the Renderer component)
|
|
33
|
+
- Add: `devicePixelRatio` option on Needle Context. This option controls the window.devicePixelRatio set on the renderer by Needle Engine (default `auto`). It can be set to `manual` to disable this behaviour or a custom number which will then be set on the renderer or composer.
|
|
34
|
+
|
|
35
|
+
**Fixed**
|
|
36
|
+
- Fix: Implicit camera did not automatically set to skybox when using `background-image`. E.g. `<needle-engine background-image="<url>">
|
|
37
|
+
- Fix: Tonemapping falsely set tonemappingEsposure to undefined causing a black screen
|
|
38
|
+
- Fix: `background-color` attribute was not always applied. E.g. `<needle-engine background-color="#ff3333">`
|
|
39
|
+
- Fix: `screenshot()` checks if XR is presenting
|
|
40
|
+
- Fix: Issue where MeshBVH worker import breaks for projects where the needle-engine vite plugins are not added to the plugins list
|
|
41
|
+
- Fix: SceneSwitcher regression with `Object3D` objects in scenes array
|
|
42
|
+
- Fix: SceneSwitcher preload was not using three.js FileLoader to re-use three's caching system
|
|
43
|
+
- Fix: GroundProjection regression where background blurriness was hardcoded
|
|
44
|
+
- Fix: RenderTexture regression where deserialization was not properly handled anymore
|
|
45
|
+
- Fix: OrbitControls regression where forward direction in `setCameraAndLookTarget` was inverted
|
|
46
|
+
- Fix: Physics bug where negative box collider scales were not correctly handled in all cases causing Rapier to break
|
|
47
|
+
- Fix: UI instantiate bug where three-mesh-ui `clone` method was not working and UI that was already in the scene could not be duplicated because of that.
|
|
48
|
+
- Fix: Vite license plugin not waiting for the CLI process to start
|
|
49
|
+
- Fix: Vite improve license checks in CI environments (e.g. when running via a Github Action).
|
|
50
|
+
- Fix: Vite plugins for running in CI environment
|
|
51
|
+
- Fix: Vite `manualChunks` are not defined when `preserveModules` is set to true
|
|
52
|
+
|
|
53
|
+
**Changed**
|
|
54
|
+
- Change: License check aborts now faster instead of retrying when connection is actively refused
|
|
55
|
+
- Change: OrbitControls `autoTarget` does now automatically update the look at target after panning and not when rotating the camera (previously the target would be updated after any input but this resultet in undesireable behaviour when rotating around objects)
|
|
56
|
+
- Change: When no background-color is defined by either the loaded scene or by a `background-color` attribute then the default scene background color respects the user's accessibility setting for `prefer-dark` or `prefer-light`. This means that the background color will be set to a default light or dark value.
|
|
57
|
+
- Change: Scene background color or image set on `<needle-engine>` are not overridden anymore by the camera component.
|
|
58
|
+
- Change: Hide Needle logo automatically when using Needle Engine with a license
|
|
59
|
+
|
|
60
|
+
## [4.4.0-beta.9] - 2025-04-07
|
|
61
|
+
- Add: `<needle-engine background-color="#ffdddd55">` does now support transparency. For example: `rgba(255, 255, 100, .5)` or `#ffdddd99` or `transparent` are valid values.
|
|
62
|
+
- Add: SyncedTransform `freeOwnership()` method
|
|
63
|
+
- Add: ReflectionProbe does now check boundingbox intersection
|
|
64
|
+
- Add: `devicePixelRatio` option on Needle Context. This option controls the window.devicePixelRatio set on the renderer by Needle Engine (default `auto`). It can be set to `manual` to disable this behaviour or a custom number which will then be set on the renderer or composer.
|
|
65
|
+
- Change: Scene background color or image set on `<needle-engine>` are not overridden anymore by the camera component.
|
|
66
|
+
- Change: Hide Needle logo automatically when using Needle Engine with a license
|
|
67
|
+
- Fix: Improve license checks in CI environments (e.g. when running via a Github Action).
|
|
68
|
+
- Fix: Vite plugins for running in CI environment
|
|
69
|
+
- Fix: Vite `manualChunks` are not defined when `preserveModules` is set to true
|
|
70
|
+
- Fix: `screenshot()` checks if XR is presenting
|
|
71
|
+
- Fix: Issue where MeshBVH worker import breaks for projects where the needle-engine vite plugins are not added to the plugins list
|
|
72
|
+
- Fix: Vite license plugin not waiting for the CLI process to start
|
|
73
|
+
|
|
7
74
|
## [4.4.0-beta] - 2025-03-28
|
|
8
75
|
- Add: `ObjectUtils.createPrimitive()` now supports scale as array
|
|
9
76
|
e.g. `ObjectUtils.createPrimitive("Cube", { scale: [1, .25, 1] } );`
|