@opsydyn/effect-three 0.0.0-stage → 0.2.0
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/CHANGELOG.md +69 -0
- package/LICENSE +21 -0
- package/README.md +189 -2
- package/dist/index-01kwfekm.js +5118 -0
- package/dist/index-01kwfekm.js.map +40 -0
- package/dist/index-4045wme0.js +129 -0
- package/dist/index-4045wme0.js.map +10 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1361 -0
- package/dist/index.js.map +14 -0
- package/dist/kernel/animation.d.ts +14 -0
- package/dist/kernel/animation.d.ts.map +1 -0
- package/dist/kernel/behaviours.d.ts +16 -0
- package/dist/kernel/behaviours.d.ts.map +1 -0
- package/dist/kernel/bodies.d.ts +60 -0
- package/dist/kernel/bodies.d.ts.map +1 -0
- package/dist/kernel/bodySources.d.ts +47 -0
- package/dist/kernel/bodySources.d.ts.map +1 -0
- package/dist/kernel/build.d.ts +564 -0
- package/dist/kernel/build.d.ts.map +1 -0
- package/dist/kernel/cameraMotion.d.ts +39 -0
- package/dist/kernel/cameraMotion.d.ts.map +1 -0
- package/dist/kernel/clock.d.ts +17 -0
- package/dist/kernel/clock.d.ts.map +1 -0
- package/dist/kernel/contactShadowPasses.d.ts +47 -0
- package/dist/kernel/contactShadowPasses.d.ts.map +1 -0
- package/dist/kernel/description.d.ts +1120 -0
- package/dist/kernel/description.d.ts.map +1 -0
- package/dist/kernel/diff.d.ts +90 -0
- package/dist/kernel/diff.d.ts.map +1 -0
- package/dist/kernel/environmentPresets.d.ts +30 -0
- package/dist/kernel/environmentPresets.d.ts.map +1 -0
- package/dist/kernel/equality.d.ts +64 -0
- package/dist/kernel/equality.d.ts.map +1 -0
- package/dist/kernel/frames.d.ts +55 -0
- package/dist/kernel/frames.d.ts.map +1 -0
- package/dist/kernel/index.d.ts +37 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +335 -0
- package/dist/kernel/index.js.map +9 -0
- package/dist/kernel/instances.d.ts +26 -0
- package/dist/kernel/instances.d.ts.map +1 -0
- package/dist/kernel/labels.d.ts +51 -0
- package/dist/kernel/labels.d.ts.map +1 -0
- package/dist/kernel/loop.d.ts +49 -0
- package/dist/kernel/loop.d.ts.map +1 -0
- package/dist/kernel/materials.d.ts +24 -0
- package/dist/kernel/materials.d.ts.map +1 -0
- package/dist/kernel/motion.d.ts +36 -0
- package/dist/kernel/motion.d.ts.map +1 -0
- package/dist/kernel/orbit.d.ts +127 -0
- package/dist/kernel/orbit.d.ts.map +1 -0
- package/dist/kernel/overlays.d.ts +16 -0
- package/dist/kernel/overlays.d.ts.map +1 -0
- package/dist/kernel/performance.d.ts +41 -0
- package/dist/kernel/performance.d.ts.map +1 -0
- package/dist/kernel/physics.d.ts +166 -0
- package/dist/kernel/physics.d.ts.map +1 -0
- package/dist/kernel/physicsDebug.d.ts +18 -0
- package/dist/kernel/physicsDebug.d.ts.map +1 -0
- package/dist/kernel/pointer.d.ts +357 -0
- package/dist/kernel/pointer.d.ts.map +1 -0
- package/dist/kernel/renderKit.d.ts +49 -0
- package/dist/kernel/renderKit.d.ts.map +1 -0
- package/dist/kernel/renderer.d.ts +83 -0
- package/dist/kernel/renderer.d.ts.map +1 -0
- package/dist/kernel/resources.d.ts +112 -0
- package/dist/kernel/resources.d.ts.map +1 -0
- package/dist/kernel/sceneGraph.d.ts +155 -0
- package/dist/kernel/sceneGraph.d.ts.map +1 -0
- package/dist/kernel/sceneIndex.d.ts +90 -0
- package/dist/kernel/sceneIndex.d.ts.map +1 -0
- package/dist/kernel/stage.d.ts +87 -0
- package/dist/kernel/stage.d.ts.map +1 -0
- package/dist/kernel/textLayout.d.ts +29 -0
- package/dist/kernel/textLayout.d.ts.map +1 -0
- package/dist/kernel/tween.d.ts +35 -0
- package/dist/kernel/tween.d.ts.map +1 -0
- package/dist/kernel/xrInput.d.ts +107 -0
- package/dist/kernel/xrInput.d.ts.map +1 -0
- package/dist/kernel/xrLocomotion.d.ts +38 -0
- package/dist/kernel/xrLocomotion.d.ts.map +1 -0
- package/dist/runtime/FrameSource.d.ts +29 -0
- package/dist/runtime/FrameSource.d.ts.map +1 -0
- package/dist/runtime/ResourceRegistry.d.ts +18 -0
- package/dist/runtime/ResourceRegistry.d.ts.map +1 -0
- package/dist/runtime/SceneRuntime.d.ts +68 -0
- package/dist/runtime/SceneRuntime.d.ts.map +1 -0
- package/dist/runtime/SceneSchema.d.ts +2536 -0
- package/dist/runtime/SceneSchema.d.ts.map +1 -0
- package/dist/runtime/errors.d.ts +19 -0
- package/dist/runtime/errors.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +11 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/webgl/contactShadows.d.ts +5 -0
- package/dist/webgl/contactShadows.d.ts.map +1 -0
- package/dist/webgl/index.d.ts +11 -0
- package/dist/webgl/index.d.ts.map +1 -0
- package/dist/webgl/index.js +239 -0
- package/dist/webgl/index.js.map +13 -0
- package/dist/webgl/shaderGrid.d.ts +27 -0
- package/dist/webgl/shaderGrid.d.ts.map +1 -0
- package/dist/webgl/sky.d.ts +4 -0
- package/dist/webgl/sky.d.ts.map +1 -0
- package/dist/webgpu/contactShadows.d.ts +5 -0
- package/dist/webgpu/contactShadows.d.ts.map +1 -0
- package/dist/webgpu/index.d.ts +10 -0
- package/dist/webgpu/index.d.ts.map +1 -0
- package/dist/webgpu/index.js +216 -0
- package/dist/webgpu/index.js.map +13 -0
- package/dist/webgpu/shaderGrid.d.ts +5 -0
- package/dist/webgpu/shaderGrid.d.ts.map +1 -0
- package/dist/webgpu/sky.d.ts +4 -0
- package/dist/webgpu/sky.d.ts.map +1 -0
- package/package.json +82 -4
- package/src/index.ts +11 -0
- package/src/kernel/animation.ts +24 -0
- package/src/kernel/behaviours.ts +36 -0
- package/src/kernel/bodies.ts +338 -0
- package/src/kernel/bodySources.ts +203 -0
- package/src/kernel/build.ts +1325 -0
- package/src/kernel/cameraMotion.ts +202 -0
- package/src/kernel/clock.ts +35 -0
- package/src/kernel/contactShadowPasses.ts +207 -0
- package/src/kernel/description.ts +1197 -0
- package/src/kernel/diff.ts +383 -0
- package/src/kernel/environmentPresets.ts +38 -0
- package/src/kernel/equality.ts +604 -0
- package/src/kernel/frames.ts +124 -0
- package/src/kernel/index.ts +274 -0
- package/src/kernel/instances.ts +97 -0
- package/src/kernel/labels.ts +54 -0
- package/src/kernel/loop.ts +248 -0
- package/src/kernel/materials.ts +258 -0
- package/src/kernel/motion.ts +75 -0
- package/src/kernel/orbit.ts +554 -0
- package/src/kernel/overlays.ts +130 -0
- package/src/kernel/performance.ts +101 -0
- package/src/kernel/physics.ts +361 -0
- package/src/kernel/physicsDebug.ts +68 -0
- package/src/kernel/pointer.ts +785 -0
- package/src/kernel/renderKit.ts +54 -0
- package/src/kernel/renderer.ts +136 -0
- package/src/kernel/resources.ts +504 -0
- package/src/kernel/sceneGraph.ts +1442 -0
- package/src/kernel/sceneIndex.ts +219 -0
- package/src/kernel/stage.ts +157 -0
- package/src/kernel/textLayout.ts +102 -0
- package/src/kernel/tween.ts +80 -0
- package/src/kernel/xrInput.ts +230 -0
- package/src/kernel/xrLocomotion.ts +72 -0
- package/src/runtime/FrameSource.ts +41 -0
- package/src/runtime/ResourceRegistry.ts +24 -0
- package/src/runtime/SceneRuntime.ts +229 -0
- package/src/runtime/SceneSchema.ts +983 -0
- package/src/runtime/errors.ts +18 -0
- package/src/runtime/index.ts +10 -0
- package/src/webgl/contactShadows.ts +67 -0
- package/src/webgl/index.ts +19 -0
- package/src/webgl/shaderGrid.ts +196 -0
- package/src/webgl/sky.ts +42 -0
- package/src/webgpu/contactShadows.ts +83 -0
- package/src/webgpu/index.ts +19 -0
- package/src/webgpu/shaderGrid.ts +158 -0
- package/src/webgpu/sky.ts +35 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// src/kernel/contactShadowPasses.ts
|
|
2
|
+
import {
|
|
3
|
+
Color,
|
|
4
|
+
Mesh,
|
|
5
|
+
MeshBasicMaterial,
|
|
6
|
+
OrthographicCamera,
|
|
7
|
+
PlaneGeometry,
|
|
8
|
+
Scene,
|
|
9
|
+
Vector3
|
|
10
|
+
} from "three";
|
|
11
|
+
var up = new Vector3(0, 1, 0);
|
|
12
|
+
var aim = new Vector3;
|
|
13
|
+
var groundGeometry = (width, depth, flipped) => {
|
|
14
|
+
const geometry = new PlaneGeometry(width, depth).rotateX(-Math.PI / 2);
|
|
15
|
+
if (flipped)
|
|
16
|
+
return geometry;
|
|
17
|
+
const uv = geometry.getAttribute("uv");
|
|
18
|
+
for (let i = 0;i < uv.count; i++)
|
|
19
|
+
uv.setY(i, 1 - uv.getY(i));
|
|
20
|
+
return geometry;
|
|
21
|
+
};
|
|
22
|
+
var reshaped = (a, b) => a.resolution !== b.resolution || a.size[0] !== b.size[0] || a.size[1] !== b.size[1];
|
|
23
|
+
var createContactShadowPasses = (graph, renderer, materials) => {
|
|
24
|
+
let shown;
|
|
25
|
+
const release = () => {
|
|
26
|
+
if (shown === undefined)
|
|
27
|
+
return;
|
|
28
|
+
shown.plane.removeFromParent();
|
|
29
|
+
shown.plane.geometry.dispose();
|
|
30
|
+
shown.plane.material.dispose();
|
|
31
|
+
shown.target.dispose();
|
|
32
|
+
shown.blurTarget.dispose();
|
|
33
|
+
shown.depthMaterial.dispose();
|
|
34
|
+
shown.horizontal.material.dispose();
|
|
35
|
+
shown.vertical.material.dispose();
|
|
36
|
+
shown.quad.geometry.dispose();
|
|
37
|
+
shown = undefined;
|
|
38
|
+
};
|
|
39
|
+
const build = (description) => {
|
|
40
|
+
const [width, depth] = description.size;
|
|
41
|
+
const target = renderer.createTarget(description.resolution, description.resolution);
|
|
42
|
+
const blurTarget = renderer.createTarget(description.resolution, description.resolution);
|
|
43
|
+
const material = new MeshBasicMaterial({
|
|
44
|
+
map: target.texture,
|
|
45
|
+
transparent: true,
|
|
46
|
+
depthWrite: false
|
|
47
|
+
});
|
|
48
|
+
const plane = new Mesh(groundGeometry(width, depth, materials.flippedTargets), material);
|
|
49
|
+
plane.raycast = () => {
|
|
50
|
+
return;
|
|
51
|
+
};
|
|
52
|
+
graph.scene.add(plane);
|
|
53
|
+
const color = new Color;
|
|
54
|
+
const quad = new Mesh(new PlaneGeometry(2, 2));
|
|
55
|
+
quad.position.z = -0.5;
|
|
56
|
+
const quadScene = new Scene;
|
|
57
|
+
quadScene.add(quad);
|
|
58
|
+
return {
|
|
59
|
+
description,
|
|
60
|
+
plane,
|
|
61
|
+
camera: new OrthographicCamera(-width / 2, width / 2, depth / 2, -depth / 2, 0, 1),
|
|
62
|
+
target,
|
|
63
|
+
blurTarget,
|
|
64
|
+
color,
|
|
65
|
+
depthMaterial: materials.depth(color),
|
|
66
|
+
horizontal: materials.blur("horizontal"),
|
|
67
|
+
vertical: materials.blur("vertical"),
|
|
68
|
+
quad,
|
|
69
|
+
quadScene,
|
|
70
|
+
quadCamera: new OrthographicCamera(-1, 1, 1, -1, 0, 1)
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
const update = (current, description) => {
|
|
74
|
+
current.plane.position.fromArray(description.position);
|
|
75
|
+
current.plane.material.opacity = description.opacity;
|
|
76
|
+
current.color.setHex(description.color);
|
|
77
|
+
current.camera.position.fromArray(description.position);
|
|
78
|
+
current.camera.up.set(0, 0, 1);
|
|
79
|
+
current.camera.lookAt(aim.copy(current.camera.position).add(up));
|
|
80
|
+
current.camera.near = description.near;
|
|
81
|
+
current.camera.far = description.far;
|
|
82
|
+
current.camera.updateProjectionMatrix();
|
|
83
|
+
current.camera.updateMatrixWorld();
|
|
84
|
+
return { ...current, description };
|
|
85
|
+
};
|
|
86
|
+
const blurPass = (current, amount) => {
|
|
87
|
+
const { horizontal, vertical, quad, quadScene, quadCamera } = current;
|
|
88
|
+
quad.material = horizontal.material;
|
|
89
|
+
horizontal.set(current.target.texture, amount / 256);
|
|
90
|
+
renderer.render(quadScene, quadCamera, undefined, current.blurTarget);
|
|
91
|
+
quad.material = vertical.material;
|
|
92
|
+
vertical.set(current.blurTarget.texture, amount / 256);
|
|
93
|
+
renderer.render(quadScene, quadCamera, undefined, current.target);
|
|
94
|
+
};
|
|
95
|
+
const render = (current) => {
|
|
96
|
+
const { scene } = graph;
|
|
97
|
+
const background = scene.background;
|
|
98
|
+
const override = scene.overrideMaterial;
|
|
99
|
+
current.plane.visible = false;
|
|
100
|
+
scene.background = null;
|
|
101
|
+
scene.overrideMaterial = current.depthMaterial;
|
|
102
|
+
renderer.render(scene, current.camera, undefined, current.target);
|
|
103
|
+
scene.overrideMaterial = override;
|
|
104
|
+
scene.background = background;
|
|
105
|
+
current.plane.visible = true;
|
|
106
|
+
blurPass(current, current.description.blur);
|
|
107
|
+
if (current.description.smooth)
|
|
108
|
+
blurPass(current, current.description.blur * 0.4);
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
draw: () => {
|
|
112
|
+
const description = graph.contactShadows();
|
|
113
|
+
if (description === null) {
|
|
114
|
+
release();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (shown !== undefined && reshaped(shown.description, description))
|
|
118
|
+
release();
|
|
119
|
+
shown = update(shown ?? build(description), description);
|
|
120
|
+
render(shown);
|
|
121
|
+
},
|
|
122
|
+
dispose: release
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export { createContactShadowPasses };
|
|
127
|
+
|
|
128
|
+
//# debugId=AFE8D134F596683564756E2164756E21
|
|
129
|
+
//# sourceMappingURL=index-4045wme0.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/kernel/contactShadowPasses.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Contact shadows, drawn by the frame loop with the scene's renderer: the passes, shared\n * by every render kit, which supplies the materials (`ShadowMaterials`).\n *\n * Behavioural reference: Drei `src/core/ContactShadows.tsx` at `bf6f4ad`, itself after\n * three.js's `webgl_shadow_contact` example by mrdoob (both MIT). As there, every drawn\n * frame:\n *\n * 1. renders the scene from below with an orthographic camera into a texture, through a\n * depth material that turns nearness to the ground into shadow (alpha `1 − depth`,\n * colour `color · depth · 2`), with the background off and the shadow plane hidden;\n * 2. blurs it horizontally and vertically (`blur / 256`), twice with `smooth` (the second\n * at 0.4 of the blur);\n * 3. shows it on a transparent plane facing up.\n *\n * One difference: the blur passes draw a quad with their own camera, so they fill the\n * texture wherever the shadows are placed. (Drei draws its quad at the world origin with\n * the shadow camera, which leaves the blur empty when the shadows sit above `y = 0`.)\n *\n * @module\n */\nimport {\n Color,\n type Material,\n Mesh,\n MeshBasicMaterial,\n OrthographicCamera,\n PlaneGeometry,\n Scene,\n type Texture,\n Vector3,\n} from 'three';\n\nimport type { ContactShadows } from './description.ts';\nimport type { RenderTarget, SceneRenderer } from './renderer.ts';\nimport type { ContactShadowPasses, ShadowedScene } from './renderKit.ts';\n\n/** One blur direction's material, and how to point it at a texture by an amount. */\nexport type BlurPass = {\n readonly material: Material;\n /** Reads `source`, blurring by `amount` of the texture's width (or height). */\n readonly set: (source: Texture, amount: number) => void;\n};\n\n/** What a render kit draws contact shadows with. */\nexport type ShadowMaterials = {\n /**\n * The material the scene is drawn through from below: colour `color · depth · 2`, alpha\n * `1 − depth`, no depth test or write.\n */\n readonly depth: (color: Color) => Material;\n readonly blur: (direction: 'horizontal' | 'vertical') => BlurPass;\n /**\n * Whether the renderer reads a target's texture with v running the other way from\n * WebGL's: three's WebGPU renderer does, on either backend.\n */\n readonly flippedTargets: boolean;\n};\n\n/** Everything one set of contact shadows holds while shown. */\ntype Shown = {\n readonly description: ContactShadows;\n readonly plane: Mesh<PlaneGeometry, MeshBasicMaterial>;\n readonly camera: OrthographicCamera;\n readonly target: RenderTarget;\n readonly blurTarget: RenderTarget;\n readonly color: Color;\n readonly depthMaterial: Material;\n readonly horizontal: BlurPass;\n readonly vertical: BlurPass;\n readonly quad: Mesh<PlaneGeometry, Material>;\n readonly quadScene: Scene;\n readonly quadCamera: OrthographicCamera;\n};\n\nconst up = new Vector3(0, 1, 0);\nconst aim = new Vector3();\n\n/**\n * The plane's geometry: flat, facing up, its texture's v running towards +z as the shadow\n * camera's image does (already so where the renderer reads targets flipped).\n */\nconst groundGeometry = (width: number, depth: number, flipped: boolean): PlaneGeometry => {\n const geometry = new PlaneGeometry(width, depth).rotateX(-Math.PI / 2);\n if (flipped) return geometry;\n const uv = geometry.getAttribute('uv');\n for (let i = 0; i < uv.count; i++) uv.setY(i, 1 - uv.getY(i));\n return geometry;\n};\n\n/** Whether a change needs new targets, geometry or camera rather than an update. */\nconst reshaped = (a: ContactShadows, b: ContactShadows): boolean =>\n a.resolution !== b.resolution || a.size[0] !== b.size[0] || a.size[1] !== b.size[1];\n\n/** Creates the contact shadow passes for one scene graph and renderer, with `materials`. */\nexport const createContactShadowPasses = (\n graph: ShadowedScene,\n renderer: SceneRenderer,\n materials: ShadowMaterials,\n): ContactShadowPasses => {\n let shown: Shown | undefined;\n\n const release = (): void => {\n if (shown === undefined) return;\n shown.plane.removeFromParent();\n shown.plane.geometry.dispose();\n shown.plane.material.dispose();\n shown.target.dispose();\n shown.blurTarget.dispose();\n shown.depthMaterial.dispose();\n shown.horizontal.material.dispose();\n shown.vertical.material.dispose();\n shown.quad.geometry.dispose();\n shown = undefined;\n };\n\n const build = (description: ContactShadows): Shown => {\n const [width, depth] = description.size;\n const target = renderer.createTarget(description.resolution, description.resolution);\n const blurTarget = renderer.createTarget(description.resolution, description.resolution);\n const material = new MeshBasicMaterial({\n map: target.texture,\n transparent: true,\n depthWrite: false,\n });\n const plane = new Mesh(groundGeometry(width, depth, materials.flippedTargets), material);\n // Shadows are scenery: never picked, never in the way of an overlay.\n plane.raycast = () => undefined;\n graph.scene.add(plane);\n const color = new Color();\n const quad = new Mesh<PlaneGeometry, Material>(new PlaneGeometry(2, 2));\n // In front of the quad camera, between its near and far planes.\n quad.position.z = -0.5;\n const quadScene = new Scene();\n quadScene.add(quad);\n return {\n description,\n plane,\n camera: new OrthographicCamera(-width / 2, width / 2, depth / 2, -depth / 2, 0, 1),\n target,\n blurTarget,\n color,\n depthMaterial: materials.depth(color),\n horizontal: materials.blur('horizontal'),\n vertical: materials.blur('vertical'),\n quad,\n quadScene,\n quadCamera: new OrthographicCamera(-1, 1, 1, -1, 0, 1),\n };\n };\n\n /** Applies the fields that change in place: placement, reach, colour and opacity. */\n const update = (current: Shown, description: ContactShadows): Shown => {\n current.plane.position.fromArray(description.position);\n current.plane.material.opacity = description.opacity;\n current.color.setHex(description.color);\n current.camera.position.fromArray(description.position);\n // Looking straight up, with +z as the image's up: its v runs towards +z, as the plane's.\n current.camera.up.set(0, 0, 1);\n current.camera.lookAt(aim.copy(current.camera.position).add(up));\n current.camera.near = description.near;\n current.camera.far = description.far;\n current.camera.updateProjectionMatrix();\n current.camera.updateMatrixWorld();\n return { ...current, description };\n };\n\n /** One blur: horizontally into the spare target, then vertically back. */\n const blurPass = (current: Shown, amount: number): void => {\n const { horizontal, vertical, quad, quadScene, quadCamera } = current;\n quad.material = horizontal.material;\n horizontal.set(current.target.texture, amount / 256);\n renderer.render(quadScene, quadCamera, undefined, current.blurTarget);\n quad.material = vertical.material;\n vertical.set(current.blurTarget.texture, amount / 256);\n renderer.render(quadScene, quadCamera, undefined, current.target);\n };\n\n const render = (current: Shown): void => {\n const { scene } = graph;\n const background = scene.background;\n const override = scene.overrideMaterial;\n current.plane.visible = false;\n scene.background = null;\n scene.overrideMaterial = current.depthMaterial;\n renderer.render(scene, current.camera, undefined, current.target);\n scene.overrideMaterial = override;\n scene.background = background;\n current.plane.visible = true;\n blurPass(current, current.description.blur);\n if (current.description.smooth) blurPass(current, current.description.blur * 0.4);\n };\n\n return {\n draw: () => {\n const description = graph.contactShadows();\n if (description === null) {\n release();\n return;\n }\n if (shown !== undefined && reshaped(shown.description, description)) release();\n shown = update(shown ?? build(description), description);\n render(shown);\n },\n dispose: release,\n };\n};\n"
|
|
6
|
+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AI,gBAAgB,MAAM;AAAA,QACxB,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,MACA,IAAI,UAAU,aAAa,SAAS,MAAM,aAAa,WAAW;AAAA,QAAG,QAAQ;AAAA,MAC7E,QAAQ,OAAO,SAAS,MAAM,WAAW,GAAG,WAAW;AAAA,MACvD,OAAO,KAAK;AAAA;AAAA,IAEd,SAAS;AAAA,EACX;AAAA;",
|
|
8
|
+
"debugId": "AFE8D134F596683564756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Effect-native declarative Three.js scenes.
|
|
3
|
+
*
|
|
4
|
+
* - Authoring: `scene`, `mesh`, `group`, `box`, `standard`, `spin` and friends.
|
|
5
|
+
* - Runtime: `SceneRuntime.make` inside a `Scope`, with `ResourceRegistry` and
|
|
6
|
+
* `FrameSource` provided by the application.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export * from './kernel/index.ts';
|
|
11
|
+
export * from './runtime/index.ts';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|