@adobe/data-gpu 0.9.69 → 0.9.72
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/core/core-plugin.d.ts +4 -4
- package/dist/core/core-plugin.js +2 -2
- package/dist/core/core-plugin.js.map +1 -1
- package/dist/core/frame-time/frame-time-plugin.d.ts +1 -1
- package/dist/core/frame-time/frame-time-plugin.js +1 -1
- package/dist/core/frame-time/frame-time-plugin.js.map +1 -1
- package/dist/graphics/animation/animation-plugin.d.ts +3 -3
- package/dist/graphics/camera/camera-plugin.d.ts +21 -21
- package/dist/graphics/camera/orbit/orbit-data-plugin.d.ts +51 -51
- package/dist/graphics/camera/orbit/orbit-plugin.d.ts +51 -51
- package/dist/graphics/camera/orbit/orbit-system-plugin.d.ts +51 -51
- package/dist/graphics/graphics-plugin.d.ts +21 -21
- package/dist/graphics/graphics-plugin.js +7 -7
- package/dist/graphics/graphics-plugin.js.map +1 -1
- package/dist/graphics/picking/picking-plugin.d.ts +622 -622
- package/dist/graphics/rendering/bone-collider-plugin.d.ts +260 -260
- package/dist/graphics/rendering/ibl-render/ibl-render-plugin.d.ts +103 -103
- package/dist/graphics/rendering/ibl-render/ibl-render-plugin.js +4 -4
- package/dist/graphics/rendering/ibl-render/ibl-render-plugin.js.map +1 -1
- package/dist/graphics/rendering/interpolation-plugin.d.ts +133 -133
- package/dist/graphics/rendering/jolt-ragdoll-plugin.d.ts +208 -208
- package/dist/graphics/rendering/material-gpu/material-gpu-plugin.d.ts +7 -7
- package/dist/graphics/rendering/material-gpu/material-gpu-plugin.js +3 -3
- package/dist/graphics/rendering/material-gpu/material-gpu-plugin.js.map +1 -1
- package/dist/graphics/rendering/model-collider-plugin.d.ts +126 -126
- package/dist/graphics/rendering/pbr-render/pbr-render-plugin.d.ts +106 -106
- package/dist/graphics/rendering/pbr-render/physics-bridge-plugin.d.ts +261 -261
- package/dist/graphics/rendering/ragdoll-trigger-plugin.d.ts +2 -2
- package/dist/graphics/rendering/ragdoll-trigger-plugin.js +1 -1
- package/dist/graphics/rendering/ragdoll-trigger-plugin.js.map +1 -1
- package/dist/graphics/rendering/skinning/skinning-plugin.d.ts +156 -156
- package/dist/graphics/scene/model/model-loader-plugin.d.ts +126 -126
- package/dist/graphics/scene/model/shape/shape-geometry-plugin.d.ts +125 -125
- package/dist/graphics/scene/model/shape/shape-geometry-plugin.js +1 -1
- package/dist/graphics/scene/model/shape/shape-geometry-plugin.js.map +1 -1
- package/dist/graphics/scene/model/world-bounds-plugin.d.ts +121 -121
- package/dist/graphics/scene/scene-plugin.d.ts +36 -36
- package/dist/graphics/scene/scene-uniforms/scene-uniforms-plugin.d.ts +34 -34
- package/dist/graphics/scene/scene-uniforms/scene-uniforms-plugin.js +1 -1
- package/dist/graphics/scene/scene-uniforms/scene-uniforms-plugin.js.map +1 -1
- package/dist/physics/physics-clock-plugin.d.ts +9 -9
- package/dist/physics/physics-clock-plugin.js +1 -1
- package/dist/physics/physics-clock-plugin.js.map +1 -1
- package/dist/physics/solvers/jolt-solver-plugin.d.ts +38 -38
- package/dist/physics/solvers/jolt-solver-plugin.js +1 -1
- package/dist/physics/solvers/jolt-solver-plugin.js.map +1 -1
- package/dist/physics/solvers/rapier-solver-plugin.d.ts +37 -37
- package/package.json +2 -2
- package/src/core/core-plugin.ts +2 -2
- package/src/core/frame-time/frame-time-plugin.ts +1 -1
- package/src/graphics/graphics-plugin.ts +7 -7
- package/src/graphics/rendering/ibl-render/ibl-render-plugin.ts +4 -4
- package/src/graphics/rendering/material-gpu/material-gpu-plugin.ts +3 -3
- package/src/graphics/rendering/ragdoll-trigger-plugin.ts +1 -1
- package/src/graphics/scene/model/shape/shape-geometry-plugin.ts +1 -1
- package/src/graphics/scene/scene-uniforms/scene-uniforms-plugin.ts +1 -1
- package/src/physics/physics-clock-plugin.ts +1 -1
- package/src/physics/solvers/jolt-solver-plugin.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/src/core/core-plugin.ts
CHANGED
|
@@ -33,8 +33,8 @@ async function getWebGPUDevice() {
|
|
|
33
33
|
export const core = Database.Plugin.create({
|
|
34
34
|
extends: Database.Plugin.combine(scheduler, FrameTime.plugin),
|
|
35
35
|
resources: {
|
|
36
|
-
device: { default: null as GPUDevice | null,
|
|
37
|
-
commandEncoder: { default: null as GPUCommandEncoder | null,
|
|
36
|
+
device: { default: null as GPUDevice | null, nonPersistent: true },
|
|
37
|
+
commandEncoder: { default: null as GPUCommandEncoder | null, nonPersistent: true },
|
|
38
38
|
},
|
|
39
39
|
systems: {
|
|
40
40
|
input: {
|
|
@@ -20,11 +20,11 @@ import { core } from "../core/core-plugin.js";
|
|
|
20
20
|
export const graphics = Database.Plugin.create({
|
|
21
21
|
extends: core,
|
|
22
22
|
resources: {
|
|
23
|
-
renderPassEncoder: { default: null as GPURenderPassEncoder | null,
|
|
24
|
-
depthTexture: { default: null as GPUTexture | null,
|
|
25
|
-
clearColor: { default: [0, 0, 0, 1] as Vec4,
|
|
26
|
-
canvas: { default: null as HTMLCanvasElement | null,
|
|
27
|
-
canvasContext: { default: null as GPUCanvasContext | null,
|
|
23
|
+
renderPassEncoder: { default: null as GPURenderPassEncoder | null, nonPersistent: true },
|
|
24
|
+
depthTexture: { default: null as GPUTexture | null, nonPersistent: true },
|
|
25
|
+
clearColor: { default: [0, 0, 0, 1] as Vec4, nonPersistent: true },
|
|
26
|
+
canvas: { default: null as HTMLCanvasElement | null, nonPersistent: true },
|
|
27
|
+
canvasContext: { default: null as GPUCanvasContext | null, nonPersistent: true },
|
|
28
28
|
// Guarded for headless hosts (Node): this default is evaluated at module
|
|
29
29
|
// load, and `navigator` is browser-only. Rendering re-derives the real
|
|
30
30
|
// preferred format when a canvas is configured; the placeholder is unused.
|
|
@@ -32,9 +32,9 @@ export const graphics = Database.Plugin.create({
|
|
|
32
32
|
default: (typeof navigator !== "undefined" && navigator.gpu
|
|
33
33
|
? navigator.gpu.getPreferredCanvasFormat()
|
|
34
34
|
: "bgra8unorm") as GPUTextureFormat,
|
|
35
|
-
|
|
35
|
+
nonPersistent: true,
|
|
36
36
|
},
|
|
37
|
-
depthFormat: { default: "depth24plus" as GPUTextureFormat,
|
|
37
|
+
depthFormat: { default: "depth24plus" as GPUTextureFormat, nonPersistent: true },
|
|
38
38
|
},
|
|
39
39
|
transactions: {
|
|
40
40
|
setCanvas(t, canvas: HTMLCanvasElement | null) {
|
|
@@ -60,10 +60,10 @@ function createSkyboxBindGroupLayout(device: GPUDevice): GPUBindGroupLayout {
|
|
|
60
60
|
export const pbrIblRender = Database.Plugin.create({
|
|
61
61
|
extends: Database.Plugin.combine(pbrCore, modelLoader, SceneUniforms.plugin, transform),
|
|
62
62
|
resources: {
|
|
63
|
-
_iblEnvironment: { default: null as GPUTexture | null,
|
|
64
|
-
_iblIrradiance: { default: null as GPUTexture | null,
|
|
65
|
-
_iblPrefiltered: { default: null as GPUTexture | null,
|
|
66
|
-
_iblBrdfLut: { default: null as GPUTexture | null,
|
|
63
|
+
_iblEnvironment: { default: null as GPUTexture | null, nonPersistent: true },
|
|
64
|
+
_iblIrradiance: { default: null as GPUTexture | null, nonPersistent: true },
|
|
65
|
+
_iblPrefiltered: { default: null as GPUTexture | null, nonPersistent: true },
|
|
66
|
+
_iblBrdfLut: { default: null as GPUTexture | null, nonPersistent: true },
|
|
67
67
|
},
|
|
68
68
|
systems: {
|
|
69
69
|
iblInitSystem: {
|
|
@@ -34,9 +34,9 @@ export const materialGpu = Database.Plugin.create({
|
|
|
34
34
|
_layerIndex: U32.schema,
|
|
35
35
|
},
|
|
36
36
|
resources: {
|
|
37
|
-
_materialArrays: { default: null as MaterialArrays | null,
|
|
38
|
-
_materialPalette: { default: null as GPUBuffer | null,
|
|
39
|
-
_materialBindGroup: { default: null as GPUBindGroup | null,
|
|
37
|
+
_materialArrays: { default: null as MaterialArrays | null, nonPersistent: true },
|
|
38
|
+
_materialPalette: { default: null as GPUBuffer | null, nonPersistent: true },
|
|
39
|
+
_materialBindGroup: { default: null as GPUBindGroup | null, nonPersistent: true },
|
|
40
40
|
},
|
|
41
41
|
systems: {
|
|
42
42
|
materialGpuBuilder: {
|
|
@@ -12,7 +12,7 @@ import { Database } from "@adobe/data/ecs";
|
|
|
12
12
|
*/
|
|
13
13
|
export const ragdollTrigger = Database.Plugin.create({
|
|
14
14
|
resources: {
|
|
15
|
-
_ragdollTrigger: { default: false as boolean,
|
|
15
|
+
_ragdollTrigger: { default: false as boolean, nonPersistent: true },
|
|
16
16
|
},
|
|
17
17
|
transactions: {
|
|
18
18
|
/** Go limp: the active ragdoll backend flips its bones to dynamic. */
|
|
@@ -19,7 +19,7 @@ import { uploadShapeMesh } from "./upload-shape-mesh.js";
|
|
|
19
19
|
export const shapeGeometry = Database.Plugin.create({
|
|
20
20
|
extends: Database.Plugin.combine(pbrCore, model, core),
|
|
21
21
|
resources: {
|
|
22
|
-
_shapeGeometry: { default: null as { sphere: Entity; cube: Entity } | null,
|
|
22
|
+
_shapeGeometry: { default: null as { sphere: Entity; cube: Entity } | null, nonPersistent: true },
|
|
23
23
|
},
|
|
24
24
|
transactions: {
|
|
25
25
|
insertShapePrimitive(t, args: { vertexBuffer: GPUBuffer; indexBuffer: GPUBuffer; indexCount: number }): Entity {
|
|
@@ -25,7 +25,7 @@ const sceneUniformsStructLayout = getStructLayout(sceneUniformsSchema);
|
|
|
25
25
|
export const plugin = Database.Plugin.create({
|
|
26
26
|
extends: Database.Plugin.combine(Camera.plugin, Light.plugin),
|
|
27
27
|
resources: {
|
|
28
|
-
_sceneUniformsBuffer: { default: null as GPUBuffer | null,
|
|
28
|
+
_sceneUniformsBuffer: { default: null as GPUBuffer | null, nonPersistent: true },
|
|
29
29
|
},
|
|
30
30
|
systems: {
|
|
31
31
|
sceneUniformsSystem: {
|
|
@@ -36,7 +36,7 @@ const DEFAULT: PhysicsClock = { fixedDt: 1 / 60, accumulator: 0, alpha: 0, steps
|
|
|
36
36
|
export const physicsClock = Database.Plugin.create({
|
|
37
37
|
extends: core,
|
|
38
38
|
resources: {
|
|
39
|
-
physicsClock: { default: DEFAULT as PhysicsClock,
|
|
39
|
+
physicsClock: { default: DEFAULT as PhysicsClock, nonPersistent: true },
|
|
40
40
|
},
|
|
41
41
|
transactions: {
|
|
42
42
|
/** Set the simulation rate (Hz). Call once at init; default is 60. */
|
|
@@ -80,7 +80,7 @@ export const joltSolver = Database.Plugin.create({
|
|
|
80
80
|
_joltJoint: True.schema, // tag: this joint has been mirrored into the Jolt world
|
|
81
81
|
},
|
|
82
82
|
resources: {
|
|
83
|
-
_joltContext: { default: null as JoltContext | null,
|
|
83
|
+
_joltContext: { default: null as JoltContext | null, nonPersistent: true },
|
|
84
84
|
},
|
|
85
85
|
systems: {
|
|
86
86
|
joltStep: {
|