matrix-engine-wgpu 1.4.1 → 1.4.4

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.
@@ -81,8 +81,13 @@ export var loadObjFile = function() {
81
81
 
82
82
  var TEST = loadObjFile.getSceneObjectByName('cube2');
83
83
  console.log(`%c Test access scene ${TEST} object.`, LOG_MATRIX);
84
+
84
85
  loadObjFile.addLight();
85
- // loadObjFile.addLight();
86
+ loadObjFile.lightContainer[0].behavior.setOsc0(-1,1,0.1)
87
+ loadObjFile.lightContainer[0].behavior.value_ = -1;
88
+ loadObjFile.lightContainer[0].updater.push((light) => {
89
+ light.position[0] = light.behavior.setPath0()
90
+ })
86
91
 
87
92
  }
88
93
  })
package/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * This file created by:
3
- * Nikola Lukic zlatnaspirala@gmail.com mart 2024
4
- * npm import/export
3
+ * @author Nikola Lukic
4
+ * @email zlatnaspirala@gmail.com mart 2024
5
+ * @description npm import/export
5
6
  */
6
7
  // import {degToRad, radToDeg} from "./utils";
7
8
  import {downloadMeshes, makeObjSeqArg} from "./src/engine/loader-obj.js";
@@ -13,16 +14,20 @@ import {
13
14
  computeWorldVertsAndAABB, rayIntersectsAABB,
14
15
  computeAABB
15
16
  } from "./src/engine/raycast.js";
17
+ import {OSCILLATOR, SWITCHER} from "./src/engine/utils.js";
16
18
 
17
19
  var about = () => {
18
- console.log("Hi npm. matrix-engine for webgpu is ready...")
19
- console.log("--------------------------------------------")
20
- console.log("List of features: ")
21
- console.log(" - Loading obj files with uvs")
22
- console.log(" - Scene camera use -z front")
23
- console.log(" - position, rotation - same like matrix-engine")
24
- console.log(" - Physics used Ammo.js build")
25
- console.log(" - Raycaster HIT/CLICK on object scene")
20
+ console.info("Hi npm. matrix-engine for webgpu is ready...")
21
+ console.info("--------------------------------------------")
22
+ console.info("List of features: ")
23
+ console.info(" - Loading obj files with uvs")
24
+ console.info(" - Scene camera use -z front")
25
+ console.info(" - position, rotation - same like matrix-engine")
26
+ console.info(" - Physics used Ammo.js build")
27
+ console.info(" - Raycaster HIT/CLICK on object scene")
28
+ console.info(" - Light cast shadow multi lights")
29
+ console.info("--------------------------------------------")
30
+
26
31
  }
27
32
 
28
33
  export {
@@ -37,5 +42,7 @@ export {
37
42
  computeAABB,
38
43
  computeWorldVertsAndAABB,
39
44
  makeObjSeqArg,
45
+ SWITCHER,
46
+ OSCILLATOR,
40
47
  about
41
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matrix-engine-wgpu",
3
- "version": "1.4.1",
3
+ "version": "1.4.4",
4
4
  "description": "Fixed shadows casting vs camera/video texture, webGPU powered pwa application. Crazy fast rendering with AmmoJS physics support. Simple raycaster hit object added.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -268,7 +268,7 @@ p {
268
268
  .btn {
269
269
  font-family: 'Orbitron', sans-serif;
270
270
  font-weight: 600;
271
- font-size: 16px;
271
+ font-size: 10px;
272
272
  color: #00ffff;
273
273
  text-transform: uppercase;
274
274
  letter-spacing: 1.5px;