lecodes-cli 0.17.1 → 0.17.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/dist/index.js +3 -3
- package/package.json +3 -3
- package/runtime/sdk/gl/CharacterController.ts +3 -0
- package/runtime/sdk/gl/Material.ts +12 -0
- package/runtime/sdk/gl/Particles.ts +676 -625
- package/runtime/sdk/gl/Physics.ts +126 -119
- package/runtime/sdk/gl/Scene.ts +299 -291
- package/runtime/sdk/gl/Shape.ts +37 -1
- package/runtime/sdk/gl/Trigger.ts +50 -46
- package/runtime/sdk-types.json +1 -1
package/dist/index.js
CHANGED
|
@@ -215844,7 +215844,7 @@ var require_main = __commonJS((exports, module) => {
|
|
|
215844
215844
|
// package.json
|
|
215845
215845
|
var package_default = {
|
|
215846
215846
|
name: "lecodes-cli",
|
|
215847
|
-
version: "0.17.
|
|
215847
|
+
version: "0.17.2",
|
|
215848
215848
|
dependencies: {
|
|
215849
215849
|
"@letary/chisel": "^0.8.0",
|
|
215850
215850
|
jimp: "^1.6.1"
|
|
@@ -215860,8 +215860,8 @@ var package_default = {
|
|
|
215860
215860
|
},
|
|
215861
215861
|
peerDependencies: {
|
|
215862
215862
|
"lecodes-design": "^0.8.1",
|
|
215863
|
-
"lecodes-renderer": "^0.8.
|
|
215864
|
-
"lecodes-3d-editor": "^0.3.
|
|
215863
|
+
"lecodes-renderer": "^0.8.7",
|
|
215864
|
+
"lecodes-3d-editor": "^0.3.1",
|
|
215865
215865
|
"lecodes-assets": "^0.1.0"
|
|
215866
215866
|
},
|
|
215867
215867
|
bin: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lecodes-cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@letary/chisel": "^0.8.0",
|
|
6
6
|
"jimp": "^1.6.1"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"lecodes-design": "^0.8.1",
|
|
19
|
-
"lecodes-renderer": "^0.8.
|
|
20
|
-
"lecodes-3d-editor": "^0.3.
|
|
19
|
+
"lecodes-renderer": "^0.8.7",
|
|
20
|
+
"lecodes-3d-editor": "^0.3.1",
|
|
21
21
|
"lecodes-assets": "^0.1.0"
|
|
22
22
|
},
|
|
23
23
|
"bin": {
|
|
@@ -49,6 +49,9 @@ export class CharacterController extends Aspect<"controller", Node> {
|
|
|
49
49
|
if (!shape) {
|
|
50
50
|
throw new Error("CharacterController requires a Shape aspect (a capsule is recommended) — add it first: node.aspect(Shape, { capsule: {…} }).aspect(CharacterController)")
|
|
51
51
|
}
|
|
52
|
+
if (shape._isTriangleMesh) {
|
|
53
|
+
throw new Error("CharacterController needs a convex Shape (capsule recommended) — { mesh: true } is a triangle mesh; use { mesh: 'convex' } or a capsule")
|
|
54
|
+
}
|
|
52
55
|
const shapeId = shape._claim() // the character owns the shape; it is not a rigid body
|
|
53
56
|
this._charId = _creator.characterCreate(this.node.id, shapeId, this.maxSlope)
|
|
54
57
|
}
|
|
@@ -45,6 +45,15 @@ export type ParticlesMaterialOptions = {
|
|
|
45
45
|
sheet?: number | [number, number]
|
|
46
46
|
/** Extra brightness multiplier for a glow look (0 = off). */
|
|
47
47
|
emissive?: number
|
|
48
|
+
/** (`render` quad / stretch) a second sheet on the same grid, ADDED as `emissiveMap × emissiveColor`
|
|
49
|
+
* — keyed by `map`'s alpha, not tinted by the particle colour. A fireball = a smoke `map` whose
|
|
50
|
+
* colour curve goes dark + a fire `emissiveMap` that keeps glowing while alpha lasts. */
|
|
51
|
+
emissiveMap?: Texture | null
|
|
52
|
+
/** Multiplier for `emissiveMap`; an `[r, g, b]` array may exceed 1 (HDR glow). Default 0 (off). */
|
|
53
|
+
emissiveColor?: ColorInput
|
|
54
|
+
/** (`render` quad / stretch) crossfade each flipbook frame into the next by the fractional frame
|
|
55
|
+
* index instead of snapping — smooth sheet playback at any frame rate. Default false. */
|
|
56
|
+
frameBlend?: boolean
|
|
48
57
|
/** Compositing: `"alpha"` (default — smoke, dust) or `"add"` (fire, sparks, magic). */
|
|
49
58
|
blend?: "alpha" | "add"
|
|
50
59
|
/** Soft radial falloff toward the sprite edge. Defaults to true without a map, false with one. */
|
|
@@ -163,6 +172,9 @@ export class Material {
|
|
|
163
172
|
if (quad) {
|
|
164
173
|
m.uniforms.mode = options.render === "ribbon" ? 2 : options.render === "stretch" ? 1 : 0
|
|
165
174
|
m.uniforms.stretch = options.stretch ?? (options.render === "stretch" ? 0.05 : 0)
|
|
175
|
+
if (options.emissiveMap) m.uniforms.emissiveMap = options.emissiveMap
|
|
176
|
+
if (options.emissiveColor !== undefined) m.uniforms.emissiveColor = Color.toRgb01(options.emissiveColor)
|
|
177
|
+
if (options.frameBlend) m.uniforms.frameBlend = 1
|
|
166
178
|
}
|
|
167
179
|
if (options.map) m.map = options.map
|
|
168
180
|
return m
|