@kerf-js/keel 0.0.0-stage → 0.1.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/LICENSE +16 -0
- package/README.md +306 -2
- package/package.json +59 -3
- package/src/blend-inset.ts +79 -0
- package/src/blend.ts +120 -0
- package/src/client.d.ts +9 -0
- package/src/generate/bust.ts +24 -0
- package/src/generate/bust.worker.ts +4 -0
- package/src/generate/pack.ts +69 -0
- package/src/generate/plate.ts +51 -0
- package/src/generate/plate.worker.ts +4 -0
- package/src/generate/serve.ts +56 -0
- package/src/generate/surface.ts +16 -0
- package/src/generate/surface.worker.ts +4 -0
- package/src/generate.ts +133 -0
- package/src/governor.ts +87 -0
- package/src/index.d.ts +15 -0
- package/src/index.mjs +63 -0
- package/src/lit.d.ts +384 -0
- package/src/paint-live.ts +60 -0
- package/src/paint-recipe.d.mts +29 -0
- package/src/paint-recipe.mjs +29 -0
- package/src/paint-worker.mjs +20 -0
- package/src/paint.d.mts +37 -0
- package/src/paint.mjs +180 -0
- package/src/runtime.ts +35 -0
- package/src/scene.ts +289 -0
- package/src/stage.ts +192 -0
- package/vendor/LICENSE +21 -0
- package/vendor/LICENSE-modules +21 -0
- package/vendor/NOTICE +24 -0
- package/vendor/README.md +13 -0
- package/vendor/lit.d.mts +1 -0
- package/vendor/lit.mjs +2 -0
- package/vendor/lock.json +177 -0
- package/vendor/modules/band/events.d.ts +20 -0
- package/vendor/modules/band/index.d.ts +29 -0
- package/vendor/modules/band/player.d.ts +43 -0
- package/vendor/modules/band/roll.d.ts +14 -0
- package/vendor/modules/band/score.d.ts +45 -0
- package/vendor/modules/band/styles.data.d.ts +37 -0
- package/vendor/modules/band/voices.d.ts +33 -0
- package/vendor/modules/band.d.mts +1 -0
- package/vendor/modules/band.mjs +2 -0
- package/vendor/modules/butterflies/butterflies.glsl.d.ts +2 -0
- package/vendor/modules/butterflies/flight.d.ts +68 -0
- package/vendor/modules/butterflies/index.d.ts +79 -0
- package/vendor/modules/butterflies/wing.d.ts +38 -0
- package/vendor/modules/butterflies.d.mts +1 -0
- package/vendor/modules/butterflies.inputs.json +73 -0
- package/vendor/modules/butterflies.mjs +39 -0
- package/vendor/modules/camera-rail/index.d.ts +113 -0
- package/vendor/modules/camera-rail.d.mts +1 -0
- package/vendor/modules/camera-rail.mjs +2 -0
- package/vendor/modules/device-profile/index.d.ts +47 -0
- package/vendor/modules/device-profile.d.mts +1 -0
- package/vendor/modules/device-profile.mjs +2 -0
- package/vendor/modules/lit-finish/dress.d.ts +34 -0
- package/vendor/modules/lit-finish/finish.glsl.d.ts +15 -0
- package/vendor/modules/lit-finish/index.d.ts +33 -0
- package/vendor/modules/lit-finish/lit.d.ts +52 -0
- package/vendor/modules/lit-finish/pass.d.ts +35 -0
- package/vendor/modules/lit-finish/settings.d.ts +88 -0
- package/vendor/modules/lit-finish.d.mts +1 -0
- package/vendor/modules/lit-finish.inputs.json +200 -0
- package/vendor/modules/lit-finish.mjs +267 -0
- package/vendor/modules/look/index.d.ts +159 -0
- package/vendor/modules/look.d.mts +1 -0
- package/vendor/modules/look.inputs.json +23 -0
- package/vendor/modules/look.mjs +2 -0
- package/vendor/modules/motes/index.d.ts +83 -0
- package/vendor/modules/motes/motes.glsl.d.ts +9 -0
- package/vendor/modules/motes/place.d.ts +59 -0
- package/vendor/modules/motes.d.mts +1 -0
- package/vendor/modules/motes.inputs.json +116 -0
- package/vendor/modules/motes.mjs +68 -0
- package/vendor/modules/plate-painter/dab.d.ts +44 -0
- package/vendor/modules/plate-painter/exact.d.ts +19 -0
- package/vendor/modules/plate-painter/foliage.d.ts +4 -0
- package/vendor/modules/plate-painter/gpu.d.ts +65 -0
- package/vendor/modules/plate-painter/index.d.ts +14 -0
- package/vendor/modules/plate-painter/paint.glsl.d.ts +14 -0
- package/vendor/modules/plate-painter/plan.d.ts +42 -0
- package/vendor/modules/plate-painter/recipe.d.ts +136 -0
- package/vendor/modules/plate-painter/scene.d.ts +4 -0
- package/vendor/modules/plate-painter.d.mts +1 -0
- package/vendor/modules/plate-painter.inputs.json +50 -0
- package/vendor/modules/plate-painter.mjs +384 -0
- package/vendor/modules/portrait/body.d.ts +25 -0
- package/vendor/modules/portrait/bust.d.ts +67 -0
- package/vendor/modules/portrait/cap.d.ts +12 -0
- package/vendor/modules/portrait/compile.d.ts +8 -0
- package/vendor/modules/portrait/exact.d.ts +17 -0
- package/vendor/modules/portrait/hair.d.ts +26 -0
- package/vendor/modules/portrait/hand.d.ts +30 -0
- package/vendor/modules/portrait/head.d.ts +18 -0
- package/vendor/modules/portrait/index.d.ts +12 -0
- package/vendor/modules/portrait/mesh.d.ts +24 -0
- package/vendor/modules/portrait/parts.d.ts +33 -0
- package/vendor/modules/portrait/portrait.glsl.d.ts +4 -0
- package/vendor/modules/portrait/render.d.ts +125 -0
- package/vendor/modules/portrait/sdf.d.ts +75 -0
- package/vendor/modules/portrait/settings.d.ts +27 -0
- package/vendor/modules/portrait.d.mts +1 -0
- package/vendor/modules/portrait.inputs.json +111 -0
- package/vendor/modules/portrait.mjs +2 -0
- package/vendor/modules/quality/index.d.ts +130 -0
- package/vendor/modules/quality.d.mts +1 -0
- package/vendor/modules/quality.inputs.json +34 -0
- package/vendor/modules/quality.mjs +2 -0
- package/vendor/modules/scene-blend/blend.d.ts +54 -0
- package/vendor/modules/scene-blend/blend.glsl.d.ts +8 -0
- package/vendor/modules/scene-blend/index.d.ts +25 -0
- package/vendor/modules/scene-blend/lit.d.ts +61 -0
- package/vendor/modules/scene-blend/noise.d.ts +13 -0
- package/vendor/modules/scene-blend/settings.d.ts +63 -0
- package/vendor/modules/scene-blend.d.mts +1 -0
- package/vendor/modules/scene-blend.inputs.json +133 -0
- package/vendor/modules/scene-blend.mjs +2 -0
- package/vendor/modules/section-post/index.d.ts +23 -0
- package/vendor/modules/section-post/lit.d.ts +47 -0
- package/vendor/modules/section-post/noise.d.ts +14 -0
- package/vendor/modules/section-post/post.d.ts +31 -0
- package/vendor/modules/section-post/post.glsl.d.ts +8 -0
- package/vendor/modules/section-post/settings.d.ts +84 -0
- package/vendor/modules/section-post.d.mts +1 -0
- package/vendor/modules/section-post.inputs.json +107 -0
- package/vendor/modules/section-post.mjs +53 -0
- package/vendor/modules/surfaces/exact.d.ts +8 -0
- package/vendor/modules/surfaces/field.d.ts +7 -0
- package/vendor/modules/surfaces/gpu.d.ts +19 -0
- package/vendor/modules/surfaces/index.d.ts +17 -0
- package/vendor/modules/surfaces/paint.d.ts +28 -0
- package/vendor/modules/surfaces/plan.d.ts +39 -0
- package/vendor/modules/surfaces/print.d.ts +55 -0
- package/vendor/modules/surfaces/recipe.d.ts +143 -0
- package/vendor/modules/surfaces/surface.glsl.d.ts +4 -0
- package/vendor/modules/surfaces.d.mts +1 -0
- package/vendor/modules/surfaces.inputs.json +54 -0
- package/vendor/modules/surfaces.mjs +172 -0
- package/vendor/modules/tracks/index.d.ts +66 -0
- package/vendor/modules/tracks.d.mts +1 -0
- package/vendor/modules/tracks.mjs +2 -0
- package/vendor/modules/tree-growth/bend.d.ts +28 -0
- package/vendor/modules/tree-growth/frame.d.ts +60 -0
- package/vendor/modules/tree-growth/index.d.ts +23 -0
- package/vendor/modules/tree-growth/light.d.ts +13 -0
- package/vendor/modules/tree-growth/math.d.ts +19 -0
- package/vendor/modules/tree-growth/model.d.ts +100 -0
- package/vendor/modules/tree-growth/sectors.d.ts +10 -0
- package/vendor/modules/tree-growth/simulation.d.ts +58 -0
- package/vendor/modules/tree-growth/species.d.ts +117 -0
- package/vendor/modules/tree-growth/species.data.d.ts +2 -0
- package/vendor/modules/tree-growth/year.d.ts +38 -0
- package/vendor/modules/tree-growth.d.mts +1 -0
- package/vendor/modules/tree-growth.inputs.json +75 -0
- package/vendor/modules/tree-growth.mjs +2 -0
- package/vendor/modules/tree-render/features.d.ts +9 -0
- package/vendor/modules/tree-render/forest/bake.d.ts +41 -0
- package/vendor/modules/tree-render/forest/cards.d.ts +28 -0
- package/vendor/modules/tree-render/forest/forest.d.ts +156 -0
- package/vendor/modules/tree-render/index.d.ts +52 -0
- package/vendor/modules/tree-render/inputs.d.ts +260 -0
- package/vendor/modules/tree-render/instances.d.ts +66 -0
- package/vendor/modules/tree-render/math.d.ts +8 -0
- package/vendor/modules/tree-render/tree/bark.d.ts +20 -0
- package/vendor/modules/tree-render/tree/leaves.d.ts +29 -0
- package/vendor/modules/tree-render/tree/litter.d.ts +21 -0
- package/vendor/modules/tree-render/tree/ornaments.d.ts +36 -0
- package/vendor/modules/tree-render/tree/roots.d.ts +75 -0
- package/vendor/modules/tree-render/tree/shapes.d.ts +49 -0
- package/vendor/modules/tree-render/tree/tree.d.ts +239 -0
- package/vendor/modules/tree-render/tree/wood.d.ts +27 -0
- package/vendor/modules/tree-render/wind.d.ts +51 -0
- package/vendor/modules/tree-render.d.mts +1 -0
- package/vendor/modules/tree-render.inputs.json +45 -0
- package/vendor/modules/tree-render.mjs +2 -0
- package/vendor/modules/voxel-dither/dither.glsl.d.ts +9 -0
- package/vendor/modules/voxel-dither/index.d.ts +35 -0
- package/vendor/modules/voxel-dither/light.d.ts +33 -0
- package/vendor/modules/voxel-dither/lit.d.ts +86 -0
- package/vendor/modules/voxel-dither/pass.d.ts +46 -0
- package/vendor/modules/voxel-dither/screens.d.ts +21 -0
- package/vendor/modules/voxel-dither/settings.d.ts +307 -0
- package/vendor/modules/voxel-dither/signals.d.ts +35 -0
- package/vendor/modules/voxel-dither.d.mts +1 -0
- package/vendor/modules/voxel-dither.inputs.json +295 -0
- package/vendor/modules/voxel-dither.mjs +452 -0
- package/vendor/modules/world-light/index.d.ts +133 -0
- package/vendor/modules/world-light.d.mts +1 -0
- package/vendor/modules/world-light.inputs.json +68 -0
- package/vendor/modules/world-light.mjs +2 -0
package/src/stage.ts
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
// One lit stage for a `keel-lit` surface: scene, camera, sun and sky, wearing a KEEL look recipe (keel-look@1).
|
|
2
|
+
// The same scene draws dithered or in lit full colour; only the recipe changes. Each pass loads when a look needs it.
|
|
3
|
+
import type { SurfaceContext } from '@kerf-js/core/surface'
|
|
4
|
+
import type { LitCamera, LitLight, LitStage } from './lit'
|
|
5
|
+
import type { LitStageLook, LookRecipe } from '../vendor/modules/look.mjs'
|
|
6
|
+
import type { LitFinish } from '../vendor/modules/lit-finish.mjs'
|
|
7
|
+
import type { VoxelDither } from '../vendor/modules/voxel-dither.mjs'
|
|
8
|
+
import type { WorldLight } from '../vendor/modules/world-light.mjs'
|
|
9
|
+
|
|
10
|
+
/** Which of a recipe's two looks to draw. */
|
|
11
|
+
export type LookKind = 'pixel' | 'realism'
|
|
12
|
+
|
|
13
|
+
/** Options for `keelStage`. */
|
|
14
|
+
export interface KeelStageOptions {
|
|
15
|
+
/** A keel-look@1 recipe. Default: the `smart` pixel style, and AgX realism with full ambient occlusion. */
|
|
16
|
+
recipe?: LookRecipe
|
|
17
|
+
/** The look to start in. Default `realism`. */
|
|
18
|
+
prefer?: LookKind
|
|
19
|
+
/** Vertical field of view, in degrees. Default 40. */
|
|
20
|
+
fov?: number
|
|
21
|
+
/** Half the width of the ground the sun's shadow covers, in world units. Default 24. */
|
|
22
|
+
shadowReach?: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** A lit stage bound to one surface. */
|
|
26
|
+
export interface KeelStage {
|
|
27
|
+
readonly scene: LitStage
|
|
28
|
+
readonly camera: LitCamera
|
|
29
|
+
readonly sun: LitLight
|
|
30
|
+
readonly sky: LitLight
|
|
31
|
+
/** What the current look asks of generators: `density`, `trees`, `kind`. */
|
|
32
|
+
readonly look: LitStageLook
|
|
33
|
+
/** The lit-finish pass while the look is realism, else null. Its `ditherOffset()` feeds a forest's fades. */
|
|
34
|
+
readonly finish: LitFinish | null
|
|
35
|
+
/** Switches look, loading its pass first. Resolves once the next frame will draw it. */
|
|
36
|
+
setLook(prefer: LookKind, recipe?: LookRecipe): Promise<void>
|
|
37
|
+
/** Lights the stage from world-light's answer: sun, sky fill, background and air. */
|
|
38
|
+
light(world: WorldLight): void
|
|
39
|
+
/** Draws one frame through the look. Call it inside `s.frame`. */
|
|
40
|
+
render(): void
|
|
41
|
+
dispose(): void
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const RECIPE: LookRecipe = {
|
|
45
|
+
format: 'keel-look@1',
|
|
46
|
+
pixel: { style: 'smart' },
|
|
47
|
+
realism: { tonemap: 'agx', exposure: 1.15, ao: 1, density: 2 },
|
|
48
|
+
}
|
|
49
|
+
const SUN_DISTANCE = 60
|
|
50
|
+
|
|
51
|
+
/** Realism outweighs the sky with the sun, so lit and shaded ground read apart and AO has ambient light to take. */
|
|
52
|
+
const KEY = { realism: { sun: 1.55, sky: 0.62 }, pixel: { sun: 1, sky: 1 } }
|
|
53
|
+
|
|
54
|
+
type Lit = SurfaceContext<'keel-lit'>['lit']
|
|
55
|
+
interface Rig {
|
|
56
|
+
scene: LitStage
|
|
57
|
+
camera: LitCamera
|
|
58
|
+
sun: LitLight
|
|
59
|
+
sky: LitLight
|
|
60
|
+
}
|
|
61
|
+
/** What the look in use draws with. */
|
|
62
|
+
interface Worn {
|
|
63
|
+
look: LitStageLook
|
|
64
|
+
dither: VoxelDither | null
|
|
65
|
+
finish: LitFinish | null
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function rigOf(lit: Lit, options: KeelStageOptions): Rig {
|
|
69
|
+
const scene = new lit.Stage()
|
|
70
|
+
const camera = new lit.PerspectiveCamera(options.fov ?? 40, 1, 0.05, 400)
|
|
71
|
+
const sky = new lit.SkyLight('#ffffff', '#666666', 1.1)
|
|
72
|
+
const sun = new lit.SunLight('#ffffff', 3)
|
|
73
|
+
const reach = options.shadowReach ?? 24
|
|
74
|
+
sun.castShadow = true
|
|
75
|
+
sun.shadow.mapSize.set(2048, 2048)
|
|
76
|
+
sun.shadow.bias = -0.0005
|
|
77
|
+
Object.assign(sun.shadow.camera, { left: -reach, right: reach, top: reach, bottom: -reach })
|
|
78
|
+
sun.shadow.camera.far = SUN_DISTANCE * 2.5
|
|
79
|
+
sun.shadow.camera.updateProjectionMatrix()
|
|
80
|
+
sun.position.set(0.5 * SUN_DISTANCE, 0.8 * SUN_DISTANCE, 0.35 * SUN_DISTANCE)
|
|
81
|
+
scene.add(sky, sun, sun.target)
|
|
82
|
+
scene.background = new lit.Color('#c8d0d4')
|
|
83
|
+
return { scene, camera, sun, sky }
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function air(lit: Lit, { scene, sun, sky }: Rig, { look, finish }: Worn, world: WorldLight) {
|
|
87
|
+
const key = KEY[look.kind]
|
|
88
|
+
const [x, y, z] = world.sun.direction
|
|
89
|
+
sun.position.set(x * SUN_DISTANCE, Math.max(y, 0.04) * SUN_DISTANCE, z * SUN_DISTANCE)
|
|
90
|
+
sun.color.set(world.sun.color)
|
|
91
|
+
sun.intensity = (world.sun.elevation > -1 ? world.sun.intensity : 0) * key.sun
|
|
92
|
+
sky.color.set(world.fill.sky)
|
|
93
|
+
sky.groundColor.set(world.fill.ground)
|
|
94
|
+
sky.intensity = world.fill.intensity * key.sky
|
|
95
|
+
scene.background = new lit.Color(world.sky.horizon)
|
|
96
|
+
if (!finish) {
|
|
97
|
+
scene.fog = new lit.Fog(world.fog.color, world.fog.near, world.fog.far)
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
// world-light's fog is a pixel look's backdrop; real air only veils, by how hazy the hour is.
|
|
101
|
+
const colour = new lit.Color(world.fog.color).lerp(sky.color, 0.33).toArray()
|
|
102
|
+
const start = Math.max(8, world.fog.near * 0.8)
|
|
103
|
+
finish.setHaze({ colour, density: 0.0015 + 0.02 * world.haze, start })
|
|
104
|
+
scene.fog = null
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function draw(s: SurfaceContext<'keel-lit'>, { scene, camera, sun }: Rig, worn: Worn) {
|
|
108
|
+
if (worn.dither) {
|
|
109
|
+
worn.dither.setTime(s.clock.seconds)
|
|
110
|
+
worn.dither.render(scene, camera)
|
|
111
|
+
} else if (worn.finish) {
|
|
112
|
+
worn.finish.setSun(sun.position.toArray(), sun.color.toArray())
|
|
113
|
+
worn.finish.render(scene, camera as never)
|
|
114
|
+
} else s.renderer.render(scene, camera)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Makes a stage on a `keel-lit` surface: `const stage = await keelStage(s)`, add to `stage.scene`, then
|
|
119
|
+
* `s.frame(() => stage.render())`.
|
|
120
|
+
*/
|
|
121
|
+
export async function keelStage(
|
|
122
|
+
s: SurfaceContext<'keel-lit'>,
|
|
123
|
+
options: KeelStageOptions = {},
|
|
124
|
+
): Promise<KeelStage> {
|
|
125
|
+
const { lit, renderer } = s
|
|
126
|
+
const { LOOK_TARGETS, resolveLook, stageOfLook } = await import('../vendor/modules/look.mjs')
|
|
127
|
+
const rig = rigOf(lit, options)
|
|
128
|
+
const worn = { dither: null, finish: null } as Worn
|
|
129
|
+
let recipe = options.recipe ?? RECIPE
|
|
130
|
+
let sized = ''
|
|
131
|
+
let world: WorldLight | null = null
|
|
132
|
+
let turn = 0
|
|
133
|
+
|
|
134
|
+
async function setLook(prefer: LookKind, next: LookRecipe = recipe) {
|
|
135
|
+
const mine = ++turn
|
|
136
|
+
const look = stageOfLook(resolveLook({ ...next, prefer }, LOOK_TARGETS.lit))
|
|
137
|
+
const [d, f] = await Promise.all([
|
|
138
|
+
look.dither ? import('../vendor/modules/voxel-dither.mjs') : null,
|
|
139
|
+
look.finish ? import('../vendor/modules/lit-finish.mjs') : null,
|
|
140
|
+
])
|
|
141
|
+
if (mine !== turn) return
|
|
142
|
+
worn.dither?.dispose()
|
|
143
|
+
worn.finish?.dispose()
|
|
144
|
+
worn.dither = d ? d.createVoxelDither(lit as never, renderer as never, look.dither) : null
|
|
145
|
+
worn.finish = f ? f.createLitFinish(lit as never, renderer as never, look.finish) : null
|
|
146
|
+
worn.look = look
|
|
147
|
+
renderer.toneMapping = worn.finish ? 'none' : (look.toneMapping ?? 'none')
|
|
148
|
+
renderer.toneMappingExposure = look.exposure
|
|
149
|
+
recipe = next
|
|
150
|
+
sized = ''
|
|
151
|
+
if (world) air(lit, rig, worn, world)
|
|
152
|
+
s.invalidate()
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function render() {
|
|
156
|
+
const { width, height } = s.size.value
|
|
157
|
+
const dpr = s.dpr.value
|
|
158
|
+
if (!width || !height) return
|
|
159
|
+
const key = `${width}x${height}@${dpr}`
|
|
160
|
+
if (key !== sized) {
|
|
161
|
+
sized = key
|
|
162
|
+
rig.camera.aspect = width / height
|
|
163
|
+
rig.camera.updateProjectionMatrix()
|
|
164
|
+
worn.dither?.setSize(width, height, dpr)
|
|
165
|
+
worn.finish?.setSize(width, height, dpr)
|
|
166
|
+
}
|
|
167
|
+
draw(s, rig, worn)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
await setLook(options.prefer ?? 'realism')
|
|
171
|
+
return {
|
|
172
|
+
...rig,
|
|
173
|
+
get look() {
|
|
174
|
+
return worn.look
|
|
175
|
+
},
|
|
176
|
+
get finish() {
|
|
177
|
+
return worn.finish
|
|
178
|
+
},
|
|
179
|
+
setLook,
|
|
180
|
+
light(next) {
|
|
181
|
+
world = next
|
|
182
|
+
air(lit, rig, worn, next)
|
|
183
|
+
s.invalidate()
|
|
184
|
+
},
|
|
185
|
+
render,
|
|
186
|
+
dispose() {
|
|
187
|
+
turn++
|
|
188
|
+
worn.dither?.dispose()
|
|
189
|
+
worn.finish?.dispose()
|
|
190
|
+
},
|
|
191
|
+
}
|
|
192
|
+
}
|
package/vendor/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Chad Koslovsky and 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.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ravonus
|
|
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/vendor/NOTICE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@keel-engine/lit ports shading, geometry and maths from Three.js r180.
|
|
2
|
+
|
|
3
|
+
Three.js
|
|
4
|
+
The MIT License
|
|
5
|
+
|
|
6
|
+
Copyright © 2010-2025 three.js authors
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
package/vendor/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# vendor
|
|
2
|
+
|
|
3
|
+
Built by `scripts/vendor.mjs`. Don't edit these files: change the pin and run it again.
|
|
4
|
+
|
|
5
|
+
- `lit.mjs`: keel/lit, KEEL's lit WebGL2 renderer, bundled from keel-engine af03486
|
|
6
|
+
(`packages/lit`). MIT, see `LICENSE`. It ports Three.js r180 (MIT), see `NOTICE`.
|
|
7
|
+
- `modules/`: butterflies, camera-rail, device-profile, lit-finish, look, motes, plate-painter, portrait, quality, scene-blend, section-post, surfaces, tracks, tree-growth, tree-render, voxel-dither, world-light from the keel-modules catalog at 53c36d0. MIT, see
|
|
8
|
+
`LICENSE-modules`. Each `.mjs` is the catalog's verified build, each `.d.ts` its types, and each
|
|
9
|
+
`.inputs.json` the settings a host may offer (`keel-module-inputs@1`).
|
|
10
|
+
- `modules/` also holds band: not in the catalog yet, so built here from the
|
|
11
|
+
module's readable source at its pinned keel-modules commit (`SOURCE_MODULES` in the script).
|
|
12
|
+
|
|
13
|
+
`lock.json` records every file's sha256. `test/vendor.test.ts` holds the folder to it.
|
package/vendor/lit.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../src/lit'
|