@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.
- package/dist/effects/vfx/behaviours.d.ts +26 -0
- package/dist/effects/vfx/behaviours.js +5 -0
- package/dist/effects/vfx/index.d.ts +2 -0
- package/dist/effects/vfx/index.js +5 -0
- package/dist/effects/vfx/initializsers.d.ts +34 -0
- package/dist/effects/vfx/initializsers.js +5 -0
- package/dist/effects/vfx/rates.d.ts +6 -0
- package/dist/effects/vfx/rates.js +5 -0
- package/dist/effects/vfx/vfx-actor.d.ts +26 -0
- package/dist/effects/vfx/vfx-actor.js +5 -0
- package/dist/effects/vfx/vfx-asset.d.ts +90 -0
- package/dist/effects/vfx/vfx-asset.js +5 -0
- package/dist/effects/vfx/vfx-defs.d.ts +169 -0
- package/dist/effects/vfx/vfx-defs.js +5 -0
- package/dist/effects/vfx/vfx-materializer.d.ts +19 -0
- package/dist/effects/vfx/vfx-materializer.js +5 -0
- package/dist/gameplay/actors/builtin/components/character/character-movement.d.ts +5 -1
- package/dist/gameplay/actors/builtin/components/character/character-movement.js +1 -1
- package/dist/gameplay/actors/camera/third-party-camera-component.js +1 -1
- package/dist/gameplay/initiate.d.ts +3 -0
- package/dist/gameplay/initiate.js +1 -1
- package/dist/gameplay/input/input-service.d.ts +4 -0
- package/dist/gameplay/input/input-service.js +1 -1
- package/dist/gameplay/polyfill.d.ts +1 -0
- package/dist/gameplay/polyfill.js +5 -0
- package/dist/gameplay/services/asset-loader.d.ts +9 -4
- package/dist/gameplay/services/asset-loader.js +1 -1
- package/dist/gameplay/services/render.d.ts +3 -2
- package/dist/rendering.d.ts +1 -0
- package/dist/rendering.js +1 -1
- package/dist/scene/materializer.d.ts +18 -3
- package/dist/scene/materializer.js +1 -1
- package/dist/scene/model.d.ts +6 -1
- package/dist/scene/objects/shapes.d.ts +31 -3
- package/dist/scene/objects/shapes.js +1 -1
- package/dist/scene/objects/stairs-geometry.d.ts +3 -0
- package/dist/scene/objects/stairs-geometry.js +5 -0
- package/dist/scene/scene-data-service.js +1 -1
- package/dist/scene/sky.d.ts +3 -0
- package/dist/scene/sky.js +1 -1
- package/dist/shader-nodes/effects.d.ts +8 -0
- package/dist/shader-nodes/effects.js +5 -0
- package/dist/shader-nodes/glsl-node.d.ts +16 -0
- package/dist/shader-nodes/glsl-node.js +5 -0
- package/dist/shader-nodes/index.d.ts +3 -0
- package/dist/shader-nodes/index.js +1 -1
- package/dist/shader-nodes/shapes.d.ts +3 -0
- package/dist/shader-nodes/shapes.js +5 -0
- package/dist/shader-nodes/voronoi.d.ts +5 -0
- package/dist/shader-nodes/voronoi.js +5 -0
- package/dist/utils/math.js +1 -1
- package/package.json +3 -2
- 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{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
|
+
*/
|
package/dist/utils/math.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import*as t from"three";import{Vector3 as
|
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.
|
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",
|