@needle-tools/engine 4.4.0-alpha.4 → 4.4.0-beta
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 +19 -1
- package/dist/needle-engine.bundle.js +5067 -4828
- package/dist/needle-engine.bundle.light.js +5062 -4823
- package/dist/needle-engine.bundle.light.min.js +129 -116
- package/dist/needle-engine.bundle.light.umd.cjs +125 -112
- package/dist/needle-engine.bundle.min.js +129 -116
- package/dist/needle-engine.bundle.umd.cjs +127 -114
- package/dist/needle-engine.d.ts +9 -9
- package/dist/needle-engine.js +91 -90
- package/dist/needle-engine.light.d.ts +9 -9
- package/dist/needle-engine.light.js +91 -90
- 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/three.js +1 -0
- package/dist/three.light.js +1 -0
- package/dist/three.light.min.js +16 -16
- package/dist/three.light.umd.cjs +15 -15
- package/dist/three.min.js +16 -16
- package/dist/three.umd.cjs +15 -15
- package/lib/engine/engine_input.d.ts +7 -0
- package/lib/engine/engine_input.js +12 -0
- package/lib/engine/engine_input.js.map +1 -1
- package/lib/engine/engine_serialization_decorator.js +4 -0
- package/lib/engine/engine_serialization_decorator.js.map +1 -1
- package/lib/engine/engine_three_utils.d.ts +26 -1
- package/lib/engine/engine_three_utils.js +43 -0
- package/lib/engine/engine_three_utils.js.map +1 -1
- package/lib/engine/engine_utils_format.js +11 -5
- package/lib/engine/engine_utils_format.js.map +1 -1
- package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +1 -0
- package/lib/engine/webcomponents/needle menu/needle-menu.js +3 -3
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine-components/Camera.d.ts +2 -2
- package/lib/engine-components/Camera.js +4 -6
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/CameraUtils.js +32 -13
- package/lib/engine-components/CameraUtils.js.map +1 -1
- package/lib/engine-components/Component.d.ts +4 -1
- package/lib/engine-components/Component.js +4 -1
- package/lib/engine-components/Component.js.map +1 -1
- package/lib/engine-components/ContactShadows.js +8 -2
- package/lib/engine-components/ContactShadows.js.map +1 -1
- package/lib/engine-components/OrbitControls.d.ts +3 -0
- package/lib/engine-components/OrbitControls.js +34 -10
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/SyncedTransform.d.ts +3 -2
- package/lib/engine-components/SyncedTransform.js +28 -18
- package/lib/engine-components/SyncedTransform.js.map +1 -1
- package/lib/engine-components/utils/EnvironmentScene.d.ts +5 -0
- package/lib/engine-components/utils/EnvironmentScene.js +206 -0
- package/lib/engine-components/utils/EnvironmentScene.js.map +1 -0
- package/package.json +1 -1
- package/src/engine/engine_input.ts +13 -0
- package/src/engine/engine_serialization_decorator.ts +4 -0
- package/src/engine/engine_three_utils.ts +52 -1
- package/src/engine/engine_utils_format.ts +13 -5
- package/src/engine/webcomponents/needle menu/needle-menu.ts +3 -3
- package/src/engine-components/Camera.ts +9 -6
- package/src/engine-components/CameraUtils.ts +35 -13
- package/src/engine-components/Component.ts +5 -2
- package/src/engine-components/ContactShadows.ts +8 -2
- package/src/engine-components/OrbitControls.ts +35 -10
- package/src/engine-components/SyncedTransform.ts +37 -25
- package/src/engine-components/utils/EnvironmentScene.ts +246 -0
- package/src/engine/webcomponents/needle menu/dist/needle-menu.js +0 -662
package/CHANGELOG.md
CHANGED
|
@@ -4,12 +4,30 @@ 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.0-
|
|
7
|
+
## [4.4.0-beta] - 2025-03-28
|
|
8
8
|
- Add: `ObjectUtils.createPrimitive()` now supports scale as array
|
|
9
9
|
e.g. `ObjectUtils.createPrimitive("Cube", { scale: [1, .25, 1] } );`
|
|
10
|
+
- Add: Input `getGamepad(<index>)` function to query a connected gamepad. Example: `this.context.input.getGamepad()`
|
|
11
|
+
- Add: `lookAtScreenPoint()` function which allows 3D object to look at points in 2D screen coordinates (e.g. your mouse position).
|
|
12
|
+
**Example Component that makes the object look at the mouse**
|
|
13
|
+
```ts
|
|
14
|
+
import { Behaviour, lookAtScreenPoint } from "@needle-tools/engine";
|
|
15
|
+
|
|
16
|
+
export class LookAtMouse extends Behaviour {
|
|
17
|
+
update() {
|
|
18
|
+
lookAtScreenPoint(this.gameObject, this.context.input.mousePosition, this.context.mainCamera);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
- Add: SyncedTransform does now also sync scale changes
|
|
23
|
+
- 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.
|
|
24
|
+
- Add: The `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.
|
|
10
25
|
- Fix: Implicit camera did not automatically set to skybox when using `background-image`. E.g. `<needle-engine background-image="<url>">
|
|
11
26
|
- Fix: Tonemapping falsely set tonemappingEsposure to undefined causing a black screen
|
|
27
|
+
- Fix: `background-color` attribute was not always applied. E.g. `<needle-engine background-color="#ff3333">`
|
|
12
28
|
- Change: License check aborts now faster instead of retrying when connection is actively refused
|
|
29
|
+
- 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)
|
|
30
|
+
- 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.
|
|
13
31
|
|
|
14
32
|
## [4.3.2] - 2025-03-20
|
|
15
33
|
#### Added
|