@onerjs/core 8.53.9 → 8.54.2
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/Collisions/gpuPicker.js +7 -6
- package/Collisions/gpuPicker.js.map +1 -1
- package/Engines/Extensions/engine.texture2DArrayImageSource.d.ts +6 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.js +9 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.js.map +1 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.pure.d.ts +7 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.pure.js +40 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.pure.js.map +1 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.types.d.ts +21 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.types.js +2 -0
- package/Engines/Extensions/engine.texture2DArrayImageSource.types.js.map +1 -0
- package/Engines/Extensions/pure.d.ts +1 -0
- package/Engines/Extensions/pure.js +1 -0
- package/Engines/Extensions/pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.texture2DArrayImageSource.d.ts +6 -0
- package/Engines/WebGPU/Extensions/engine.texture2DArrayImageSource.js +9 -0
- package/Engines/WebGPU/Extensions/engine.texture2DArrayImageSource.js.map +1 -0
- package/Engines/WebGPU/Extensions/engine.texture2DArrayImageSource.pure.d.ts +7 -0
- package/Engines/WebGPU/Extensions/engine.texture2DArrayImageSource.pure.js +23 -0
- package/Engines/WebGPU/Extensions/engine.texture2DArrayImageSource.pure.js.map +1 -0
- package/Engines/WebGPU/Extensions/pure.d.ts +1 -0
- package/Engines/WebGPU/Extensions/pure.js +1 -0
- package/Engines/WebGPU/Extensions/pure.js.map +1 -1
- package/Engines/engine.d.ts +30 -0
- package/Engines/thinNativeEngine.pure.js +4 -4
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +6 -0
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.d.ts +10 -0
- package/Loading/Plugins/babylonFileLoader.js +18 -0
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.pure.js +10 -2
- package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +2 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.d.ts +13 -5
- package/Materials/Node/nodeMaterial.pure.js +20 -2
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -0
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/pure.d.ts +1 -0
- package/Materials/Textures/pure.js +1 -0
- package/Materials/Textures/pure.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.functions.d.ts +66 -0
- package/Materials/Textures/rawTexture2DArray.functions.js +130 -0
- package/Materials/Textures/rawTexture2DArray.functions.js.map +1 -0
- package/Materials/Textures/renderTargetTexture.pure.js +7 -0
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Meshes/Compression/dracoEncoder.d.ts +4 -0
- package/Meshes/Compression/dracoEncoder.js +5 -1
- package/Meshes/Compression/dracoEncoder.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +13 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +15 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.js +2 -1
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +15 -0
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/characterController.d.ts +17 -0
- package/Physics/v2/characterController.js +40 -0
- package/Physics/v2/characterController.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.d.ts +3 -1
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js +25 -4
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +6 -5
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.d.ts +3 -1
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js +16 -4
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +6 -5
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.d.ts +3 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +16 -4
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/depthRenderer.d.ts +2 -0
- package/Rendering/depthRenderer.js +2 -0
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/depthRenderer.pure.js +3 -2
- package/Rendering/depthRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderer.pure.js +6 -0
- package/Rendering/fluidRenderer/fluidRenderer.pure.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.js +5 -5
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/XR/features/WebXRBodyTracking.pure.d.ts +0 -28
- package/XR/features/WebXRBodyTracking.pure.js.map +1 -1
- package/package.json +1 -1
|
@@ -184,6 +184,7 @@ export declare class PhysicsCharacterController {
|
|
|
184
184
|
private _body;
|
|
185
185
|
private _transformNode;
|
|
186
186
|
private _ownShape;
|
|
187
|
+
protected _shapeOptions: CharacterShapeOptions;
|
|
187
188
|
private _manifold;
|
|
188
189
|
private _stepUpSavedManifold;
|
|
189
190
|
private _lastDisplacement;
|
|
@@ -326,6 +327,22 @@ export declare class PhysicsCharacterController {
|
|
|
326
327
|
* Set shape used for collision
|
|
327
328
|
*/
|
|
328
329
|
set shape(value: PhysicsShape);
|
|
330
|
+
/**
|
|
331
|
+
* Get the shape options used to build the collision shape
|
|
332
|
+
*/
|
|
333
|
+
get shapeOptions(): CharacterShapeOptions;
|
|
334
|
+
/**
|
|
335
|
+
* Set new shape options and rebuild the collision shape accordingly.
|
|
336
|
+
* When the options provide an explicit `shape`, it is used directly; otherwise
|
|
337
|
+
* a capsule is created from the `capsuleHeight` / `capsuleRadius` values. The
|
|
338
|
+
* resulting shape is assigned through the shape setter, which releases the
|
|
339
|
+
* previously owned shape.
|
|
340
|
+
* @param characterShapeOptions character physics shape options
|
|
341
|
+
* @param preserveFootPosition when true (default), the controller position is adapted so the
|
|
342
|
+
* world-space foot position (center - up * footOffset) is kept fixed as the height changes; when
|
|
343
|
+
* false, the position is left unchanged.
|
|
344
|
+
*/
|
|
345
|
+
setShapeOptions(characterShapeOptions: CharacterShapeOptions, preserveFootPosition?: boolean): void;
|
|
329
346
|
/**
|
|
330
347
|
* Character position
|
|
331
348
|
* @returns Character position
|
|
@@ -198,6 +198,7 @@ export class PhysicsCharacterController {
|
|
|
198
198
|
this._tmpVecs[0].set(0, h * 0.5 - r, 0);
|
|
199
199
|
this._tmpVecs[1].set(0, -h * 0.5 + r, 0);
|
|
200
200
|
this._ownShape = !characterShapeOptions.shape;
|
|
201
|
+
this._shapeOptions = characterShapeOptions;
|
|
201
202
|
this._shape = characterShapeOptions.shape ?? new PhysicsShapeCapsule(this._tmpVecs[0], this._tmpVecs[1], r, scene);
|
|
202
203
|
this._transformNode = new TransformNode("CCTransformNode", scene);
|
|
203
204
|
this._transformNode.position.copyFrom(this._position);
|
|
@@ -244,6 +245,45 @@ export class PhysicsCharacterController {
|
|
|
244
245
|
this._body.shape = this._shape;
|
|
245
246
|
this._ownShape = false;
|
|
246
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Get the shape options used to build the collision shape
|
|
250
|
+
*/
|
|
251
|
+
get shapeOptions() {
|
|
252
|
+
return this._shapeOptions;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Set new shape options and rebuild the collision shape accordingly.
|
|
256
|
+
* When the options provide an explicit `shape`, it is used directly; otherwise
|
|
257
|
+
* a capsule is created from the `capsuleHeight` / `capsuleRadius` values. The
|
|
258
|
+
* resulting shape is assigned through the shape setter, which releases the
|
|
259
|
+
* previously owned shape.
|
|
260
|
+
* @param characterShapeOptions character physics shape options
|
|
261
|
+
* @param preserveFootPosition when true (default), the controller position is adapted so the
|
|
262
|
+
* world-space foot position (center - up * footOffset) is kept fixed as the height changes; when
|
|
263
|
+
* false, the position is left unchanged.
|
|
264
|
+
*/
|
|
265
|
+
setShapeOptions(characterShapeOptions, preserveFootPosition = true) {
|
|
266
|
+
this._shapeOptions = characterShapeOptions;
|
|
267
|
+
const r = characterShapeOptions.capsuleRadius ?? 0.6;
|
|
268
|
+
const h = characterShapeOptions.capsuleHeight ?? 1.8;
|
|
269
|
+
const newFootOffset = h * 0.5;
|
|
270
|
+
if (preserveFootPosition) {
|
|
271
|
+
// Compute the current world-space foot position (center - up * footOffset), then move the
|
|
272
|
+
// center so the feet stay fixed for the new half-height: center = foot + up * newFootOffset.
|
|
273
|
+
const foot = this._tmpVecs[2];
|
|
274
|
+
this.up.scaleToRef(this.footOffset, foot);
|
|
275
|
+
this._position.subtractToRef(foot, foot);
|
|
276
|
+
this.up.scaleToRef(newFootOffset, this._tmpVecs[3]);
|
|
277
|
+
foot.addToRef(this._tmpVecs[3], this._position);
|
|
278
|
+
this._transformNode.position.copyFrom(this._position);
|
|
279
|
+
}
|
|
280
|
+
this.footOffset = newFootOffset;
|
|
281
|
+
this._tmpVecs[0].set(0, h * 0.5 - r, 0);
|
|
282
|
+
this._tmpVecs[1].set(0, -h * 0.5 + r, 0);
|
|
283
|
+
const ownShape = !characterShapeOptions.shape;
|
|
284
|
+
this.shape = characterShapeOptions.shape ?? new PhysicsShapeCapsule(this._tmpVecs[0], this._tmpVecs[1], r, this._scene);
|
|
285
|
+
this._ownShape = ownShape;
|
|
286
|
+
}
|
|
247
287
|
/**
|
|
248
288
|
* Character position
|
|
249
289
|
* @returns Character position
|