@needle-tools/engine 5.1.10 → 5.1.11
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 +3 -0
- package/SKILL.md +2 -0
- package/components.needle.json +1 -1
- package/dist/{needle-engine.bundle-DZD-GG7l.min.js → needle-engine.bundle-d-dLyN3s.min.js} +127 -127
- package/dist/{needle-engine.bundle-Dv5TidOk.umd.cjs → needle-engine.bundle-n5YALNtc.umd.cjs} +113 -113
- package/dist/{needle-engine.bundle-DP--RGAU.js → needle-engine.bundle-ue2Lw4bF.js} +3798 -3755
- package/dist/needle-engine.d.ts +52 -13
- package/dist/needle-engine.js +534 -534
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/lib/engine/api.d.ts +1 -1
- package/lib/engine/api.js +1 -1
- package/lib/engine/api.js.map +1 -1
- package/lib/engine/engine_init.js +2 -2
- package/lib/engine/engine_license.d.ts +7 -7
- package/lib/engine/engine_license.js +71 -71
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_math.d.ts +13 -0
- package/lib/engine/engine_math.js +17 -0
- package/lib/engine/engine_math.js.map +1 -1
- package/lib/engine/engine_networking_blob.js +3 -3
- package/lib/engine/engine_utils_qrcode.js +2 -2
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +2 -2
- package/lib/engine/webcomponents/needle menu/needle-menu.js +5 -5
- package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.js +2 -2
- package/lib/engine/webcomponents/needle-engine.loading.js +2 -2
- package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
- package/lib/engine/xr/TempXRContext.js +2 -2
- package/lib/engine-components/DragControls.d.ts +0 -5
- package/lib/engine-components/DragControls.js +0 -8
- package/lib/engine-components/DragControls.js.map +1 -1
- package/lib/engine-components/RendererInstancing.d.ts +34 -3
- package/lib/engine-components/RendererInstancing.js +92 -11
- package/lib/engine-components/RendererInstancing.js.map +1 -1
- package/lib/engine-components/export/usdz/USDZExporter.js +4 -4
- package/lib/engine-components/splines/SplineWalker.js +9 -3
- package/lib/engine-components/splines/SplineWalker.js.map +1 -1
- package/package.json +1 -1
- package/plugins/common/license.js +4 -4
- package/plugins/vite/license.js +4 -4
- package/src/engine/api.ts +1 -1
- package/src/engine/engine_init.ts +2 -2
- package/src/engine/engine_license.ts +68 -68
- package/src/engine/engine_math.ts +17 -0
- package/src/engine/engine_networking_blob.ts +3 -3
- package/src/engine/engine_utils_qrcode.ts +2 -2
- package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +2 -2
- package/src/engine/webcomponents/needle menu/needle-menu.ts +5 -5
- package/src/engine/webcomponents/needle-engine.loading.ts +6 -6
- package/src/engine/webcomponents/needle-engine.ts +2 -2
- package/src/engine/xr/TempXRContext.ts +2 -2
- package/src/engine-components/DragControls.ts +0 -7
- package/src/engine-components/RendererInstancing.ts +92 -11
- package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
- package/src/engine-components/splines/SplineWalker.ts +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@ 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
|
+
## [5.1.11] - 2026-08-13
|
|
8
|
+
- Fix: mirrored and negatively-scaled instanced meshes now render correctly (NE-7069)
|
|
9
|
+
|
|
7
10
|
## [5.1.10] - 2026-08-07
|
|
8
11
|
- Add: turn the whole postprocessing stack on or off at runtime with `PostProcessing.enabled`
|
|
9
12
|
- Fix: scene brightness no longer shifts when XR hand models are shown or hidden
|
package/SKILL.md
CHANGED
|
@@ -460,6 +460,7 @@ See 🔌 [MCP & Search API](https://raw.githubusercontent.com/needle-tools/ai/re
|
|
|
460
460
|
- WebXR requires HTTPS — the Needle project templates include a local HTTPS dev server by default. Use `--host` when running the dev server (e.g. `npx vite --host`) to expose it on your local network IP, allowing you to test on phones/headsets via QR code
|
|
461
461
|
- **Avoid unnecessary allocations.** Do NOT write `obj.worldPosition.clone()` or `new Vector3()` in per-frame code. The `world___` getters (`worldPosition`, `worldQuaternion`, `worldScale`) return temp vectors that can be read directly and re-assigned (`obj.worldPosition = otherObj.worldPosition`). When you need a temporary vector for math, use `getTempVector()` / `getTempQuaternion()` from `@needle-tools/engine` — these come from a circular buffer with zero GC pressure. Only use `.clone()` when you truly need to store a value across frames.
|
|
462
462
|
- **NEVER import from `@needle-tools/engine` subpaths** like `@needle-tools/engine/lib/...` or `@needle-tools/engine/src/...`. These are internal paths that break across versions. Everything is exported from the package root: `import { NEEDLE_ENGINE_MODULES, Rigidbody, BloomEffect, ... } from "@needle-tools/engine"`. The only exception is the vite plugin: `import { needlePlugins } from "@needle-tools/engine/vite"`.
|
|
463
|
+
- **Optimization & compression run at build time (not a scene upload).** Texture (KTX2/WebP) and mesh (Draco/Meshopt) compression, progressive loading, and automatic LODs are applied during the production build (Compression & LOD Settings component). It's **license-gated**, so the user must be logged in to Needle Cloud (`npx needle-cloud start`, or the Unity/Blender integration which handles it) — but that's a login/license check, not uploading their scene. Details: [Optimization & Compression](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/optimization.md).
|
|
463
464
|
|
|
464
465
|
---
|
|
465
466
|
|
|
@@ -475,6 +476,7 @@ Read these **only when needed** — don't load them all upfront:
|
|
|
475
476
|
- 🌐 [Networking](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/networking.md) — connection API, SyncedRoom, PlayerSync, @syncField, SyncedTransform, Voip, ScreenCapture, guid persistence
|
|
476
477
|
- 🥽 [WebXR](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/xr.md) — VR/AR sessions, XRRig, controllers, pointer events in XR, image tracking, depth sensing, camera access, mesh detection, DOM overlay, iOS AR, multiplayer avatars
|
|
477
478
|
- 🚀 [Deployment](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/deployment.md) — Needle Cloud (GitHub Actions, CLI), Vercel, Netlify, other platforms
|
|
479
|
+
- 📦 [Optimization & Compression](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/optimization.md) — build-time (local) texture/mesh compression (KTX2, Draco/Meshopt), progressive loading, automatic LODs — **not** a cloud upload
|
|
478
480
|
- 🔗 [Framework Integration](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/integration.md) — React, Svelte, Vue, Next.js, SvelteKit patterns, CDN with import maps
|
|
479
481
|
- 💡 [Component Examples](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/examples.md) — practical examples: click handling, runtime loading, networking, materials, code-only scenes, input, coroutines
|
|
480
482
|
- 🐛 [Troubleshooting](https://raw.githubusercontent.com/needle-tools/ai/refs/heads/main/providers/claude/plugin/skills/needle-engine/references/troubleshooting.md) — error messages, unexpected behavior, build failures, **runtime logs at `node_modules/.needle/logs/`**, build info
|