Needle Engine

Changes between version 3.6.2 and 3.6.3
Files changed (3) hide show
  1. src/engine/engine_license.ts +15 -6
  2. src/engine/engine_physics_rapier.ts +3 -1
  3. src/engine-components/OrbitControls.ts +8 -8
src/engine/engine_license.ts CHANGED
@@ -113,7 +113,7 @@
113
113
 
114
114
  licenseElement.title = "Needle Engine";
115
115
  if (!hasCommercialLicense())
116
- licenseElement.title += " non commercial version";
116
+ licenseElement.title += " No active license found - Non Commercial Use";
117
117
  licenseElement.addEventListener("click", () => {
118
118
  globalThis.open("https://needle.tools", "_blank");
119
119
  });
@@ -133,18 +133,27 @@
133
133
  lastLogTime = now;
134
134
  const logo = "data:image/webp;base64,UklGRrABAABXRUJQVlA4WAoAAAAQAAAAHwAAHwAAQUxQSKEAAAARN6CmbSM4WR7vdARON11EBDq3fLiNbVtVzpMCPlKAEzsx0Y/x+Ovuv4dn0EFE/ydAvz6YggXzgh5sVgXM/zOC/4sii7qgGvB5N7hmuQYwkvazWAu1JPW41FXSHq6pnaQWvqYH18Fc0j1hO/BFTtIeSBlJi5w6qIIO7IOrwhFsB2Yxukif0FTRLpXswHR8MxbslKe9VZsn/Ub5C7YFOpqSTABWUDgg6AAAAFAGAJ0BKiAAIAA+7VyoTqmkpCI3+qgBMB2JbACdMt69DwMIQBLhkTO6XwY00UEDK6cNIDnuNibPf0EgAP7Y1myuiQHLDsF/0h5unrGh6WAbv7aegg2ZMd3uRKfT/3SJztcaujYfTvMXspfCTmYcoO6a+vhC3ss4M8uM58t4siiu59I4aOl59e9Sr6xoxYlHf2v+NnBNpJYeJf8jABQAId/PXuBkLEFkiCucgSGEcfhvajql/j3reCGl0M5/9gQWy7ayNPs+wlvIxFnNfSlfuND4CZOCyxOHhRqOmHN4ULHo3tCSrUNvgAA=";
135
135
  const style = `
136
+ position: relative;
137
+ display: block;
136
138
  font-size: 18px;
137
139
  background-size: 20px;
138
- background-position: left top;
140
+ background-position: 10px 5px;
139
141
  background-repeat:no-repeat;
140
142
  background-image:url('${logo}');
141
143
  background-max-size: 40px;
142
- padding-left: 30px;
143
- margin-bottom: 2px;
144
144
  margin-bottom: 5px;
145
+ margin-top: 2em;
146
+ margin-bottom: 2em;
147
+ padding: .2em;
148
+ padding-left: 37px;
149
+ background-color: rgba(250,160,160,.2);
150
+ border-radius: .5em;
151
+ border: 2px solid rgba(250,160,160,.5);
152
+ color: rgba(90,20,20,1);
145
153
  `;
146
- let licenseText = "Needle Engine non commercial version";
147
- console.log("%c " + licenseText, style)
154
+ // url must contain https for firefox to make it clickable
155
+ let licenseText = "Needle Engine — No license active, commercial use is not allowed. Visit https://needle.tools/pricing for more information and licensing options.";
156
+ console.log("%c" + licenseText, style);
148
157
  }
149
158
 
150
159
  function createLicenseElement() {
src/engine/engine_physics_rapier.ts CHANGED
@@ -38,7 +38,9 @@
38
38
 
39
39
  let RAPIER: undefined | any = undefined;
40
40
  declare const NEEDLE_USE_RAPIER: boolean;
41
- globalThis["NEEDLE_USE_RAPIER"] = globalThis["NEEDLE_USE_RAPIER"] || true;
41
+ globalThis["NEEDLE_USE_RAPIER"] = globalThis["NEEDLE_USE_RAPIER"] !== undefined ? globalThis["NEEDLE_USE_RAPIER"] : true;
42
+ if(debugPhysics)
43
+ console.log("Use Rapier", NEEDLE_USE_RAPIER, globalThis["NEEDLE_USE_RAPIER"] )
42
44
 
43
45
  if (NEEDLE_USE_RAPIER) {
44
46
  ContextRegistry.registerCallback(ContextEvent.ContextCreationStart, evt => {
src/engine-components/OrbitControls.ts CHANGED
@@ -135,12 +135,6 @@
135
135
  this.middleClickToFocus = true;
136
136
  if (isMobileDevice()) this.doubleClickToFocus = true;
137
137
  }
138
-
139
- this._controls.enableDamping = this.enableDamping;
140
- this._controls.keys = this.enableKeys ? defaultKeys : disabledKeys;
141
- this._controls.autoRotate = this.autoRotate;
142
- this._controls.autoRotateSpeed = this.autoRotateSpeed;
143
- this._controls.enableZoom = this.enableZoom;
144
138
  this._controls.addEventListener("start", this.onControlsChangeStarted);
145
139
  if (cam?.type === "PerspectiveCamera") {
146
140
  if (freeCam) {
@@ -160,8 +154,7 @@
160
154
  this._controls.maxZoom = this.maxZoom;
161
155
  }
162
156
  }
163
- this._controls.dampingFactor = this.dampingFactor;
164
- this._controls.enablePan = this.enablePan;
157
+
165
158
  if (!this._startedListeningToKeyEvents) {
166
159
  this._startedListeningToKeyEvents = true;
167
160
  this._controls.listenToKeyEvents(window.document.body);
@@ -283,6 +276,13 @@
283
276
  if (this.debugLog)
284
277
  this._controls.domElement = this.context.renderer.domElement;
285
278
  this._controls.enabled = !this._shouldDisable && this._camera === this.context.mainCameraComponent;
279
+ this._controls.enableDamping = this.enableDamping;
280
+ this._controls.keys = this.enableKeys ? defaultKeys : disabledKeys;
281
+ this._controls.autoRotate = this.autoRotate;
282
+ this._controls.autoRotateSpeed = this.autoRotateSpeed;
283
+ this._controls.enableZoom = this.enableZoom;
284
+ this._controls.dampingFactor = this.dampingFactor;
285
+ this._controls.enablePan = this.enablePan;
286
286
  this._controls.update();
287
287
  }
288
288
  }