@hology/core 0.0.245 → 0.0.247
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.
- package/dist/effects/vfx/gpu-sprite-compiler.js +1 -1
- package/dist/effects/vfx/gpu-sprite-runtime.d.ts +18 -1
- package/dist/effects/vfx/gpu-sprite-runtime.js +1 -1
- package/dist/effects/vfx/gpu-sprite-template.d.ts +1 -0
- package/dist/effects/vfx/gpu-sprite-template.js +1 -1
- package/dist/effects/vfx/gpu-sprite-world-runtime.d.ts +2 -1
- package/dist/effects/vfx/gpu-sprite-world-runtime.js +1 -1
- package/dist/effects/vfx/gpu-vfx-world-service.d.ts +7 -1
- package/dist/effects/vfx/gpu-vfx-world-service.js +1 -1
- package/dist/effects/vfx/initializsers.d.ts +15 -0
- package/dist/effects/vfx/initializsers.js +1 -1
- package/dist/effects/vfx/vfx-actor.d.ts +2 -0
- package/dist/effects/vfx/vfx-actor.js +1 -1
- package/dist/effects/vfx/vfx-asset.d.ts +7 -3
- package/dist/effects/vfx/vfx-asset.js +1 -1
- package/dist/effects/vfx/vfx-binding-runtime.d.ts +1 -1
- package/dist/effects/vfx/vfx-binding-runtime.js +1 -1
- package/dist/effects/vfx/vfx-defs.d.ts +53 -3
- package/dist/effects/vfx/vfx-defs.js +1 -1
- package/dist/effects/vfx/vfx-input-runtime.d.ts +2 -2
- package/dist/effects/vfx/vfx-input-runtime.js +1 -1
- package/dist/effects/vfx/vfx-materializer.js +1 -1
- package/dist/effects/vfx/vfx-mesh-sampler.d.ts +25 -0
- package/dist/effects/vfx/vfx-mesh-sampler.js +4 -0
- package/dist/gameplay/actors/builtin/components/index.d.ts +2 -0
- package/dist/gameplay/actors/builtin/components/index.js +1 -1
- package/dist/gameplay/actors/builtin/components/spline-component.d.ts +65 -0
- package/dist/gameplay/actors/builtin/components/spline-component.js +4 -0
- package/dist/gameplay/actors/builtin/index.d.ts +6 -0
- package/dist/gameplay/actors/builtin/index.js +1 -1
- package/dist/gameplay/actors/builtin/navmesh-actor.js +1 -1
- package/dist/gameplay/actors/builtin/spline-actor.d.ts +6 -0
- package/dist/gameplay/actors/builtin/spline-actor.js +4 -0
- package/dist/gameplay/actors/builtin/water-spline-volume-actor.d.ts +13 -0
- package/dist/gameplay/actors/builtin/water-spline-volume-actor.js +4 -0
- package/dist/gameplay/actors/builtin/water-volume-actor.d.ts +8 -0
- package/dist/gameplay/actors/builtin/water-volume-actor.js +4 -0
- package/dist/gameplay/actors/index.d.ts +4 -0
- package/dist/gameplay/actors/index.js +1 -1
- package/dist/gameplay/ai/build-tile.d.ts +3 -1
- package/dist/gameplay/ai/build-tile.js +1 -1
- package/dist/gameplay/ai/dynamic-tiled-navmesh.d.ts +4 -21
- package/dist/gameplay/ai/dynamic-tiled-navmesh.js +1 -1
- package/dist/gameplay/ai/dynamic-tiled-navmesh.worker.d.ts +10 -1
- package/dist/gameplay/ai/dynamic-tiled-navmesh.worker.js +1 -1
- package/dist/gameplay/ai/index.d.ts +1 -0
- package/dist/gameplay/ai/index.js +1 -1
- package/dist/gameplay/ai/navigation-areas.d.ts +22 -0
- package/dist/gameplay/ai/navigation-areas.js +4 -0
- package/dist/gameplay/ai/navigation.d.ts +28 -4
- package/dist/gameplay/ai/navigation.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/scene/materializer.d.ts +3 -0
- package/dist/scene/materializer.js +1 -1
- package/dist/shader/graph/compiler.js +1 -1
- package/dist/shader/graph/model.d.ts +1 -1
- package/dist/shader/graph/registry.js +1 -1
- package/dist/test/build-tile.test.js +1 -1
- package/dist/test/gpu-sprite-compiler.test.js +1 -1
- package/dist/test/navmesh-worker-pool.test.js +1 -1
- package/dist/test/node-material-webgpu-resolver.test.js +1 -1
- package/dist/test/shader-graph.test.js +1 -1
- package/dist/test/spline-component.test.d.ts +2 -0
- package/dist/test/spline-component.test.js +4 -0
- package/dist/test/vfx-mesh-sampler.test.d.ts +2 -0
- package/dist/test/vfx-mesh-sampler.test.js +4 -0
- package/dist/test/water-spline-volume-actor.test.d.ts +2 -0
- package/dist/test/water-spline-volume-actor.test.js +4 -0
- package/dist/test/worker-task-executor.test.d.ts +2 -0
- package/dist/test/worker-task-executor.test.js +4 -0
- package/dist/worker/index.d.ts +11 -2
- package/dist/worker/index.js +1 -1
- package/dist/worker/task-executor.d.ts +22 -0
- package/dist/worker/task-executor.js +4 -0
- package/dist/worker/task-worker.d.ts +3 -0
- package/dist/worker/task-worker.js +4 -0
- package/dist/worker/task.d.ts +39 -0
- package/dist/worker/task.js +4 -0
- package/package.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NavMesh as t,NavMeshParams as e,Raw as
|
|
1
|
+
import{NavMesh as t,NavMeshParams as e,Raw as i,UnsignedCharArray as s,recastConfigDefaults as o,statusToReadableString as r}from"recast-navigation";import*as n from"three";import{buildConfig as a,buildTile as h}from"./build-tile.js";import{Subject as l}from"rxjs";import{executeTask as d,hasWorkerBuilder as u}from"../../worker/index.js";import{hasSharedArrayBufferSupport as c}from"../../utils/buffer.js";export const MAX_NAV_MESH_WORKERS=4;export const getTileBounds=(t,e,i,s,o)=>[[t.x+i*o,t.y,t.z+s*o],[t.x+(i+1)*o,e.y,t.z+(s+1)*o]];export class DynamicTiledNavMesh{constructor(i){this.navMeshVersion=0,this.onNavMeshUpdate=new l,this.abortController=new AbortController;const s=i.navMeshBounds.min,r=i.navMeshBounds.max,n=[s.toArray(),r.toArray()],h=i.navMeshBounds.min;this.navMeshBoundsMin=s,this.navMeshBoundsMax=r,this.navMeshBounds=n,this.navMeshOrigin=h,this.cacheId=i.cacheId,this.workerLimit=Math.min(4,Math.max(0,i.workers));const d={...o,...i.recastConfig};this.recastConfig=d;const u=new t,{tileWidth:c,tileHeight:M,tcs:m,maxPolysPerTile:v}=a({recastConfig:d,navMeshBounds:n});this.tileWidth=c,this.tileHeight=M,this.tcs=m;const f=e.create({orig:h,tileWidth:d.tileSize*d.cs,tileHeight:d.tileSize*d.cs,maxTiles:i.maxTiles,maxPolys:v});u.initTiled(f),this.navMesh=u}onResult(t){if(t.data.error)return void console.error(t.data.error);const{tileX:e,tileY:o,navMeshData:n}=t.data;if(this.navMesh.removeTile(this.navMesh.getTileRefAt(e,o,0)),null==n)return this.navMeshVersion++,void this.onNavMeshUpdate.next([this.navMeshVersion,[e,o]]);const a=new s;a.copy(n);const h=this.navMesh.addTile(a,i.Module.DT_TILE_FREE_DATA,0);i.Detour.statusFailed(h.status)&&(console.error(i.Module.RC_LOG_WARNING,`Failed to add tile to nav mesh\n\ttx: ${e}, ty: ${o},status: ${r(h.status)} (${h.status})`),a.destroy()),this.navMeshVersion++,this.onNavMeshUpdate.next([this.navMeshVersion,[e,o]])}buildTile(t,e,[i,s],o=!1,r=[]){const n=c&&t.buffer instanceof window.SharedArrayBuffer,a=n?t:new Float32Array(t),l=n?e:new Uint32Array(e),[v,f]=getTileBounds(this.navMeshBoundsMin,this.navMeshBoundsMax,i,s,this.tcs),g={tileX:i,tileY:s,tileBoundsMin:v,tileBoundsMax:f,recastConfig:this.recastConfig,navMeshBounds:this.navMeshBounds,keepIntermediates:!1,positions:a,indices:l,areaModifiers:r};return this.workerLimit>0&&u()?d("navmesh.buildTile",g,{transfer:n?void 0:[a.buffer,l.buffer],signal:this.abortController.signal,priority:"background"}).then(t=>this.onResult({data:t})).catch(t=>{"AbortError"!==t?.name&&console.error("Navmesh worker failed",t)}):new Promise(t=>{requestIdleCallback(()=>{const e=this.cacheId+JSON.stringify({tileX:g.tileX,tileY:g.tileY,areaModifiers:g.areaModifiers});if(o){const i=localStorage.getItem(e);if(null!=i){const e=m(i);return this.onResult({data:{tileX:g.tileX,tileY:g.tileY,navMeshData:e}}),void t({})}}else localStorage.removeItem(e);const i=h(g);if(!i.success)return console.error("error"in i?i.error:"Unknown navmesh tile build error"),void t(i);if(!i.data)return localStorage.removeItem(e),this.onResult({data:{tileX:g.tileX,tileY:g.tileY}}),void t(i);const s=i.data.toTypedArray();localStorage.setItem(e,M(s)),this.onResult({data:{tileX:g.tileX,tileY:g.tileY,navMeshData:s}}),t(i)})})}buildAllTiles(t,e){const{tileWidth:i,tileHeight:s}=this;for(let o=0;o<s;o++)for(let s=0;s<i;s++)this.buildTile(t,e,[s,o])}getTileForWorldPosition(t){return[Math.floor((t.x-this.navMeshBoundsMin.x)/this.tcs),Math.floor((t.z-this.navMeshBoundsMin.z)/this.tcs)]}getTilesForBounds(t){if(!t.intersectsBox(new n.Box3(this.navMeshBoundsMin,this.navMeshBoundsMax)))return[];const e=this.getTileForWorldPosition(t.min),i=this.getTileForWorldPosition(t.max);e[0]=Math.max(0,Math.min(this.tileWidth-1,e[0])),e[1]=Math.max(0,Math.min(this.tileHeight-1,e[1])),i[0]=Math.max(0,Math.min(this.tileWidth-1,i[0])),i[1]=Math.max(0,Math.min(this.tileHeight-1,i[1]));const s=[];for(let t=e[1];t<=i[1];t++)for(let o=e[0];o<=i[0];o++)s.push([o,t]);return s}destroy(){this.abortController.abort(),this.navMesh.destroy(),this.onNavMeshUpdate.complete()}}const M=function(t){return btoa(String.fromCharCode(...t))},m=function(t){if(!t)return null;const e=atob(t),i=e.length,s=new Uint8Array(i);for(let t=0;t<i;t++)s[t]=e.charCodeAt(t);return s};/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BuildTileMeshProps } from './build-tile.js';
|
|
2
|
+
import type { TaskHandler } from '../../worker/task.js';
|
|
3
|
+
export type NavMeshWorkerResult = {
|
|
4
|
+
tileX: number;
|
|
5
|
+
tileY: number;
|
|
6
|
+
navMeshData?: Uint8Array;
|
|
7
|
+
};
|
|
8
|
+
export declare const navMeshTaskHandlers: {
|
|
9
|
+
'navmesh.buildTile': TaskHandler<BuildTileMeshProps, NavMeshWorkerResult>;
|
|
10
|
+
};
|
|
2
11
|
//# sourceMappingURL=dynamic-tiled-navmesh.worker.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{init as e}from"recast-navigation";import{buildTile as t}from"./build-tile.js";let
|
|
1
|
+
import{init as e}from"recast-navigation";import{buildTile as t}from"./build-tile.js";let r;export const navMeshTaskHandlers={"navmesh.buildTile":async a=>{r??(r=e()),await r;const i=t(a);if(!i.success){const e="error"in i?i.error:"Unknown navmesh tile build error";throw new Error(`NavMesh tile build failed (${a.tileX}, ${a.tileY}): ${e}`)}if(!i.data)return{payload:{tileX:a.tileX,tileY:a.tileY}};const l=i.data.toTypedArray();return i.data.destroy(),{payload:{tileX:a.tileX,tileY:a.tileY,navMeshData:l},transfer:[l.buffer]}}};/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export*from"./navigation.js";export*from"./behavior-tree/bt.js";export*from"./behavior-tree/move.js";/*
|
|
1
|
+
export*from"./navigation.js";export*from"./navigation-areas.js";export*from"./behavior-tree/bt.js";export*from"./behavior-tree/move.js";/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Vector3Tuple } from 'recast-navigation';
|
|
2
|
+
export declare enum NavigationArea {
|
|
3
|
+
Ground = 0,
|
|
4
|
+
Water = 1
|
|
5
|
+
}
|
|
6
|
+
export declare enum NavigationTraversalFlag {
|
|
7
|
+
Walk = 1,
|
|
8
|
+
Swim = 2
|
|
9
|
+
}
|
|
10
|
+
/** Worker-safe description of a convex navigation-area prism. */
|
|
11
|
+
export type NavigationAreaModifier = {
|
|
12
|
+
area: NavigationArea;
|
|
13
|
+
vertices: Vector3Tuple[];
|
|
14
|
+
minHeight: number;
|
|
15
|
+
maxHeight: number;
|
|
16
|
+
};
|
|
17
|
+
/** Internal extension point for actors which classify generated navigation spans. */
|
|
18
|
+
export interface NavigationAreaContributor {
|
|
19
|
+
getNavigationAreaModifiers(): NavigationAreaModifier[];
|
|
20
|
+
}
|
|
21
|
+
export declare function isNavigationAreaContributor(value: unknown): value is NavigationAreaContributor;
|
|
22
|
+
//# sourceMappingURL=navigation-areas.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export var NavigationArea;!function(a){a[a.Ground=0]="Ground",a[a.Water=1]="Water"}(NavigationArea||(NavigationArea={}));export var NavigationTraversalFlag;!function(a){a[a.Walk=1]="Walk",a[a.Swim=2]="Swim"}(NavigationTraversalFlag||(NavigationTraversalFlag={}));export function isNavigationAreaContributor(a){return"function"==typeof a?.getNavigationAreaModifiers}/*
|
|
2
|
+
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
|
+
* See the LICENSE.md file for details.
|
|
4
|
+
*/
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import { Vector3 } from "three";
|
|
2
|
+
import { NavigationArea, NavigationTraversalFlag } from './navigation-areas.js';
|
|
3
|
+
export type NavigationQueryProfile = Readonly<{
|
|
4
|
+
name: string;
|
|
5
|
+
includeFlags: number;
|
|
6
|
+
excludeFlags: number;
|
|
7
|
+
areaCosts?: Readonly<Partial<Record<NavigationArea, number>>>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const NavigationQueryProfiles: Readonly<{
|
|
10
|
+
Walker: Readonly<{
|
|
11
|
+
name: "Walker";
|
|
12
|
+
includeFlags: NavigationTraversalFlag.Walk;
|
|
13
|
+
excludeFlags: NavigationTraversalFlag.Swim;
|
|
14
|
+
}>;
|
|
15
|
+
Swimmer: Readonly<{
|
|
16
|
+
name: "Swimmer";
|
|
17
|
+
includeFlags: number;
|
|
18
|
+
excludeFlags: 0;
|
|
19
|
+
areaCosts: {
|
|
20
|
+
1: number;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
2
24
|
export declare class Navigation {
|
|
3
25
|
private navMeshActor;
|
|
4
26
|
private query?;
|
|
5
27
|
private world;
|
|
28
|
+
private filters;
|
|
6
29
|
constructor();
|
|
30
|
+
private getFilter;
|
|
7
31
|
private ensureQuery;
|
|
8
32
|
/**
|
|
9
33
|
* Finds a path from a start point to an end point.
|
|
10
34
|
*/
|
|
11
|
-
findPath(start: Vector3, end: Vector3): {
|
|
35
|
+
findPath(start: Vector3, end: Vector3, profile?: NavigationQueryProfile): {
|
|
12
36
|
success: boolean;
|
|
13
37
|
path: Vector3[];
|
|
14
38
|
};
|
|
@@ -16,12 +40,12 @@ export declare class Navigation {
|
|
|
16
40
|
* Finds the closest point on the navmesh to a given position.
|
|
17
41
|
* Returns null if it can't be found or if nav mesh has not been generated
|
|
18
42
|
*/
|
|
19
|
-
findClosestPoint(position: Vector3): Vector3 | null;
|
|
20
|
-
findRandomPoint(): {
|
|
43
|
+
findClosestPoint(position: Vector3, profile?: NavigationQueryProfile): Vector3 | null;
|
|
44
|
+
findRandomPoint(profile?: NavigationQueryProfile): {
|
|
21
45
|
success: boolean;
|
|
22
46
|
randomPoint: Vector3;
|
|
23
47
|
};
|
|
24
|
-
findRandomPointAroundCircle(position: Vector3, radius: number): {
|
|
48
|
+
findRandomPointAroundCircle(position: Vector3, radius: number, profile?: NavigationQueryProfile): {
|
|
25
49
|
success: boolean;
|
|
26
50
|
randomPoint: Vector3;
|
|
27
51
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__decorate as e,__metadata as t}from"tslib";import{NavMeshQuery as n}from"recast-navigation";import{Vector3 as
|
|
1
|
+
import{__decorate as e,__metadata as t}from"tslib";import{NavMeshQuery as n,QueryFilter as s}from"recast-navigation";import{Vector3 as r}from"three";import{inject as i,Service as o,World as l}from"../index.js";import a,{safeRecastInit as u}from"../actors/builtin/navmesh-actor.js";import{NavigationArea as c,NavigationTraversalFlag as h}from"./navigation-areas.js";export const NavigationQueryProfiles=Object.freeze({Walker:Object.freeze({name:"Walker",includeFlags:h.Walk,excludeFlags:h.Swim}),Swimmer:Object.freeze({name:"Swimmer",includeFlags:h.Walk|h.Swim,excludeFlags:0,areaCosts:{[c.Water]:2}})});let d=class{constructor(){this.world=i(l),this.filters=new Map,u().then(()=>{const e=this.world.actors.find(e=>e instanceof a);null!=e&&(this.navMeshActor=e,this.query=null),this.world.actorAdded.subscribe(e=>{e instanceof a&&(this.navMeshActor=e,this.query=null)}),this.world.actorRemoved.subscribe(e=>{e instanceof a&&e.id===this.navMeshActor?.id&&(this.navMeshActor=null,this.query=null)})})}getFilter(e){let t=this.filters.get(e);if(null!=t)return t;t=new s,t.includeFlags=e.includeFlags,t.excludeFlags=e.excludeFlags;for(const[n,s]of Object.entries(e.areaCosts??{}))null!=s&&t.setAreaCost(Number(n),s);return this.filters.set(e,t),t}ensureQuery(){null==this.query&&null!=this.navMeshActor&&null!=this.navMeshActor.navMesh&&(this.query=new n(this.navMeshActor.navMesh))}findPath(e,t,n=NavigationQueryProfiles.Walker){if(this.ensureQuery(),null==this.query)return y("NavMesh has not been generated yet"),f;const s=this.findClosestPoint(e,n);if(null==s)return y("Start point could not be found on NavMesh",e),f;const i=this.findClosestPoint(t,n);if(null==i)return y("End point could not be found on NavMesh",t),f;const{success:o,error:l,path:a}=this.query.computePath(s,i,{filter:this.getFilter(n)}),u=a.at(-1),c=null!=u&&function(e,t){const n=e.x-t.x,s=e.y-t.y,r=e.z-t.z;return n*n+s*s+r*r}(u,i)<=.01;return o&&c?{success:!0,path:a.map(e=>new r(e.x,e.y,e.z))}:(y("Failed to generate path",l),f)}findClosestPoint(e,t=NavigationQueryProfiles.Walker){if(this.ensureQuery(),null==this.query)return y("NavMesh has not been generated yet"),null;const{success:n,point:s}=this.query.findClosestPoint(e,{filter:this.getFilter(t)});return n?new r(s.x,s.y,s.z):null}findRandomPoint(e=NavigationQueryProfiles.Walker){if(this.ensureQuery(),null==this.query)return y("NavMesh has not been generated yet"),null;const t=this.query.findRandomPoint({filter:this.getFilter(e)});return{success:t.success,randomPoint:(new r).copy(t.randomPoint)}}findRandomPointAroundCircle(e,t,n=NavigationQueryProfiles.Walker){if(this.ensureQuery(),null==this.query)return y("NavMesh has not been generated yet"),null;const s=this.query.findRandomPointAroundCircle(e,t,{filter:this.getFilter(n)});return{success:s.success,randomPoint:(new r).copy(s.randomPoint)}}};d=e([o(),t("design:paramtypes",[])],d);export{d as Navigation};const f={success:!1,path:[]};let m=new Set;function y(e,...t){m.has(e)||(m.add(e),setTimeout(()=>m.delete(e),2e3),console.warn(e,...t))}/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { AssetMeshInstance } from './scene/asset-resource-loader.js';
|
|
|
5
5
|
export { registerWorker, initWorker } from './worker/index.js';
|
|
6
6
|
export * from './shader/index.js';
|
|
7
7
|
export * from './gameplay/actors/builtin/post-process-volume-actor.js';
|
|
8
|
+
export * from './gameplay/actors/builtin/water-volume-actor.js';
|
|
9
|
+
export * from './gameplay/actors/builtin/water-spline-volume-actor.js';
|
|
8
10
|
export * from './scene/objects/prefab.js';
|
|
9
11
|
export * from './scene/objects/data-asset.js';
|
|
10
12
|
export * from './effects/sequence/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{loadScene}from"./scene/bootstrap.js";export{BaseGameController}from"./controllers/base-game-controller.js";export*from"./scene/collision/collision-shape.js";export{AssetMeshInstance}from"./scene/asset-resource-loader.js";export{registerWorker,initWorker}from"./worker/index.js";export*from"./shader/index.js";export*from"./gameplay/actors/builtin/post-process-volume-actor.js";export*from"./scene/objects/prefab.js";export*from"./scene/objects/data-asset.js";export*from"./effects/sequence/index.js";export*from"./data/surface-definition.js";export*from"./scene/surface-query.js";/*
|
|
1
|
+
export{loadScene}from"./scene/bootstrap.js";export{BaseGameController}from"./controllers/base-game-controller.js";export*from"./scene/collision/collision-shape.js";export{AssetMeshInstance}from"./scene/asset-resource-loader.js";export{registerWorker,initWorker}from"./worker/index.js";export*from"./shader/index.js";export*from"./gameplay/actors/builtin/post-process-volume-actor.js";export*from"./gameplay/actors/builtin/water-volume-actor.js";export*from"./gameplay/actors/builtin/water-spline-volume-actor.js";export*from"./scene/objects/prefab.js";export*from"./scene/objects/data-asset.js";export*from"./effects/sequence/index.js";export*from"./data/surface-definition.js";export*from"./scene/surface-query.js";/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|
|
@@ -49,6 +49,8 @@ type SpotLightSettings = {
|
|
|
49
49
|
penumbra: number;
|
|
50
50
|
castShadow: boolean;
|
|
51
51
|
volumetricIntensity: number;
|
|
52
|
+
/** Optional projected texture (gobo/cookie) used to modulate the light. */
|
|
53
|
+
mapTextureId?: AssetId | null;
|
|
52
54
|
};
|
|
53
55
|
type AmbientLightSettings = {
|
|
54
56
|
color: string;
|
|
@@ -612,6 +614,7 @@ export declare class SceneMaterializer {
|
|
|
612
614
|
}>;
|
|
613
615
|
private createParticleSystem;
|
|
614
616
|
private createLight;
|
|
617
|
+
private loadSpotLightMap;
|
|
615
618
|
private applyDirectionalAmbientLight;
|
|
616
619
|
private applyDirectionalLight;
|
|
617
620
|
dispose(): void;
|