@needle-tools/engine 3.2.9-alpha → 3.2.10-alpha
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 +5 -0
- package/dist/needle-engine.js +1480 -1479
- package/dist/needle-engine.min.js +78 -77
- package/dist/needle-engine.umd.cjs +79 -78
- package/lib/engine/engine_license.js +3 -3
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine-components/Animator.js +2 -1
- package/lib/engine-components/Animator.js.map +1 -1
- package/lib/engine-components/GroundProjection.js +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/plugins/vite/license.js +5 -2
- package/src/engine/engine_license.ts +3 -3
- package/src/engine-components/Animator.ts +1 -1
- package/src/engine-components/GroundProjection.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/engine",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.10-alpha",
|
|
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",
|
package/plugins/vite/license.js
CHANGED
|
@@ -7,10 +7,13 @@ export const needleLicense = (command, config, userSettings) => {
|
|
|
7
7
|
name: "needle-license",
|
|
8
8
|
enforce: 'pre',
|
|
9
9
|
async transform(src, id) {
|
|
10
|
-
|
|
10
|
+
const isNeedleEngineFile = id.includes("engine/engine_license") || id.includes("needle-tools_engine.js");
|
|
11
|
+
// sometimes the actual license parameter is in a unnamed chunk file
|
|
12
|
+
const isViteChunkFile = id.includes("chunk") && id.includes(".vite");
|
|
13
|
+
if (isNeedleEngineFile || isViteChunkFile) {
|
|
11
14
|
const needleConfig = await loadConfig();
|
|
12
15
|
if (needleConfig) {
|
|
13
|
-
if (needleConfig.hasProLicense
|
|
16
|
+
if (needleConfig.hasProLicense === true) {
|
|
14
17
|
src = src.replace("NEEDLE_ENGINE_COMMERCIAL_USE_LICENSE = false;", "NEEDLE_ENGINE_COMMERCIAL_USE_LICENSE = " + needleConfig.hasProLicense + ";");
|
|
15
18
|
return { code: src, map: null }
|
|
16
19
|
}
|
|
@@ -31,8 +31,8 @@ async function showLicenseInfo(ctx: IContext) {
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
const licenseElementIdentifier = "needle-license-element";
|
|
34
|
-
const licenseDuration =
|
|
35
|
-
const licenseDelay =
|
|
34
|
+
const licenseDuration = 15000;
|
|
35
|
+
const licenseDelay = 500;
|
|
36
36
|
|
|
37
37
|
function onNonCommercialVersionDetected(ctx: IContext) {
|
|
38
38
|
setTimeout(() => insertNonCommercialUseHint(ctx), 2000);
|
|
@@ -67,7 +67,6 @@ function insertNonCommercialUseHint(ctx: IContext) {
|
|
|
67
67
|
|
|
68
68
|
licenseElement.title = "Needle Engine — non commercial version";
|
|
69
69
|
licenseElement.addEventListener("click", () => {
|
|
70
|
-
console.log("CLICK")
|
|
71
70
|
globalThis.open("https://needle.tools", "_blank");
|
|
72
71
|
});
|
|
73
72
|
|
|
@@ -162,6 +161,7 @@ function createLicenseStyle() {
|
|
|
162
161
|
mix-blend-mode: difference;
|
|
163
162
|
line-height: 1em;
|
|
164
163
|
margin-left: -3px;
|
|
164
|
+
text-shadow: 0 0 2px rgba(200,200,200, .3);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
${selector} .text .non-commercial {
|
|
@@ -102,7 +102,7 @@ export class Animator extends Behaviour {
|
|
|
102
102
|
/**@deprecated use setTrigger */
|
|
103
103
|
SetTrigger(name: string | number) { this.setTrigger(name); }
|
|
104
104
|
setTrigger(name: string | number) {
|
|
105
|
-
console.log("
|
|
105
|
+
if(debug) console.log("SetTrigger", name);
|
|
106
106
|
this.runtimeAnimatorController?.setTrigger(name);
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -24,7 +24,7 @@ export class GroundProjectedEnv extends Behaviour {
|
|
|
24
24
|
set radius(val: number) {
|
|
25
25
|
this._radius = val;
|
|
26
26
|
if (this.env)
|
|
27
|
-
this.env.
|
|
27
|
+
this.env.radius = val;
|
|
28
28
|
}
|
|
29
29
|
get radius(): number { return this._radius; }
|
|
30
30
|
private _radius: number = 100;
|