@carbonenginejs/runtime-utils 0.1.1 → 0.1.3
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/LICENSE +21 -21
- package/NOTICE +23 -23
- package/README.md +69 -69
- package/THIRD-PARTY-NOTICES.md +64 -64
- package/docs/README.md +74 -73
- package/docs/architecture.md +101 -101
- package/docs/concepts/foundation-consolidation.md +85 -85
- package/docs/concepts/model-lifecycle.md +111 -0
- package/docs/const-kb.md +85 -87
- package/docs/core-types/DECORATOR-TODOS.md +25 -25
- package/docs/core-types/README.md +229 -168
- package/docs/reference/api.md +105 -102
- package/docs/reference/classes/README.md +135 -135
- package/package.json +139 -139
- package/src/arrays.js +5 -5
- package/src/audio/audioFormats.js +34 -34
- package/src/audio/index.js +1 -1
- package/src/box3.js +331 -331
- package/src/bytes.js +56 -56
- package/src/compression.js +56 -56
- package/src/constants/index.js +7 -7
- package/src/constants/trinity.js +13 -13
- package/src/constants.js +15 -15
- package/src/curve.js +79 -79
- package/src/d3d/dxgiFormats.js +46 -46
- package/src/d3d/index.js +2 -2
- package/src/d3d/primitiveTopology.js +11 -11
- package/src/document/CjsCarbonDocument.js +212 -212
- package/src/document/CjsClassRegistry.js +373 -373
- package/src/document/CjsDocumentDehydrator.js +142 -142
- package/src/document/CjsDocumentHydrator.js +156 -156
- package/src/document/CjsStructRegistry.js +348 -348
- package/src/document/hydrationAdapter.js +129 -129
- package/src/document/index.js +6 -6
- package/src/errors/CjsError.js +286 -286
- package/src/errors/index.js +5 -5
- package/src/geometry/box.js +22 -22
- package/src/geometry/cylinder.js +22 -22
- package/src/geometry/helpers/earcut.js +1 -1
- package/src/geometry/helpers/misc.js +3 -3
- package/src/geometry/index.js +8 -8
- package/src/geometry/json.js +67 -67
- package/src/geometry/lathe.js +44 -44
- package/src/geometry/plane.js +14 -14
- package/src/geometry/shape.js +4 -4
- package/src/geometry/sphere.js +24 -24
- package/src/geometry/torus.js +14 -14
- package/src/graphics/colorSpaces.js +22 -22
- package/src/graphics/index.js +4 -4
- package/src/graphics/pixelFormats.js +158 -158
- package/src/graphics/textureDimensions.js +22 -22
- package/src/graphics/trinityEnums.js +87 -87
- package/src/index.js +62 -62
- package/src/is.js +108 -46
- package/src/json.js +23 -23
- package/src/lifecycle/CjsLifecycleState.js +77 -77
- package/src/lifecycle/index.js +1 -1
- package/src/lne3.js +70 -70
- package/src/lookup.js +48 -48
- package/src/mat3.js +51 -51
- package/src/mat4.js +699 -699
- package/src/math/index.js +25 -25
- package/src/math/scalar.js +63 -63
- package/src/media/index.js +1 -1
- package/src/media/mediaTypes.js +50 -50
- package/src/mesh.js +424 -424
- package/src/model/CjsEventEmitter.js +333 -333
- package/src/model/CjsModel.js +1589 -1544
- package/src/model/CjsModelState.js +72 -72
- package/src/model/index.js +4 -4
- package/src/model/sourceRecordUtils.js +54 -54
- package/src/noise.js +310 -310
- package/src/num.js +827 -827
- package/src/object.js +39 -39
- package/src/path.js +53 -53
- package/src/pln.js +125 -125
- package/src/pool.js +9 -9
- package/src/quat.js +144 -144
- package/src/ray3.js +188 -188
- package/src/renderContext/formats.js +145 -145
- package/src/renderContext/index.js +5 -5
- package/src/renderContext/presentation.js +125 -125
- package/src/renderContext/resources.js +27 -27
- package/src/renderContext/upscaling.js +22 -22
- package/src/renderContext/window.js +20 -20
- package/src/runtime/CjsRuntimeState.js +50 -50
- package/src/schema/CjsSchema.js +555 -318
- package/src/schema/index.js +4 -4
- package/src/shader/index.js +1 -1
- package/src/shader/shaderStages.js +37 -37
- package/src/sph3.js +181 -181
- package/src/tangent.js +288 -288
- package/src/text.js +40 -40
- package/src/tri3.js +98 -98
- package/src/types/carbonTypes.js +635 -635
- package/src/types/index.js +2 -2
- package/src/utils.js +58 -58
- package/src/validation.js +46 -46
- package/src/vec2.js +229 -229
- package/src/vec3.js +1188 -1172
- package/src/vec4.js +347 -347
- package/src/vertex.js +108 -108
- package/src/webgpu/index.js +1 -1
- package/src/webgpu/textureFormats.js +121 -121
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 cppctamber / CarbonEngineJS contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
carbonenginejs/runtime-utils
|
|
2
|
-
============================
|
|
3
|
-
|
|
4
|
-
A browser-safe foundation package for CarbonEngineJS projects. It contains
|
|
5
|
-
neutral utilities; shared constant vocabularies; Carbon type, schema, model,
|
|
6
|
-
document, and lifecycle primitives; and standalone math containers originally
|
|
7
|
-
extracted from ccpwgl's `src/global/math` library.
|
|
8
|
-
|
|
9
|
-
CarbonEngine and Fenris Creations (CCP Games) are named here for provenance,
|
|
10
|
-
interoperability, and target-ecosystem context. This package contains no
|
|
11
|
-
CarbonEngine or Fenris Creations (CCP Games) source files, tooling, proprietary
|
|
12
|
-
documentation, shader source, or assets.
|
|
13
|
-
|
|
14
|
-
Packed tangent-frame behavior is based on observed Fenris Creations
|
|
15
|
-
(CCP Games) EVE/Carbon shader behavior and generated test vectors, not copied
|
|
16
|
-
shader source.
|
|
17
|
-
|
|
18
|
-
This package is not affiliated with or endorsed by CCP Games.
|
|
19
|
-
|
|
20
|
-
CarbonEngineJS-facing code is copyright cppctamber / CarbonEngineJS
|
|
21
|
-
contributors.
|
|
22
|
-
|
|
23
|
-
Repository license: MIT. See LICENSE and THIRD-PARTY-NOTICES.md.
|
|
1
|
+
carbonenginejs/runtime-utils
|
|
2
|
+
============================
|
|
3
|
+
|
|
4
|
+
A browser-safe foundation package for CarbonEngineJS projects. It contains
|
|
5
|
+
neutral utilities; shared constant vocabularies; Carbon type, schema, model,
|
|
6
|
+
document, and lifecycle primitives; and standalone math containers originally
|
|
7
|
+
extracted from ccpwgl's `src/global/math` library.
|
|
8
|
+
|
|
9
|
+
CarbonEngine and Fenris Creations (CCP Games) are named here for provenance,
|
|
10
|
+
interoperability, and target-ecosystem context. This package contains no
|
|
11
|
+
CarbonEngine or Fenris Creations (CCP Games) source files, tooling, proprietary
|
|
12
|
+
documentation, shader source, or assets.
|
|
13
|
+
|
|
14
|
+
Packed tangent-frame behavior is based on observed Fenris Creations
|
|
15
|
+
(CCP Games) EVE/Carbon shader behavior and generated test vectors, not copied
|
|
16
|
+
shader source.
|
|
17
|
+
|
|
18
|
+
This package is not affiliated with or endorsed by CCP Games.
|
|
19
|
+
|
|
20
|
+
CarbonEngineJS-facing code is copyright cppctamber / CarbonEngineJS
|
|
21
|
+
contributors.
|
|
22
|
+
|
|
23
|
+
Repository license: MIT. See LICENSE and THIRD-PARTY-NOTICES.md.
|
package/README.md
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
# @carbonenginejs/runtime-utils
|
|
2
|
-
|
|
3
|
-
Browser-safe foundations shared across CarbonEngineJS packages.
|
|
4
|
-
|
|
5
|
-
The package owns:
|
|
6
|
-
|
|
7
|
-
- neutral arrays, bytes, compression, JSON, lookup, paths, text, predicates,
|
|
8
|
-
validation, and structured operational errors;
|
|
9
|
-
- scalar, vector, quaternion, matrix, geometry, mesh, tangent, curve, and
|
|
10
|
-
noise math;
|
|
11
|
-
- shared media, graphics, render-context, audio, shader, D3D, and WebGPU
|
|
12
|
-
constants;
|
|
13
|
-
- Carbon type descriptors, schema metadata, models, lifecycle state,
|
|
14
|
-
documents, hydration, and dehydration.
|
|
15
|
-
|
|
16
|
-
Browser
|
|
17
|
-
|
|
1
|
+
# @carbonenginejs/runtime-utils
|
|
2
|
+
|
|
3
|
+
Browser-safe foundations shared across CarbonEngineJS packages.
|
|
4
|
+
|
|
5
|
+
The package owns:
|
|
6
|
+
|
|
7
|
+
- neutral arrays, bytes, compression, JSON, lookup, paths, text, predicates,
|
|
8
|
+
validation, and structured operational errors;
|
|
9
|
+
- scalar, vector, quaternion, matrix, geometry, mesh, tangent, curve, and
|
|
10
|
+
noise math;
|
|
11
|
+
- shared media, graphics, render-context, audio, shader, D3D, and WebGPU
|
|
12
|
+
constants;
|
|
13
|
+
- Carbon type descriptors, schema metadata, models, lifecycle state,
|
|
14
|
+
documents, hydration, and dehydration.
|
|
15
|
+
|
|
16
|
+
Browser clients, remote readers, inspectors, and browser integrations belong
|
|
17
|
+
in `@carbonenginejs/tools-browser`. Node automation belongs in
|
|
18
18
|
`@carbonenginejs/tools-core`.
|
|
19
|
-
|
|
20
|
-
## Install
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
|
-
npm install @carbonenginejs/runtime-utils
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Quick start
|
|
27
|
-
|
|
28
|
-
Prefer direct subpaths so unrelated families are not initialized:
|
|
29
|
-
|
|
30
|
-
```js
|
|
31
|
-
import { normalizePath } from "@carbonenginejs/runtime-utils/path";
|
|
32
|
-
import { CjsError } from "@carbonenginejs/runtime-utils/errors";
|
|
33
|
-
import { cross, normalize } from "@carbonenginejs/runtime-utils/vec3";
|
|
34
|
-
import { PixelFormat } from "@carbonenginejs/runtime-utils/graphics";
|
|
35
|
-
import { CjsSchema } from "@carbonenginejs/runtime-utils/schema";
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Former package imports map as follows:
|
|
39
|
-
|
|
40
|
-
- `@carbonenginejs/core-math` becomes
|
|
41
|
-
`@carbonenginejs/runtime-utils/math`;
|
|
42
|
-
- `@carbonenginejs/core-math/<subpath>` becomes
|
|
43
|
-
`@carbonenginejs/runtime-utils/<subpath>`;
|
|
44
|
-
- `@carbonenginejs/runtime-const` becomes
|
|
45
|
-
`@carbonenginejs/runtime-utils/const`;
|
|
46
|
-
- `@carbonenginejs/runtime-const/<subpath>` becomes
|
|
47
|
-
`@carbonenginejs/runtime-utils/<subpath>`;
|
|
48
|
-
- `@carbonenginejs/core-types/<subpath>` becomes the matching
|
|
49
|
-
`@carbonenginejs/runtime-utils/<subpath>`; replace former root imports with
|
|
50
|
-
the direct type/model/document subpaths they use.
|
|
51
|
-
|
|
52
|
-
Carbon type and model primitives use `/types`, `/schema`, `/model`,
|
|
53
|
-
`/document`, `/hydration`, and `/lifecycle`.
|
|
54
|
-
|
|
55
|
-
The root export is intentionally limited to common neutral utilities, math,
|
|
56
|
-
and non-conflicting constants. Import Carbon type/model/document families from
|
|
57
|
-
their direct subpaths.
|
|
58
|
-
|
|
59
|
-
## Documentation
|
|
60
|
-
|
|
61
|
-
- [Package documentation](docs/README.md)
|
|
62
|
-
- [Architecture and admission rules](docs/architecture.md)
|
|
63
|
-
- [API reference](docs/reference/api.md)
|
|
64
|
-
- [Foundation consolidation](docs/concepts/foundation-consolidation.md)
|
|
65
|
-
- [Constant vocabulary notes](docs/const-kb.md)
|
|
66
|
-
|
|
67
|
-
## License
|
|
68
|
-
|
|
69
|
-
MIT. See [LICENSE](LICENSE), [NOTICE](NOTICE), and
|
|
70
|
-
[THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install @carbonenginejs/runtime-utils
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
Prefer direct subpaths so unrelated families are not initialized:
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { normalizePath } from "@carbonenginejs/runtime-utils/path";
|
|
32
|
+
import { CjsError } from "@carbonenginejs/runtime-utils/errors";
|
|
33
|
+
import { cross, normalize } from "@carbonenginejs/runtime-utils/vec3";
|
|
34
|
+
import { PixelFormat } from "@carbonenginejs/runtime-utils/graphics";
|
|
35
|
+
import { CjsSchema } from "@carbonenginejs/runtime-utils/schema";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Former package imports map as follows:
|
|
39
|
+
|
|
40
|
+
- `@carbonenginejs/core-math` becomes
|
|
41
|
+
`@carbonenginejs/runtime-utils/math`;
|
|
42
|
+
- `@carbonenginejs/core-math/<subpath>` becomes
|
|
43
|
+
`@carbonenginejs/runtime-utils/<subpath>`;
|
|
44
|
+
- `@carbonenginejs/runtime-const` becomes
|
|
45
|
+
`@carbonenginejs/runtime-utils/const`;
|
|
46
|
+
- `@carbonenginejs/runtime-const/<subpath>` becomes
|
|
47
|
+
`@carbonenginejs/runtime-utils/<subpath>`;
|
|
48
|
+
- `@carbonenginejs/core-types/<subpath>` becomes the matching
|
|
49
|
+
`@carbonenginejs/runtime-utils/<subpath>`; replace former root imports with
|
|
50
|
+
the direct type/model/document subpaths they use.
|
|
51
|
+
|
|
52
|
+
Carbon type and model primitives use `/types`, `/schema`, `/model`,
|
|
53
|
+
`/document`, `/hydration`, and `/lifecycle`.
|
|
54
|
+
|
|
55
|
+
The root export is intentionally limited to common neutral utilities, math,
|
|
56
|
+
and non-conflicting constants. Import Carbon type/model/document families from
|
|
57
|
+
their direct subpaths.
|
|
58
|
+
|
|
59
|
+
## Documentation
|
|
60
|
+
|
|
61
|
+
- [Package documentation](docs/README.md)
|
|
62
|
+
- [Architecture and admission rules](docs/architecture.md)
|
|
63
|
+
- [API reference](docs/reference/api.md)
|
|
64
|
+
- [Foundation consolidation](docs/concepts/foundation-consolidation.md)
|
|
65
|
+
- [Constant vocabulary notes](docs/const-kb.md)
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT. See [LICENSE](LICENSE), [NOTICE](NOTICE), and
|
|
70
|
+
[THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# Third-Party Notices
|
|
2
|
-
|
|
3
|
-
## gl-matrix
|
|
4
|
-
|
|
5
|
-
This package depends on `gl-matrix` and extends its vector, quaternion, and
|
|
6
|
-
matrix containers with CarbonEngineJS helpers.
|
|
7
|
-
|
|
8
|
-
- Project: <https://github.com/toji/gl-matrix>
|
|
9
|
-
- License: MIT
|
|
10
|
-
|
|
11
|
-
## ccpwgl math extraction
|
|
12
|
-
|
|
13
|
-
Most container modules in `src` were extracted from ccpwgl's
|
|
14
|
-
`src/global/math` library and converted to standalone ESM with package-local
|
|
15
|
-
imports. The code remains MIT-licensed under the CarbonEngineJS/ccpwgl project
|
|
16
|
-
license.
|
|
17
|
-
|
|
18
|
-
- Project: <https://github.com/cppctamber/ccpwgl2>
|
|
19
|
-
- Copyright: 2020 ccpgames rawrafox cppctamber
|
|
20
|
-
- License: MIT; terms reproduced below
|
|
21
|
-
|
|
22
|
-
## Mapbox earcut helper
|
|
23
|
-
|
|
24
|
-
`src/geometry/helpers/earcut.js` is an embedded copy of an Earcut-style
|
|
25
|
-
triangulation helper from the ccpwgl math tree.
|
|
26
|
-
|
|
27
|
-
- Copyright: 2016, Mapbox
|
|
28
|
-
- License: ISC
|
|
29
|
-
- Local license copy: `src/geometry/helpers/LICENSE`
|
|
30
|
-
|
|
31
|
-
## Three.js-derived geometry helpers
|
|
32
|
-
|
|
33
|
-
Math and geometry helpers in the extracted ccpwgl tree retain source comments
|
|
34
|
-
attributing conversions to Three.js authors.
|
|
35
|
-
|
|
36
|
-
- Project: <https://github.com/mrdoob/three.js>
|
|
37
|
-
- Copyright: 2010-2026 three.js authors
|
|
38
|
-
- License: MIT; terms reproduced below
|
|
39
|
-
|
|
40
|
-
## Fenris Creations / CCP Games tangent behavior
|
|
41
|
-
|
|
42
|
-
`src/tangent.js` implements CarbonEngineJS/GR2 packed tangent-frame behavior
|
|
43
|
-
derived from observed EVE/Carbon shader behavior and generated test vectors.
|
|
44
|
-
No Fenris Creations (CCP Games) shader source, tools, or assets are included.
|
|
45
|
-
|
|
46
|
-
## MIT terms for ccpwgl and Three.js material
|
|
47
|
-
|
|
48
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
49
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
50
|
-
the Software without restriction, including without limitation the rights to
|
|
51
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
52
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
53
|
-
subject to the following conditions:
|
|
54
|
-
|
|
55
|
-
The above copyright notices and this permission notice shall be included in all
|
|
56
|
-
copies or substantial portions of the Software.
|
|
57
|
-
|
|
58
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
59
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
60
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
61
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
62
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
63
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
64
|
-
SOFTWARE.
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
## gl-matrix
|
|
4
|
+
|
|
5
|
+
This package depends on `gl-matrix` and extends its vector, quaternion, and
|
|
6
|
+
matrix containers with CarbonEngineJS helpers.
|
|
7
|
+
|
|
8
|
+
- Project: <https://github.com/toji/gl-matrix>
|
|
9
|
+
- License: MIT
|
|
10
|
+
|
|
11
|
+
## ccpwgl math extraction
|
|
12
|
+
|
|
13
|
+
Most container modules in `src` were extracted from ccpwgl's
|
|
14
|
+
`src/global/math` library and converted to standalone ESM with package-local
|
|
15
|
+
imports. The code remains MIT-licensed under the CarbonEngineJS/ccpwgl project
|
|
16
|
+
license.
|
|
17
|
+
|
|
18
|
+
- Project: <https://github.com/cppctamber/ccpwgl2>
|
|
19
|
+
- Copyright: 2020 ccpgames rawrafox cppctamber
|
|
20
|
+
- License: MIT; terms reproduced below
|
|
21
|
+
|
|
22
|
+
## Mapbox earcut helper
|
|
23
|
+
|
|
24
|
+
`src/geometry/helpers/earcut.js` is an embedded copy of an Earcut-style
|
|
25
|
+
triangulation helper from the ccpwgl math tree.
|
|
26
|
+
|
|
27
|
+
- Copyright: 2016, Mapbox
|
|
28
|
+
- License: ISC
|
|
29
|
+
- Local license copy: `src/geometry/helpers/LICENSE`
|
|
30
|
+
|
|
31
|
+
## Three.js-derived geometry helpers
|
|
32
|
+
|
|
33
|
+
Math and geometry helpers in the extracted ccpwgl tree retain source comments
|
|
34
|
+
attributing conversions to Three.js authors.
|
|
35
|
+
|
|
36
|
+
- Project: <https://github.com/mrdoob/three.js>
|
|
37
|
+
- Copyright: 2010-2026 three.js authors
|
|
38
|
+
- License: MIT; terms reproduced below
|
|
39
|
+
|
|
40
|
+
## Fenris Creations / CCP Games tangent behavior
|
|
41
|
+
|
|
42
|
+
`src/tangent.js` implements CarbonEngineJS/GR2 packed tangent-frame behavior
|
|
43
|
+
derived from observed EVE/Carbon shader behavior and generated test vectors.
|
|
44
|
+
No Fenris Creations (CCP Games) shader source, tools, or assets are included.
|
|
45
|
+
|
|
46
|
+
## MIT terms for ccpwgl and Three.js material
|
|
47
|
+
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
49
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
50
|
+
the Software without restriction, including without limitation the rights to
|
|
51
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
52
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
53
|
+
subject to the following conditions:
|
|
54
|
+
|
|
55
|
+
The above copyright notices and this permission notice shall be included in all
|
|
56
|
+
copies or substantial portions of the Software.
|
|
57
|
+
|
|
58
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
59
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
60
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
61
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
62
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
63
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
64
|
+
SOFTWARE.
|
package/docs/README.md
CHANGED
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
# Runtime utilities documentation
|
|
2
|
-
|
|
3
|
-
Status: Evolving
|
|
4
|
-
Scope: `@carbonenginejs/runtime-utils`
|
|
5
|
-
Audience: Runtime authors, integrators, and maintainers
|
|
6
|
-
Summary: Explains the consolidated shared runtime foundation and its public families.
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
`@carbonenginejs/runtime-utils` is the bottom shared layer of the
|
|
11
|
-
CarbonEngineJS runtime dependency graph. It owns browser-safe primitives that
|
|
12
|
-
are useful across runtime libraries and do not depend on another
|
|
13
|
-
CarbonEngineJS package.
|
|
14
|
-
|
|
15
|
-
The package is deliberately strict about what enters this layer so it can
|
|
16
|
-
remain stable and low-changing after the Carbon-to-JavaScript conversion.
|
|
17
|
-
|
|
18
|
-
## Use this package when
|
|
19
|
-
|
|
20
|
-
Use `runtime-utils` when code:
|
|
21
|
-
|
|
22
|
-
- is a general runtime primitive used by more than one package;
|
|
23
|
-
- has stable behavior that can be described without domain policy;
|
|
24
|
-
- is safe in browsers and does not import Node built-ins;
|
|
25
|
-
- can remain independent of every other CarbonEngineJS package.
|
|
26
|
-
|
|
1
|
+
# Runtime utilities documentation
|
|
2
|
+
|
|
3
|
+
Status: Evolving
|
|
4
|
+
Scope: `@carbonenginejs/runtime-utils`
|
|
5
|
+
Audience: Runtime authors, integrators, and maintainers
|
|
6
|
+
Summary: Explains the consolidated shared runtime foundation and its public families.
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
`@carbonenginejs/runtime-utils` is the bottom shared layer of the
|
|
11
|
+
CarbonEngineJS runtime dependency graph. It owns browser-safe primitives that
|
|
12
|
+
are useful across runtime libraries and do not depend on another
|
|
13
|
+
CarbonEngineJS package.
|
|
14
|
+
|
|
15
|
+
The package is deliberately strict about what enters this layer so it can
|
|
16
|
+
remain stable and low-changing after the Carbon-to-JavaScript conversion.
|
|
17
|
+
|
|
18
|
+
## Use this package when
|
|
19
|
+
|
|
20
|
+
Use `runtime-utils` when code:
|
|
21
|
+
|
|
22
|
+
- is a general runtime primitive used by more than one package;
|
|
23
|
+
- has stable behavior that can be described without domain policy;
|
|
24
|
+
- is safe in browsers and does not import Node built-ins;
|
|
25
|
+
- can remain independent of every other CarbonEngineJS package.
|
|
26
|
+
|
|
27
27
|
Do not use it merely as a convenient home for code without an owner.
|
|
28
28
|
Browser-facing demos, clients, inspectors, and usable application helpers have
|
|
29
|
-
the
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
the current owner `@carbonenginejs/tools-browser`.
|
|
30
|
+
|
|
31
|
+
## Where it fits
|
|
32
|
+
|
|
33
|
+
The package has no organization dependencies. It uses `gl-matrix` for the math
|
|
34
|
+
families; its subpaths remain side-effect-free and independently importable.
|
|
35
|
+
The `/errors` family supplies coded operational failures without defining
|
|
36
|
+
logging, transport, HTTP, or retry policy.
|
|
37
|
+
|
|
39
38
|
```text
|
|
40
|
-
runtime libraries tools-browser
|
|
41
|
-
\
|
|
42
|
-
\
|
|
43
|
-
v
|
|
39
|
+
runtime libraries tools-browser
|
|
40
|
+
\ /
|
|
41
|
+
\ /
|
|
42
|
+
v v
|
|
44
43
|
runtime-utils
|
|
45
44
|
|
|
|
46
45
|
v
|
|
47
46
|
Web-standard platform APIs
|
|
48
47
|
```
|
|
49
48
|
|
|
50
|
-
Runtime packages consume this foundation directly.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## Start here
|
|
55
|
-
|
|
56
|
-
Use the root export when a library consumes several utility families:
|
|
57
|
-
|
|
58
|
-
```js
|
|
59
|
-
import {
|
|
60
|
-
encodeJson,
|
|
61
|
-
isPlainObject,
|
|
62
|
-
normalizePath
|
|
63
|
-
} from "@carbonenginejs/runtime-utils";
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Use a public subpath when a consumer needs one focused family:
|
|
67
|
-
|
|
68
|
-
```js
|
|
69
|
-
import { asUint8Array } from "@carbonenginejs/runtime-utils/bytes";
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Documentation map
|
|
73
|
-
|
|
74
|
-
- [Architecture and admission rules](architecture.md) defines dependency
|
|
75
|
-
direction, ownership, and the test for adding code.
|
|
76
|
-
- [Current API reference](reference/api.md) lists the implemented subpaths and
|
|
77
|
-
exports.
|
|
78
|
-
- [Class reference](reference/classes/README.md) catalogs maintained Carbon
|
|
79
|
-
foundation classes.
|
|
49
|
+
Runtime packages and tools-browser consume this foundation directly. Math,
|
|
50
|
+
constant, type, schema, model, document, hydration, and lifecycle ownership is
|
|
51
|
+
consolidated here.
|
|
52
|
+
|
|
53
|
+
## Start here
|
|
54
|
+
|
|
55
|
+
Use the root export when a library consumes several utility families:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
import {
|
|
59
|
+
encodeJson,
|
|
60
|
+
isPlainObject,
|
|
61
|
+
normalizePath
|
|
62
|
+
} from "@carbonenginejs/runtime-utils";
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use a public subpath when a consumer needs one focused family:
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
import { asUint8Array } from "@carbonenginejs/runtime-utils/bytes";
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Documentation map
|
|
72
|
+
|
|
73
|
+
- [Architecture and admission rules](architecture.md) defines dependency
|
|
74
|
+
direction, ownership, and the test for adding code.
|
|
75
|
+
- [Current API reference](reference/api.md) lists the implemented subpaths and
|
|
76
|
+
exports.
|
|
77
|
+
- [Class reference](reference/classes/README.md) catalogs maintained Carbon
|
|
78
|
+
foundation classes.
|
|
80
79
|
- [Foundation consolidation](concepts/foundation-consolidation.md) records the
|
|
81
80
|
implemented ownership move and consumer migration map.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
- [Model lifecycle](concepts/model-lifecycle.md) defines dirty settlement,
|
|
82
|
+
initialization, traversal, resources, and optional lifecycle state.
|
|
83
|
+
|
|
84
|
+
The Carbon type/model/document guide is retained under
|
|
85
|
+
[core-types/README.md](core-types/README.md) with updated package paths.
|