@hology/core 0.0.26 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/dist/effects/vfx/behaviours.d.ts +26 -0
  2. package/dist/effects/vfx/behaviours.js +5 -0
  3. package/dist/effects/vfx/index.d.ts +2 -0
  4. package/dist/effects/vfx/index.js +5 -0
  5. package/dist/effects/vfx/initializsers.d.ts +34 -0
  6. package/dist/effects/vfx/initializsers.js +5 -0
  7. package/dist/effects/vfx/rates.d.ts +6 -0
  8. package/dist/effects/vfx/rates.js +5 -0
  9. package/dist/effects/vfx/vfx-actor.d.ts +26 -0
  10. package/dist/effects/vfx/vfx-actor.js +5 -0
  11. package/dist/effects/vfx/vfx-asset.d.ts +90 -0
  12. package/dist/effects/vfx/vfx-asset.js +5 -0
  13. package/dist/effects/vfx/vfx-defs.d.ts +169 -0
  14. package/dist/effects/vfx/vfx-defs.js +5 -0
  15. package/dist/effects/vfx/vfx-materializer.d.ts +19 -0
  16. package/dist/effects/vfx/vfx-materializer.js +5 -0
  17. package/dist/gameplay/actors/builtin/components/character/character-movement.d.ts +5 -1
  18. package/dist/gameplay/actors/builtin/components/character/character-movement.js +1 -1
  19. package/dist/gameplay/actors/camera/third-party-camera-component.js +1 -1
  20. package/dist/gameplay/initiate.d.ts +3 -0
  21. package/dist/gameplay/initiate.js +1 -1
  22. package/dist/gameplay/input/input-service.d.ts +4 -0
  23. package/dist/gameplay/input/input-service.js +1 -1
  24. package/dist/gameplay/polyfill.d.ts +1 -0
  25. package/dist/gameplay/polyfill.js +5 -0
  26. package/dist/gameplay/services/asset-loader.d.ts +9 -4
  27. package/dist/gameplay/services/asset-loader.js +1 -1
  28. package/dist/gameplay/services/render.d.ts +3 -2
  29. package/dist/rendering.d.ts +1 -0
  30. package/dist/rendering.js +1 -1
  31. package/dist/scene/materializer.d.ts +18 -3
  32. package/dist/scene/materializer.js +1 -1
  33. package/dist/scene/model.d.ts +6 -1
  34. package/dist/scene/objects/shapes.d.ts +31 -3
  35. package/dist/scene/objects/shapes.js +1 -1
  36. package/dist/scene/objects/stairs-geometry.d.ts +3 -0
  37. package/dist/scene/objects/stairs-geometry.js +5 -0
  38. package/dist/scene/scene-data-service.js +1 -1
  39. package/dist/scene/sky.d.ts +3 -0
  40. package/dist/scene/sky.js +1 -1
  41. package/dist/shader-nodes/effects.d.ts +8 -0
  42. package/dist/shader-nodes/effects.js +5 -0
  43. package/dist/shader-nodes/glsl-node.d.ts +16 -0
  44. package/dist/shader-nodes/glsl-node.js +5 -0
  45. package/dist/shader-nodes/index.d.ts +3 -0
  46. package/dist/shader-nodes/index.js +1 -1
  47. package/dist/shader-nodes/shapes.d.ts +3 -0
  48. package/dist/shader-nodes/shapes.js +5 -0
  49. package/dist/shader-nodes/voronoi.d.ts +5 -0
  50. package/dist/shader-nodes/voronoi.js +5 -0
  51. package/dist/utils/math.js +1 -1
  52. package/package.json +3 -2
  53. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,5 @@
1
+ import{float as t,length as a,min as r,max as e,saturate as c,dFdx as d,dFdy as l,abs as u,ComponentsVec2Node as n,vec2 as i}from"three-shader-graph";export function rectangleFloat(t,a,e){const o=u(t.multiplyScalar(2).subtractScalar(1)).subtract(new n(a,e)),s=i(1,1).subtract(o.divide(u(d(p=o)).add(u(l(p)))));var p;return c(r(s.x(),s.y()))}export function roundedRectangleFloat(o,s,p,b){const m=e(r(r(u(b.multiply(2)),u(s)),u(p)),t(1e-5)),v=u(o.multiplyScalar(2).subtractScalar(1)).subtract(new n(s,p)).addScalar(m),S=a(e(i(0,0),v)).divide(m);return c(t(1).subtract(S).divide(u(d(y=S)).add(u(l(y)))));var y}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -0,0 +1,5 @@
1
+ import { FloatNode, Vec2Node } from "three-shader-graph";
2
+ export declare function voronoi(uv: Vec2Node, angleOffset: FloatNode, cellDensity: FloatNode): {
3
+ noise: FloatNode;
4
+ cells: FloatNode;
5
+ };
@@ -0,0 +1,5 @@
1
+ import{select as t,length as a,ComponentsVec2Node as r,ConstantMat2Node as l,fract as d,sin as n,cos as e,vec2 as o,vec3 as u,floor as c}from"three-shader-graph";export function voronoi(i,p,m){const y=i.multiplyScalar(m),s=c(y),x=d(y),f=[-1,0,1],h=f.flatMap((t=>f.map((a=>[t,a])))).reduce(((c,[i,m])=>{const y=o(i,m),f=function(t,a){const o=new l(15.27,47.63,99.41,89.98);return t=d(n(t.multiplyMat(o)).multiplyScalar(46839.32)),new r(n(t.y().add(a)).multiply(.5).add(.5),e(t.x().add(a)).multiply(.5).add(.5))}(y.add(s),p),h=a(y.add(f).subtract(x));return t(h.lt(c.x()),u(h,f.x(),f.y()),c)}),u(8,0,0));return{noise:h.x(),cells:h.y()}}
2
+ /*
3
+ * Copyright (©) 2023. All rights reserved.
4
+ * See the LICENSE.md file for details.
5
+ */
@@ -1,4 +1,4 @@
1
- import*as t from"three";import{Vector3 as n}from"three";export function clamp(t,n,e){return Math.max(Math.min(e,t),n)}export function byChance(t,n){Math.random()<t&&n()}export function mean(t){let n=0,e=t.length;for(;--e>=0;)n+=t[e];return t.length>0?n/t.length:0}export function meanVectors3(t){const e=new n;for(const n of t)e.add(n);return e.divideScalar(t.length),e}export function meanBottomVectors3(t){const e=new n;let o=null;for(const n of t)e.add(n),(null==o||n.y<o)&&(o=n.y);return e.divideScalar(t.length),e.y=o,e}export function meanVectors3Mapped(t,e){const o=new n,r=new n;for(const n of t)r.add(e(n,o));return r.divideScalar(t.length),r}const e=new n;export function meanVectors3withWeight(t,n,o){let r=0;for(const t of n)r+=t;e.set(0,0,0);let a=0;for(const o of t){const t=n[a]/r;e.x+=o.x*t,e.y+=o.y*t,e.z+=o.z*t,a++}return o.copy(e),o}export function randomString(t=9){return Math.random().toString(36).substr(2,t)}export function toDegrees(t){return t*(180/Math.PI)}var o=new t.Sphere;export function boundingRadius(...n){o.makeEmpty();for(var e=0;e<n.length;e++)n[e].traverse((n=>{n instanceof t.Mesh&&(n.geometry.computeBoundingSphere(),o.union(n.geometry.boundingSphere))}));return o.radius}
1
+ import*as t from"three";import{Vector3 as e}from"three";export function clamp(t,e,n){return Math.max(Math.min(n,t),e)}export function byChance(t,e){Math.random()<t&&e()}export function mean(t){let e=0,n=t.length;for(;--n>=0;)e+=t[n];return t.length>0?e/t.length:0}export function meanVectors3(t){const e=n.set(0,0,0);for(const n of t)e.add(n);return e.divideScalar(t.length),e}export function meanBottomVectors3(t){const e=n.set(0,0,0);let o=null;for(const n of t)e.add(n),(null==o||n.y<o)&&(o=n.y);return e.divideScalar(t.length),e.y=o,e}export function meanVectors3Mapped(t,n){const o=new e,r=new e;for(const e of t)r.add(n(e,o));return r.divideScalar(t.length),r}const n=new e;export function meanVectors3withWeight(t,e,o){let r=0;for(const t of e)r+=t;n.set(0,0,0);let a=0;for(const o of t){const t=e[a]/r;n.x+=o.x*t,n.y+=o.y*t,n.z+=o.z*t,a++}return o.copy(n),o}export function randomString(t=9){return Math.random().toString(36).substr(2,t)}export function toDegrees(t){return t*(180/Math.PI)}var o=new t.Sphere;export function boundingRadius(...e){o.makeEmpty();for(var n=0;n<e.length;n++)e[n].traverse((e=>{e instanceof t.Mesh&&(e.geometry.computeBoundingSphere(),o.union(e.geometry.boundingSphere))}));return o.radius}
2
2
  /*
3
3
  * Copyright (©) 2023. All rights reserved.
4
4
  * See the LICENSE.md file for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hology/core",
3
- "version": "0.0.26",
3
+ "version": "0.0.29",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -84,6 +84,7 @@
84
84
  "dependencies": {
85
85
  "@dimforge/rapier3d-compat": "^0.11.2",
86
86
  "@plumier/reflect": "^1.1.0",
87
+ "@types/three-nebula": "^10.0.3",
87
88
  "cannon-es": "^0.20.0",
88
89
  "cannon-es-debugger": "^1.0.0",
89
90
  "rxjs": "7.4.0",
@@ -91,7 +92,7 @@
91
92
  "three": "^0.139.0",
92
93
  "three-csm": "^3.2.0",
93
94
  "three-mesh-bvh": "^0.4.0",
94
- "three-nebula": "10.0.3",
95
+ "three-nebula": "^10.0.3",
95
96
  "three-shader-graph": "^0.1.24",
96
97
  "three-stdlib": "~2.17.3",
97
98
  "ts-key-enum": "^2.0.12",