matrix-engine-wgpu 1.3.18 → 1.4.0

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.
@@ -1,10 +1,9 @@
1
1
  import MatrixEngineWGPU from "../src/world.js";
2
2
  import {downloadMeshes} from '../src/engine/loader-obj.js';
3
3
  import {LOG_FUNNY, LOG_INFO, LOG_MATRIX} from "../src/engine/utils.js";
4
- import {addRaycastsAABBListener} from "../src/engine/raycast.js";
4
+ // import {addRaycastsAABBListener} from "../src/engine/raycast.js";
5
5
 
6
6
  export var loadObjFile = function() {
7
-
8
7
  let loadObjFile = new MatrixEngineWGPU({
9
8
  useSingleRenderPass: true,
10
9
  canvasSize: 'fullscreen',
@@ -14,10 +13,6 @@ export var loadObjFile = function() {
14
13
  },
15
14
  clearColor: {r: 0, b: 0.122, g: 0.122, a: 1}
16
15
  }, () => {
17
-
18
-
19
- // loadObjFile.addLight()
20
-
21
16
  addEventListener('AmmoReady', () => {
22
17
  downloadMeshes({
23
18
  ball: "./res/meshes/blender/sphere.obj",
@@ -54,7 +49,7 @@ export var loadObjFile = function() {
54
49
  function onLoadObj(m) {
55
50
  loadObjFile.myLoadedMeshes = m;
56
51
  for(var key in m) {
57
- console.log(`%c Loaded objs: ${key} `, LOG_MATRIX);
52
+ // console.log(`%c Loaded objs: ${key} `, LOG_MATRIX);
58
53
  }
59
54
  loadObjFile.addMeshObj({
60
55
  position: {x: 0, y: 2, z: -10},
@@ -86,8 +81,9 @@ export var loadObjFile = function() {
86
81
 
87
82
  var TEST = loadObjFile.getSceneObjectByName('cube2');
88
83
  console.log(`%c Test access scene ${TEST} object.`, LOG_MATRIX);
84
+ loadObjFile.addLight();
85
+ loadObjFile.addLight();
89
86
 
90
- loadObjFile.addLight();
91
87
  }
92
88
  })
93
89
  // just for dev
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matrix-engine-wgpu",
3
- "version": "1.3.18",
3
+ "version": "1.4.0",
4
4
  "description": "FIX npm obj sequence anim +HOTFIX raycast, webGPU powered pwa application. Crazy fast rendering with AmmoJS physics support. Simple raycaster hit object added.",
5
5
  "main": "index.js",
6
6
  "scripts": {