@lukekaalim/act-three 6.0.0 → 6.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 ADDED
@@ -0,0 +1,28 @@
1
+ # @lukekaalim/act-three
2
+
3
+ ## 6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Scheduling refactor
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @lukekaalim/act-backstage@2.0.0
13
+ - @lukekaalim/act-recon@2.0.0
14
+ - @lukekaalim/act-web@3.3.0
15
+
16
+ ## 6.1.0
17
+
18
+ ### Minor Changes
19
+
20
+ - 4381035: Added error boundaries
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [4381035]
25
+ - @lukekaalim/act-backstage@1.2.0
26
+ - @lukekaalim/act-web@3.2.0
27
+ - @lukekaalim/act-recon@1.1.0
28
+ - @lukekaalim/act@3.1.0
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-three",
3
3
  "main": "mod.ts",
4
- "version": "6.0.0",
4
+ "version": "6.2.0",
5
5
  "dependencies": {
6
6
  "@types/three": ">= 0.171.0",
7
- "@lukekaalim/act-web": "^3.0.0",
8
- "@lukekaalim/act": "^3.0.0",
9
- "@lukekaalim/act-recon": "^1.0.0",
10
- "@lukekaalim/act-backstage": "^1.0.0"
7
+ "@lukekaalim/act-web": "^3.3.0",
8
+ "@lukekaalim/act": "^3.1.0",
9
+ "@lukekaalim/act-recon": "^2.0.0",
10
+ "@lukekaalim/act-backstage": "^2.0.0"
11
11
  },
12
12
  "peerDependencies": {
13
13
  "three": ">= 0.171.0"
package/render.ts CHANGED
@@ -1,14 +1,8 @@
1
- import { createRenderFunction, RenderSpace, Scheduler } from "@lukekaalim/act-backstage";
2
- import { createWebSpace } from '@lukekaalim/act-web';
3
- import { createFinaleSpace } from "./space";
1
+ import { createRenderFunction } from "@lukekaalim/act-backstage";
2
+ import { createDOMScheduler } from '@lukekaalim/act-web';
3
+ import { createThreeWebSpace } from "./space";
4
4
 
5
- const intervalScheduler: Scheduler<NodeJS.Timeout> = {
6
- duration: 10,
7
- request: func => setInterval(func, 10),
8
- cancel: id => clearInterval(id),
9
- }
10
-
11
- export const render = createRenderFunction<NodeJS.Timeout, HTMLElement>(intervalScheduler, (tree, root) => RenderSpace.combine([
12
- createWebSpace(tree, root),
13
- createFinaleSpace(tree),
14
- ]));
5
+ export const render = createRenderFunction<HTMLElement>(
6
+ createDOMScheduler(),
7
+ createThreeWebSpace
8
+ );
package/space.ts CHANGED
@@ -1,10 +1,12 @@
1
- import { createSimpleRenderSpace } from "@lukekaalim/act-backstage/mod.ts"
1
+ import { createSimpleRenderSpace, RenderSpace } from "@lukekaalim/act-backstage"
2
2
  import { act, recon, three } from "./deps"
3
3
  import { setProps } from "./props";
4
- import { primitiveNodeTypes } from "@lukekaalim/act";
4
+ import { primitiveNodeTypes, renderNodeType } from "@lukekaalim/act";
5
5
  import { getElementHandler } from "./elements";
6
+ import { createWebSpace } from "@lukekaalim/act-web";
7
+ import { CommitTree } from "@lukekaalim/act-recon";
6
8
 
7
- export const ThreeJS: act.Component = ({ children }) => act.h(primitiveNodeTypes.render, { type: 'threejs' }, children)
9
+ export const ThreeJS: act.Component = ({ children }) => act.h(renderNodeType, { type: 'threejs' }, children)
8
10
 
9
11
  export const createFinaleSpace = (tree: recon.CommitTree) => {
10
12
  return createSimpleRenderSpace(tree, {
@@ -30,4 +32,11 @@ export const createFinaleSpace = (tree: recon.CommitTree) => {
30
32
  })
31
33
  }
32
34
 
35
+ export const createThreeWebSpace = (tree: CommitTree, root: HTMLElement) => {
36
+ return RenderSpace.combine([
37
+ createWebSpace(tree, root),
38
+ createFinaleSpace(tree),
39
+ ]);
40
+ }
41
+
33
42
  export const finale = createFinaleSpace;