@needle-tools/engine 3.12.0-beta → 3.12.0-beta.1
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/package.json +2 -2
- package/plugins/vite/reload.js +12 -11
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
|
+
## [3.12.0-beta.1] - 2023-08-28
|
|
8
|
+
- Fix: vite hot reload plugin to dynamically import needle engine to support usage in server-side rendering context
|
|
9
|
+
|
|
7
10
|
## [3.12.0-beta] - 2023-08-28
|
|
8
11
|
- Add: Timeline api for modifying final timeline position and rotation values (implement `ITimelineAnimationCallbacks` and call `director.registerAnimationCallback(this)`)
|
|
9
12
|
- Change: Update three quarks particlesystem library to latest
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/engine",
|
|
3
|
-
"version": "3.12.0-beta",
|
|
3
|
+
"version": "3.12.0-beta.1",
|
|
4
4
|
"description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in",
|
|
5
5
|
"main": "dist/needle-engine.umd.cjs",
|
|
6
6
|
"type": "module",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"overrides": {
|
|
99
99
|
"three.quarks": {
|
|
100
|
-
"three": "
|
|
100
|
+
"three": ">= @needle-tools/three@0.154.0"
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
"watch": {
|
package/plugins/vite/reload.js
CHANGED
|
@@ -334,20 +334,21 @@ function insertScriptHotReloadCode(src, filePath) {
|
|
|
334
334
|
|
|
335
335
|
// ${HOT_RELOAD_START_MARKER}
|
|
336
336
|
// Inserted by needle reload plugin (vite)
|
|
337
|
-
import { applyHMRChanges } from "${importPath}";
|
|
338
337
|
//@ts-ignore
|
|
339
338
|
if (import.meta.hot) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
339
|
+
import("${importPath}").then(mod => {
|
|
340
|
+
const applyHMRChanges = mod.applyHMRChanges;
|
|
341
|
+
//@ts-ignore
|
|
342
|
+
import.meta.hot.accept((newModule, oldModule) => {
|
|
343
|
+
if (newModule) {
|
|
344
|
+
const success = applyHMRChanges(newModule, oldModule);
|
|
345
|
+
if(success === false){
|
|
346
|
+
//@ts-ignore
|
|
347
|
+
import.meta.hot.invalidate()
|
|
348
|
+
}
|
|
348
349
|
}
|
|
349
|
-
}
|
|
350
|
-
})
|
|
350
|
+
})
|
|
351
|
+
});
|
|
351
352
|
}
|
|
352
353
|
// ${HOT_RELOAD_END_MARKER}
|
|
353
354
|
`
|