Skip to content

Releases: needle-tools/needle-engine-support

4.4.3

29 Apr 13:33
Compare
Choose a tag to compare

Needle Engine

  • Add: Support for getKeyDown, getKeyPressed and getKeyUp to pass in key name to check the state of keyboard input, e.g. context.getKeyDown(<key>)
  • Add: License validation for webpack (nextjs) via access token or teamid. The needleNext plugin does now handle the license for passed in team or access tokens.
    For example the next.config.js can be modified like so ... }, { modules: { webpack }, license: {team: "needle"} }) to pass in the name of a team (or a Needle Cloud access token).
  • Change: License checks will now read the NEEDLE_CLOUD_TOKEN environment variable if no access token is provided.
  • Fix: SyncedTransform fastmode lerp
  • Fix: Vite license server timeout
  • Fix: Vite manualChunks should not be declared if rollupOutput.inlineDynamicImports is set to true
  • Fix: OrbitControls regression when calling setCameraAndLookTarget with a Camera object (or transform) where the forward direction (+Z) did not match the camera's look/render direction (-Z)

Unity Integration

  • Improve Needle Cloud Asset error handling and loading messages

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.4.0

17 Apr 15:06
9070ec4
Compare
Choose a tag to compare

Needle Engine

Added

  • 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.
  • 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)" />
  • Add: ObjectUtils.createPrimitive() now supports scale as array
    e.g. ObjectUtils.createPrimitive("Cube", { scale: [1, .25, 1] } );
  • Add: Input getGamepad(<index>) function to query a connected gamepad. Example: this.context.input.getGamepad()
  • Add: lookAtScreenPoint() function which allows 3D object to look at points in 2D screen coordinates (e.g. your mouse position).
    Example Component that makes the object look at the mouse
    import { Behaviour, lookAtScreenPoint } from "@needle-tools/engine";
    
    export class LookAtMouse extends Behaviour {
      update() {
        lookAtScreenPoint(this.gameObject, this.context.input.mousePosition, this.context.mainCamera);
      }
    }
  • 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.
  • Add: SyncedTransform does now also sync scale changes
  • Add: SyncedTransform freeOwnership() method
  • Add: ReflectionProbe bounding box intersection check to automatically apply reflections to object's in a specific area (handled by the Renderer component)
  • 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.

Fixed

  • Fix: Implicit camera did not automatically set to skybox when using background-image. E.g. `
  • Fix: Tonemapping falsely set tonemappingEsposure to undefined causing a black screen
  • Fix: background-color attribute was not always applied. E.g. <needle-engine background-color="#ff3333">
  • Fix: screenshot() checks if XR is presenting
  • Fix: Issue where MeshBVH worker import breaks for projects where the needle-engine vite plugins are not added to the plugins list
  • Fix: SceneSwitcher regression with Object3D objects in scenes array
  • Fix: SceneSwitcher preload was not using three.js FileLoader to re-use three's caching system
  • Fix: GroundProjection regression where background blurriness was hardcoded
  • Fix: RenderTexture regression where deserialization was not properly handled anymore
  • Fix: OrbitControls regression where forward direction in setCameraAndLookTarget was inverted
  • Fix: Physics bug where negative box collider scales were not correctly handled in all cases causing Rapier to break
  • 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.
  • Fix: Vite license plugin not waiting for the CLI process to start
  • Fix: Vite improve license checks in CI environments (e.g. when running via a Github Action).
  • Fix: Vite plugins for running in CI environment
  • Fix: Vite manualChunks are not defined when preserveModules is set to true

Changed

  • Change: License check aborts now faster instead of retrying when connection is actively refused
  • 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)
  • 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.
  • Change: Scene background color or image set on <needle-engine> are not overridden anymore by the camera component.
  • Change: Hide Needle logo automatically when using Needle Engine with a license

Unity Integration

  • Add: Draco, KTX, and Meshopt as dependencies so that compressed Needle Cloud assets work out of the box
  • Add: Support for NPM package containing Unity package and improve npmdef functionality
  • Fix: Better SocketException handling
  • Fix: Improve log rendering
  • Fix: Improve retrieval of external process commandline data on OSX
  • Fix: EditorSync support for UIElement Vector2, Vector3, Vector4 and Color
  • Update: gltf-build-pipeline dependency
  • Update UnityGLTF dependency to 2.16.0-pre.3

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.4.0-beta.1

14 Apr 13:11
74cd375
Compare
Choose a tag to compare

Needle Engine

  • Add: <needle-engine background-color="#ffdddd55"> does now support transparency. For example: rgba(255, 255, 100, .5) or #ffdddd99 or transparent are valid values.
  • Add: SyncedTransform freeOwnership() method
  • Add: ReflectionProbe does now check boundingbox intersection
  • 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.
  • Change: Scene background color or image set on <needle-engine> are not overridden anymore by the camera component.
  • Change: Hide Needle logo automatically when using Needle Engine with a license
  • Fix: Improve license checks in CI environments (e.g. when running via a Github Action).
  • Fix: Vite plugins for running in CI environment
  • Fix: Vite manualChunks are not defined when preserveModules is set to true
  • Fix: screenshot() checks if XR is presenting
  • Fix: Issue where MeshBVH worker import breaks for projects where the needle-engine vite plugins are not added to the plugins list

Unity Integration

  • Add: draco, ktx, and meshopt as dependencies so that compressed Needle Cloud assets work out of the box

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.4.0-beta

28 Mar 13:25
Compare
Choose a tag to compare

Needle Engine

  • Add: ObjectUtils.createPrimitive() now supports scale as array
    e.g. ObjectUtils.createPrimitive("Cube", { scale: [1, .25, 1] } );
  • Add: Input getGamepad(index?: number) function to query a connected gamepad. Example: this.context.input.getGamepad()
  • Add: lookAtScreenPoint() function which allows 3D object to look at points in 2D screen coordinates (e.g. your mouse position).
    Example Component that makes the object look at the mouse
    import { Behaviour, lookAtScreenPoint } from "@needle-tools/engine";
    
    export class LookAtMouse extends Behaviour {
      update() {
        lookAtScreenPoint(this.gameObject, this.context.input.mousePosition, this.context.mainCamera);
      }
    }
  • Add: SyncedTransform does now also sync scale changes
  • Add: Default environment lighting. If you don't configure any environment-image via attribute, 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.
  • 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.
  • Fix: Implicit camera did not automatically set to skybox when using background-image. E.g. <needle-engine background-image="<url>">
  • Fix: Tonemapping falsely set tonemappingExposure to undefined causing a black screen
  • Fix: background-color attribute was not always applied. E.g. <needle-engine background-color="#ff3333">
  • Change: License check aborts now faster instead of retrying when connection is actively refused
  • 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.
  • Change: When no background color is defined by either the loaded scene or by the 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.

Unity Integration

  • Add: Support for NPM packages containing Unity package content, and improve npmdef functionality for linking to external packages
  • Fix: EditorSync support for UIElement Vector2, Vector3, Vector4 and Color
  • Update: gltf build pipeline dependency

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.3.2-beta.5

20 Mar 12:41
dfb775e
Compare
Choose a tag to compare

Needle Engine

  • Change: Improve Vite preload link injection into HTML head
  • Fix: Vite dependency-watcher plugin warning

Unity Integration

  • Fix: Console error in BuildWindow
  • Remove: NeedleEngineModules component and warning

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.3.2

20 Mar 13:27
dfb775e
Compare
Choose a tag to compare

Needle Engine

Added

  • Documentation for Gizmos API
  • this.context.time.fps returning the FPS for the current frame (for a more stable FPS value smoothedFps can be used)

Removed

  • Vite license plugin check does not support Node 16 anymore

Changes

  • Improve Vite preload link injection into HTML head
  • The PostprocessingManager component does now expose a multisampling property which is set to "auto" by default. By setting multisampling to a number it will force postprocessing to the configured samples.
  • Downloading of <needle-engine> attributes for skybox-image and environment-image does now start earlier. Previously it would only start loading the HDRi or EXR images after the root glTF file was finished loading. Now it will start downloading earlier which improves the time until the scene is ready to be displayed.

Fixed

  • Vite dependency-watcher plugin warning
  • Vite license check plugin is now using the latest Needle CLI version
  • Browser cache busting issue related to loading the root scene where range requests (e.g. when download urls without a file extension). This caused Chrome to remove files from the disc cache causing a re-download
  • Three.js core postprocessing effects support
  • Loading glTF files without any components (e.g. when directly downloaded from Sketchfab) was causing Needle Engine to falsely keep a reference to the loaded glTF structure.
  • Instancing issue where instancing did sometimes renderer wrong geometry when many objects where removed and added again and multiple different geometries were batched together. This was caused by a bug in the internal bucketing mechanism and has now been removed since it's not necessary anymore.

Unity Integration

Removed

  • NeedleEngineModules component and warning

Fixed

  • Console error in BuildWindow
  • Unity error when adding a new component caused by recent editor sync change
  • Handle NPM cache error when generating font assets
  • Update dialogue should not open automatically when using a stable package version and a new beta version is available
  • Unity EditorSync should work with GenericInspector instances in Unity versions that use VisualElements / UI Toolkit now
  • Context menu exporting a GLB file and selecting the compress option did not apply progressive optimization and not produce texture or mesh LODs.

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.3.2-beta.4

19 Mar 11:30
Compare
Choose a tag to compare

Needle Engine

  • Fix: Start loading earlier for skybox-image and environment-image when configured in <needle-engine> web component. Previously it would only start loading the HDRi or EXR images after the root glTF file was finished loading. Now it will start downloading earlier which improves the time until the scene is ready to be displayed.
  • Fix: Update vite license check using the latest CLI version
  • Fix: Issue related to loading the root scene where range requests (e.g. when download urls without a file extension) caused Chrome to remove previously full downloads to be removed from disc cache
  • Remove: Vite license check does not support Node 16 anymore

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.3.2-beta.3

18 Mar 14:18
Compare
Choose a tag to compare

Needle Engine

  • Fix: Support for three.js core postprocessing effects

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.3.2-beta.2

18 Mar 13:38
Compare
Choose a tag to compare

Needle Engine

  • Add: Documentation for Gizmos API

Unity Integration

  • Fix: Unity error when adding a new component caused by recent editor sync change
  • Fix: Handle NPM cache error when generating font assets

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples

4.3.2-beta.1

17 Mar 14:58
Compare
Choose a tag to compare

Needle Engine

  • Fix: Bug when loading glTF files without any components where a reference to the loaded glTF structre was kept in memory causing the memory to not be freed

Unity Integration

  • Fix: Update dialogue should not open automatically when using a stable package version and a new beta version is available
  • Fix: Unity EditorSync should work with GenericInspector instances in Unity versions that use VisualElements / UI Toolkit now

Links

Download for UnityDownload for BlenderDocumentationAPILive Samples