@hology/core 0.0.262 → 0.0.263
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/gameplay/input/input.d.ts +1 -0
- package/dist/gameplay/input/input.js +1 -1
- package/dist/scene/assets-provider.d.ts +1 -0
- package/dist/scene/assets-provider.js +1 -1
- package/dist/scene/materializer.js +1 -1
- package/dist/scene/objects/data-asset.d.ts +6 -1
- package/dist/scene/objects/data-asset.js +1 -1
- package/dist/scene/runtime-asset-service.d.ts +5 -1
- package/dist/scene/runtime-asset-service.js +1 -1
- package/dist/scene/storage/packed-json.js +1 -1
- package/dist/test/data-asset-definition.test.js +1 -1
- package/dist/test/input.test.js +1 -1
- package/dist/test/packed-json.test.js +1 -1
- package/dist/test/runtime-asset-service.test.js +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Euler as t,Vector2 as i}from"three";import{ArrayMap as s}from"../../utils/collections.js";import{clamp as
|
|
1
|
+
import{Euler as t,Vector2 as i}from"three";import{ArrayMap as s}from"../../utils/collections.js";import{clamp as e}from"../../utils/math.js";export class AxisInput{constructor(){this.vector=new i,this.togglePositiveY=t=>{this.vector.y=t?1:Math.min(this.vector.y,0)},this.toggleNegativeY=t=>{this.vector.y=t?-1:Math.max(this.vector.y,0)},this.togglePositiveX=t=>{this.vector.x=t?1:Math.min(this.vector.x,0)},this.toggleNegativeX=t=>{this.vector.x=t?-1:Math.max(this.vector.x,0)},this.setX=t=>{this.vector.x=t},this.setY=t=>{this.vector.y=t}}get horizontal(){return this.vector.x}get vertical(){return this.vector.y}}class o{constructor(){this.map=new s}emit(t){this.map.get(t).forEach(t=>t())}add(t,i){this.map.push(t,i)}remove(t,i){const s=this.map.get(t),e=s.indexOf(i);e>=0&&s.splice(e,1)}}export class ButtonInput{constructor(t="hold",i=!1){this.mode=t,this.emitter=new o,this.activated=!1,this.toggle=t=>{if("toggle"!==this.mode)this.setActivated(t);else{if(t)return;this.setActivated(!this.activated)}},this.activated=i}setActivated(t){t!==this.activated&&(this.activated=t,this.activated?this.emitter.emit("start"):this.emitter.emit("end"))}onStart(t){this.emitter.add("start",t)}onEnd(t){this.emitter.add("end",t)}removeOnStart(t){this.emitter.remove("start",t)}}export class ActionInput extends ButtonInput{constructor(t=!1){super("hold",t)}}export class ToggleInput extends ButtonInput{constructor(t=!1){super("toggle",t)}}const h=2*Math.PI;export class RotationInput{constructor(){this.rotation=new t,this.rotateX=t=>{this.rotation.x=(this.rotation.x+t)%h},this.rotateY=t=>{this.rotation.y=(this.rotation.y+t)%h},this.rotateZ=t=>{this.rotation.z=(this.rotation.z+t)%h}}}export class RestrictedRotationInput extends RotationInput{constructor(i=-1/0,s=1/0,o=-1/0,h=1/0,r=-1/0,a=1/0){super(),this.minX=i,this.maxX=s,this.minY=o,this.maxY=h,this.minZ=r,this.maxZ=a,this.rotation=new t,this.rotateX=t=>{this.rotation.x=e(this.rotation.x+t,this.minX,this.maxX)},this.rotateY=t=>{this.rotation.y=e(this.rotation.y+t,this.minY,this.maxY)},this.rotateZ=t=>{this.rotation.z=e(this.rotation.z+t,this.minZ,this.maxZ)}}}export class DecimalInput{constructor(t=0,i,s){this.min=i,this.max=s,this.increment=t=>{this.value=e(this.value+t,this.min,this.max)},this.set=t=>{this.value=t},this.value=t}}/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Subject } from "rxjs";
|
|
2
2
|
import type { Asset, AssetId } from './model.js';
|
|
3
3
|
export declare abstract class AssetsProvider {
|
|
4
|
+
readonly supportsLiveDataAssets: boolean;
|
|
4
5
|
readonly supportsLivePrefabParameters: boolean;
|
|
5
6
|
onCreate: Subject<Asset>;
|
|
6
7
|
onDelete: Subject<Asset>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class AssetsProvider{constructor(){this.supportsLivePrefabParameters=!1}}/*
|
|
1
|
+
export class AssetsProvider{constructor(){this.supportsLiveDataAssets=!1,this.supportsLivePrefabParameters=!1}}/*
|
|
2
2
|
* Copyright (©) 2026 Hology Interactive AB. All rights reserved.
|
|
3
3
|
* See the LICENSE.md file for details.
|
|
4
4
|
*/
|