@litfamily/litopencode 1.0.31 → 1.0.33
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 +38 -0
- package/README-Ko-KR.md +6 -6
- package/README.md +6 -6
- package/TRADEMARK.md +12 -0
- package/dist/activation-primary-prompts.js +5 -1
- package/dist/activation-probe.js +1 -0
- package/dist/activation-prompt-utils.d.ts +1 -1
- package/dist/activation-reentry.d.ts +20 -0
- package/dist/activation-reentry.js +110 -1
- package/dist/activation-routing.d.ts +2 -1
- package/dist/activation-routing.js +100 -11
- package/dist/activation-workflow-prompts.d.ts +4 -0
- package/dist/activation-workflow-prompts.js +30 -0
- package/dist/activation.d.ts +1 -1
- package/dist/activation.js +44 -5
- package/dist/adhd-next.d.ts +51 -0
- package/dist/adhd-next.js +150 -0
- package/dist/agents/defaults.js +1 -1
- package/dist/cli/managed-skill-assets.d.ts +1 -1
- package/dist/cli/managed-skill-assets.js +7 -1
- package/dist/cli/native-skill-integrity.js +1 -1
- package/dist/cli.js +7 -1
- package/dist/commands.d.ts +28 -1
- package/dist/commands.js +58 -5
- package/dist/durable-plan.d.ts +5 -1
- package/dist/durable-plan.js +14 -2
- package/dist/features.d.ts +80 -1
- package/dist/features.js +105 -1
- package/dist/hooks.js +3 -0
- package/dist/ledger.js +12 -1
- package/dist/plan-scope-roots.d.ts +23 -0
- package/dist/plan-scope-roots.js +116 -0
- package/dist/restart-notice.d.ts +7 -0
- package/dist/restart-notice.js +40 -0
- package/dist/secret-shapes.js +5 -5
- package/dist/server.js +4 -0
- package/dist/session-liveness.d.ts +20 -0
- package/dist/session-liveness.js +99 -0
- package/dist/skills.d.ts +22 -1
- package/dist/skills.js +36 -0
- package/dist/start-work-typed.d.ts +34 -0
- package/dist/start-work-typed.js +167 -0
- package/dist/state.d.ts +3 -0
- package/dist/state.js +3 -0
- package/dist/tools.js +22 -2
- package/dist/tui/mission-band.d.ts +22 -1
- package/dist/tui/mission-band.js +75 -16
- package/dist/tui/mission-looks.d.ts +38 -0
- package/dist/tui/mission-looks.js +73 -0
- package/dist/tui/mission-model.d.ts +2 -0
- package/dist/tui/mission-model.js +3 -1
- package/dist/tui/mission-rainbow.d.ts +33 -0
- package/dist/tui/mission-rainbow.js +90 -0
- package/dist/tui/mission-source.d.ts +49 -0
- package/dist/tui/mission-source.js +217 -2
- package/dist/tui/mission-text.d.ts +2 -0
- package/dist/tui/mission-text.js +9 -1
- package/dist/tui/mission-threads.d.ts +58 -0
- package/dist/tui/mission-threads.js +128 -0
- package/dist/tui.js +112 -7
- package/dist/uiux-visual-catalog.js +8 -1
- package/dist/v2/events.js +3 -0
- package/dist/v2/session-hooks.js +38 -5
- package/dist/workflow-stack.d.ts +53 -0
- package/dist/workflow-stack.js +196 -0
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/assets/skills/lit-schematic.webp +0 -0
- package/docs/reference-Ko-KR.md +48 -3
- package/docs/reference.md +54 -3
- package/package.json +1 -1
- package/skills/frontend-ui-ux/SKILL.md +3 -2
- package/skills/frontend-ui-ux/kit/components.css +414 -0
- package/skills/frontend-ui-ux/kit/fonts.json +22 -0
- package/skills/frontend-ui-ux/kit/layouts/landing.html +164 -0
- package/skills/frontend-ui-ux/kit/layouts/settings.html +114 -0
- package/skills/frontend-ui-ux/kit/layouts/workspace.html +115 -0
- package/skills/frontend-ui-ux/kit/styles/computational-brutalism.json +227 -0
- package/skills/frontend-ui-ux/kit/styles/field-notes.json +205 -0
- package/skills/frontend-ui-ux/kit/styles/graphite.json +200 -0
- package/skills/frontend-ui-ux/kit/styles/meadow.json +199 -0
- package/skills/frontend-ui-ux/kit/styles/neo-brutalism.json +222 -0
- package/skills/frontend-ui-ux/kit/ui.js +226 -0
- package/skills/frontend-ui-ux/references/brand-and-imagery.md +2 -2
- package/skills/frontend-ui-ux/references/complete-contract.md +2 -1
- package/skills/frontend-ui-ux/references/craft-floor.md +6 -2
- package/skills/frontend-ui-ux/references/default-editorial-pixel.json +3 -0
- package/skills/frontend-ui-ux/references/house-styles.md +236 -0
- package/skills/frontend-ui-ux/references/motion-guide.md +2 -2
- package/skills/frontend-ui-ux/references/production.md +3 -1
- package/skills/frontend-ui-ux/references/slop-register.md +4 -4
- package/skills/frontend-ui-ux/scripts/design-lock.mjs +400 -0
- package/skills/frontend-ui-ux/scripts/pixel-art.mjs +60 -0
- package/skills/frontend-ui-ux/scripts/probe-lock.mjs +235 -0
- package/skills/frontend-ui-ux/scripts/probe-page.mjs +34 -12
- package/skills/frontend-ui-ux/scripts/probe-static.mjs +16 -3
- package/skills/frontend-ui-ux/scripts/probe-thresholds.json +8 -2
- package/skills/frontend-ui-ux/scripts/probe.mjs +35 -7
- package/skills/lit-adhd/SKILL.md +209 -0
- package/skills/lit-adhd/references/brief-format.md +46 -0
- package/skills/lit-adhd/references/card-examples.md +103 -0
- package/skills/lit-adhd/references/status-taxonomy.md +34 -0
- package/skills/lit-adhd/scripts/rewind.mjs +933 -0
- package/skills/lit-diagram-drawer/SKILL.md +4 -3
- package/skills/lit-diagram-drawer/references/style-guide.md +20 -11
- package/skills/lit-diagram-drawer/references/type-architecture.md +3 -3
- package/skills/lit-diagram-drawer/references/type-dependency.md +1 -1
- package/skills/lit-diagram-drawer/references/type-tree.md +3 -3
- package/skills/lit-diagram-drawer/references/type-wardley.md +1 -1
- package/skills/lit-diagram-drawer/references/verifier-guide.md +1 -0
- package/skills/lit-diagram-drawer/scripts/craft-thresholds.json +1 -2
- package/skills/lit-diagram-drawer/scripts/visual-quality.mjs +1 -2
- package/skills/lit-docx/SKILL.md +2 -1
- package/skills/lit-handoff/SKILL.md +2 -0
- package/skills/lit-hijack/SKILL.md +422 -0
- package/skills/lit-hijack/references/capture-and-provenance.md +87 -0
- package/skills/lit-hijack/references/clean-room-build.md +111 -0
- package/skills/lit-hijack/references/distil-and-licence.md +100 -0
- package/skills/lit-hijack/references/gap-and-port-design.md +126 -0
- package/skills/lit-hijack/references/parity-and-report.md +110 -0
- package/skills/lit-hijack/scripts/hijack.mjs +993 -0
- package/skills/lit-plan/SKILL.md +8 -0
- package/skills/lit-pptx/SKILL.md +27 -11
- package/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Bold.ttf +0 -0
- package/skills/lit-pptx/fonts/jetbrains-mono/JetBrainsMono-Regular.ttf +0 -0
- package/skills/lit-pptx/fonts/jetbrains-mono/OFL.txt +93 -0
- package/skills/lit-pptx/fonts/jetbrains-mono/SOURCE.md +17 -0
- package/skills/lit-pptx/references/density-and-fill.md +9 -3
- package/skills/lit-pptx/references/direction-step.md +21 -6
- package/skills/lit-pptx/references/examples/04-lecture-chalk-ko.md +3 -6
- package/skills/lit-pptx/references/examples/05-research-talk-paper-en.md +1 -5
- package/skills/lit-pptx/references/examples/08-reliability-keynote-night-en.md +0 -4
- package/skills/lit-pptx/references/examples/09-status-update-ledger-en.md +2 -2
- package/skills/lit-pptx/references/examples/11-forecast-review-night-ko.md +4 -7
- package/skills/lit-pptx/references/examples/13-engineering-review-computational-brutalism-ko.md +173 -0
- package/skills/lit-pptx/references/examples/14-launch-pitch-neo-brutalism-ko.md +154 -0
- package/skills/lit-pptx/references/examples/15-design-lecture-bauhaus-ko.md +139 -0
- package/skills/lit-pptx/references/examples/16-community-programme-riso-ko.md +158 -0
- package/skills/lit-pptx/references/examples/17-public-data-briefing-newsroom-ko.md +179 -0
- package/skills/lit-pptx/references/layout-families.md +65 -47
- package/skills/lit-pptx/references/title-treatments.md +83 -134
- package/skills/lit-pptx/references/tonalities/atlas.md +3 -3
- package/skills/lit-pptx/references/tonalities/bauhaus.md +140 -0
- package/skills/lit-pptx/references/tonalities/chalk.md +7 -6
- package/skills/lit-pptx/references/tonalities/computational-brutalism.md +150 -0
- package/skills/lit-pptx/references/tonalities/gazette.md +1 -1
- package/skills/lit-pptx/references/tonalities/ledger.md +1 -1
- package/skills/lit-pptx/references/tonalities/neo-brutalism.md +161 -0
- package/skills/lit-pptx/references/tonalities/newsroom.md +144 -0
- package/skills/lit-pptx/references/tonalities/night.md +1 -1
- package/skills/lit-pptx/references/tonalities/paper.md +2 -2
- package/skills/lit-pptx/references/tonalities/riso.md +137 -0
- package/skills/lit-pptx/references/tonalities/signal.md +3 -3
- package/skills/lit-pptx/references/tonalities/studio.md +7 -6
- package/skills/lit-pptx/run.mjs +2 -1
- package/skills/lit-pptx/scripts/compile-deck.js +1 -1
- package/skills/lit-pptx/scripts/craft-thresholds.json +4 -8
- package/skills/lit-pptx/scripts/craft_extras.py +56 -3
- package/skills/lit-pptx/scripts/deck_output.py +75 -90
- package/skills/lit-pptx/scripts/embed_fonts.py +13 -1
- package/skills/lit-pptx/scripts/layout_inventory.py +12 -5
- package/skills/lit-pptx/scripts/lib/grid-resolver.js +101 -110
- package/skills/lit-pptx/scripts/lib/layout-resolver.js +9 -15
- package/skills/lit-pptx/scripts/lib/render-pack.js +373 -566
- package/skills/lit-pptx/scripts/lib/slide-grid.js +104 -0
- package/skills/lit-pptx/scripts/lib/template-registry.js +57 -6
- package/skills/lit-pptx/scripts/qa_deck.py +10 -11
- package/skills/lit-pptx/scripts/render_pages.py +118 -0
- package/skills/lit-pptx/templates/tonalities/atlas/pack.yaml +1 -1
- package/skills/lit-pptx/templates/tonalities/bauhaus/pack.yaml +98 -0
- package/skills/lit-pptx/templates/tonalities/chalk/pack.yaml +1 -1
- package/skills/lit-pptx/templates/tonalities/computational-brutalism/pack.yaml +99 -0
- package/skills/lit-pptx/templates/tonalities/gazette/pack.yaml +1 -1
- package/skills/lit-pptx/templates/tonalities/ledger/pack.yaml +1 -1
- package/skills/lit-pptx/templates/tonalities/neo-brutalism/pack.yaml +107 -0
- package/skills/lit-pptx/templates/tonalities/newsroom/pack.yaml +99 -0
- package/skills/lit-pptx/templates/tonalities/night/pack.yaml +1 -1
- package/skills/lit-pptx/templates/tonalities/paper/pack.yaml +1 -1
- package/skills/lit-pptx/templates/tonalities/riso/pack.yaml +99 -0
- package/skills/lit-pptx/templates/tonalities/signal/pack.yaml +2 -2
- package/skills/lit-pptx/templates/tonalities/studio/pack.yaml +1 -1
- package/skills/lit-recap/SKILL.md +4 -0
- package/skills/lit-schematic/SKILL.md +118 -0
- package/skills/lit-schematic/examples/iso-heat-exchanger/build.mjs +38 -0
- package/skills/lit-schematic/examples/iso-heat-exchanger/scene.mjs +133 -0
- package/skills/lit-schematic/examples/journal-adsorption-rig/build.mjs +87 -0
- package/skills/lit-schematic/examples/pid-dosing-skid/build.mjs +85 -0
- package/skills/lit-schematic/references/cutaway-outputs.md +70 -0
- package/skills/lit-schematic/references/isometric-craft.md +101 -0
- package/skills/lit-schematic/references/journal-figures.md +72 -0
- package/skills/lit-schematic/references/kit-api.md +134 -0
- package/skills/lit-schematic/references/pfd-and-layout.md +53 -0
- package/skills/lit-schematic/references/pid-drafting.md +103 -0
- package/skills/lit-schematic/references/pid-symbols.md +163 -0
- package/skills/lit-schematic/references/verification.md +100 -0
- package/skills/lit-schematic/scripts/doctor.mjs +57 -0
- package/skills/lit-schematic/scripts/lib/figure.mjs +81 -0
- package/skills/lit-schematic/scripts/lib/fonts.mjs +25 -0
- package/skills/lit-schematic/scripts/lib/geom.mjs +113 -0
- package/skills/lit-schematic/scripts/lib/interactive.mjs +292 -0
- package/skills/lit-schematic/scripts/lib/isa.mjs +115 -0
- package/skills/lit-schematic/scripts/lib/iso.mjs +719 -0
- package/skills/lit-schematic/scripts/lib/legend-sheet.mjs +162 -0
- package/skills/lit-schematic/scripts/lib/pid.mjs +937 -0
- package/skills/lit-schematic/scripts/lib/png.mjs +132 -0
- package/skills/lit-schematic/scripts/lib/qa-core.mjs +658 -0
- package/skills/lit-schematic/scripts/lib/route.mjs +218 -0
- package/skills/lit-schematic/scripts/lib/sheet.mjs +890 -0
- package/skills/lit-schematic/scripts/lib/svg.mjs +82 -0
- package/skills/lit-schematic/scripts/lib/theme.mjs +115 -0
- package/skills/lit-schematic/scripts/motion.mjs +129 -0
- package/skills/lit-schematic/scripts/qa.mjs +92 -0
- package/skills/lit-schematic/scripts/render.mjs +233 -0
- package/skills/lit-schematic/scripts/scaffold.mjs +60 -0
- package/skills/lit-scientific-visualization/SKILL.md +27 -4
- package/skills/lit-typographic-motion/SKILL.md +19 -17
- package/skills/lit-typographic-motion/THIRD_PARTY_NOTICES +9 -0
- package/skills/lit-typographic-motion/engine/accents.mjs +6 -0
- package/skills/lit-typographic-motion/engine/assets.mjs +282 -0
- package/skills/lit-typographic-motion/engine/blender/runner.py +228 -0
- package/skills/lit-typographic-motion/engine/blender.mjs +126 -0
- package/skills/lit-typographic-motion/engine/board.mjs +138 -0
- package/skills/lit-typographic-motion/engine/cover/assets.mjs +11 -8
- package/skills/lit-typographic-motion/engine/cover/capture.mjs +6 -6
- package/skills/lit-typographic-motion/engine/cover/render.mjs +20 -7
- package/skills/lit-typographic-motion/engine/cover/treatment.mjs +30 -3
- package/skills/lit-typographic-motion/engine/fill.mjs +54 -0
- package/skills/lit-typographic-motion/engine/gallery.mjs +118 -0
- package/skills/lit-typographic-motion/engine/house.mjs +42 -0
- package/skills/lit-typographic-motion/engine/look.mjs +65 -8
- package/skills/lit-typographic-motion/engine/loudness.mjs +101 -0
- package/skills/lit-typographic-motion/engine/scaffold.mjs +219 -0
- package/skills/lit-typographic-motion/engine/score.mjs +594 -0
- package/skills/lit-typographic-motion/engine/sound.mjs +9 -57
- package/skills/lit-typographic-motion/engine/stage/capture.mjs +23 -9
- package/skills/lit-typographic-motion/engine/stage/clock.js +8 -2
- package/skills/lit-typographic-motion/engine/stage/cover-init.js +12 -1
- package/skills/lit-typographic-motion/engine/stage/frame-worker.mjs +15 -7
- package/skills/lit-typographic-motion/engine/stage/gate.mjs +48 -4
- package/skills/lit-typographic-motion/engine/stage/qa-page.js +16 -5
- package/skills/lit-typographic-motion/engine/stage/qa.mjs +148 -7
- package/skills/lit-typographic-motion/engine/stage/render.mjs +69 -7
- package/skills/lit-typographic-motion/engine/stage/scan.mjs +20 -1
- package/skills/lit-typographic-motion/engine/stage/stage-kit.js +85 -4
- package/skills/lit-typographic-motion/engine/stills.mjs +1 -1
- package/skills/lit-typographic-motion/engine/styles.mjs +221 -0
- package/skills/lit-typographic-motion/engine/text.mjs +1 -1
- package/skills/lit-typographic-motion/engine/treatment.mjs +190 -6
- package/skills/lit-typographic-motion/engine/vendor/three/LICENSE +21 -0
- package/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js +144 -0
- package/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js +155 -0
- package/skills/lit-typographic-motion/engine/vendor/three/three.module.js +54571 -0
- package/skills/lit-typographic-motion/gate.mjs +18 -2
- package/skills/lit-typographic-motion/probe.mjs +13 -1
- package/skills/lit-typographic-motion/recipes/hero-3d/expected.json +64 -0
- package/skills/lit-typographic-motion/recipes/hero-3d/index.html +132 -0
- package/skills/lit-typographic-motion/recipes/orbit-loop/expected.json +2 -0
- package/skills/lit-typographic-motion/recipes/painted-light/expected.json +2 -0
- package/skills/lit-typographic-motion/recipes/weight-tide/expected.json +2 -0
- package/skills/lit-typographic-motion/references/cover.md +56 -13
- package/skills/lit-typographic-motion/references/craft-loop.md +20 -7
- package/skills/lit-typographic-motion/references/depth.md +112 -0
- package/skills/lit-typographic-motion/references/runtime.md +21 -6
- package/skills/lit-typographic-motion/references/sound.md +76 -0
- package/skills/lit-typographic-motion/references/stage.md +50 -7
- package/skills/lit-typographic-motion/references/studio.md +162 -0
- package/skills/lit-typographic-motion/references/style-bibles.md +18 -0
- package/skills/lit-typographic-motion/references/treatment.md +108 -9
- package/skills/lit-typographic-motion/render.mjs +60 -3
- package/skills/lit-typographic-motion/styles/paper.json +185 -0
- package/skills/lit-typographic-motion/styles/swiss-signal.json +188 -0
- package/skills/lit-typographic-motion/styles/terminalcore.json +182 -0
- package/skills/lit-typographic-motion/styles/tidal.json +187 -0
- package/skills/litresearch/SKILL.md +2 -0
- package/skills/managed-skill-manifest.json +517 -88
- package/skills/readme-studio/SKILL.md +1 -1
- package/skills/review-work/SKILL.md +2 -0
- package/skills/start-work/SKILL.md +8 -0
- package/skills/workflow-loop/SKILL.md +4 -0
- package/tools/check-pack-payload.mjs +5 -2
- package/tools/payload-substance-parity.json +4 -3
- package/tools/qa-cover-recipes.mjs +4 -3
- package/tools/version-manifests.json +2 -2
package/skills/lit-typographic-motion/engine/vendor/three/addons/environments/RoomEnvironment.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://github.com/google/model-viewer/blob/master/packages/model-viewer/src/three-components/EnvironmentScene.ts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
BackSide,
|
|
7
|
+
BoxGeometry,
|
|
8
|
+
Mesh,
|
|
9
|
+
MeshBasicMaterial,
|
|
10
|
+
MeshStandardMaterial,
|
|
11
|
+
PointLight,
|
|
12
|
+
Scene,
|
|
13
|
+
} from 'three';
|
|
14
|
+
|
|
15
|
+
class RoomEnvironment extends Scene {
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
|
|
19
|
+
super();
|
|
20
|
+
|
|
21
|
+
const geometry = new BoxGeometry();
|
|
22
|
+
geometry.deleteAttribute( 'uv' );
|
|
23
|
+
|
|
24
|
+
const roomMaterial = new MeshStandardMaterial( { side: BackSide } );
|
|
25
|
+
const boxMaterial = new MeshStandardMaterial();
|
|
26
|
+
|
|
27
|
+
const mainLight = new PointLight( 0xffffff, 900, 28, 2 );
|
|
28
|
+
mainLight.position.set( 0.418, 16.199, 0.300 );
|
|
29
|
+
this.add( mainLight );
|
|
30
|
+
|
|
31
|
+
const room = new Mesh( geometry, roomMaterial );
|
|
32
|
+
room.position.set( - 0.757, 13.219, 0.717 );
|
|
33
|
+
room.scale.set( 31.713, 28.305, 28.591 );
|
|
34
|
+
this.add( room );
|
|
35
|
+
|
|
36
|
+
const box1 = new Mesh( geometry, boxMaterial );
|
|
37
|
+
box1.position.set( - 10.906, 2.009, 1.846 );
|
|
38
|
+
box1.rotation.set( 0, - 0.195, 0 );
|
|
39
|
+
box1.scale.set( 2.328, 7.905, 4.651 );
|
|
40
|
+
this.add( box1 );
|
|
41
|
+
|
|
42
|
+
const box2 = new Mesh( geometry, boxMaterial );
|
|
43
|
+
box2.position.set( - 5.607, - 0.754, - 0.758 );
|
|
44
|
+
box2.rotation.set( 0, 0.994, 0 );
|
|
45
|
+
box2.scale.set( 1.970, 1.534, 3.955 );
|
|
46
|
+
this.add( box2 );
|
|
47
|
+
|
|
48
|
+
const box3 = new Mesh( geometry, boxMaterial );
|
|
49
|
+
box3.position.set( 6.167, 0.857, 7.803 );
|
|
50
|
+
box3.rotation.set( 0, 0.561, 0 );
|
|
51
|
+
box3.scale.set( 3.927, 6.285, 3.687 );
|
|
52
|
+
this.add( box3 );
|
|
53
|
+
|
|
54
|
+
const box4 = new Mesh( geometry, boxMaterial );
|
|
55
|
+
box4.position.set( - 2.017, 0.018, 6.124 );
|
|
56
|
+
box4.rotation.set( 0, 0.333, 0 );
|
|
57
|
+
box4.scale.set( 2.002, 4.566, 2.064 );
|
|
58
|
+
this.add( box4 );
|
|
59
|
+
|
|
60
|
+
const box5 = new Mesh( geometry, boxMaterial );
|
|
61
|
+
box5.position.set( 2.291, - 0.756, - 2.621 );
|
|
62
|
+
box5.rotation.set( 0, - 0.286, 0 );
|
|
63
|
+
box5.scale.set( 1.546, 1.552, 1.496 );
|
|
64
|
+
this.add( box5 );
|
|
65
|
+
|
|
66
|
+
const box6 = new Mesh( geometry, boxMaterial );
|
|
67
|
+
box6.position.set( - 2.193, - 0.369, - 5.547 );
|
|
68
|
+
box6.rotation.set( 0, 0.516, 0 );
|
|
69
|
+
box6.scale.set( 3.875, 3.487, 2.986 );
|
|
70
|
+
this.add( box6 );
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
// -x right
|
|
74
|
+
const light1 = new Mesh( geometry, createAreaLightMaterial( 50 ) );
|
|
75
|
+
light1.position.set( - 16.116, 14.37, 8.208 );
|
|
76
|
+
light1.scale.set( 0.1, 2.428, 2.739 );
|
|
77
|
+
this.add( light1 );
|
|
78
|
+
|
|
79
|
+
// -x left
|
|
80
|
+
const light2 = new Mesh( geometry, createAreaLightMaterial( 50 ) );
|
|
81
|
+
light2.position.set( - 16.109, 18.021, - 8.207 );
|
|
82
|
+
light2.scale.set( 0.1, 2.425, 2.751 );
|
|
83
|
+
this.add( light2 );
|
|
84
|
+
|
|
85
|
+
// +x
|
|
86
|
+
const light3 = new Mesh( geometry, createAreaLightMaterial( 17 ) );
|
|
87
|
+
light3.position.set( 14.904, 12.198, - 1.832 );
|
|
88
|
+
light3.scale.set( 0.15, 4.265, 6.331 );
|
|
89
|
+
this.add( light3 );
|
|
90
|
+
|
|
91
|
+
// +z
|
|
92
|
+
const light4 = new Mesh( geometry, createAreaLightMaterial( 43 ) );
|
|
93
|
+
light4.position.set( - 0.462, 8.89, 14.520 );
|
|
94
|
+
light4.scale.set( 4.38, 5.441, 0.088 );
|
|
95
|
+
this.add( light4 );
|
|
96
|
+
|
|
97
|
+
// -z
|
|
98
|
+
const light5 = new Mesh( geometry, createAreaLightMaterial( 20 ) );
|
|
99
|
+
light5.position.set( 3.235, 11.486, - 12.541 );
|
|
100
|
+
light5.scale.set( 2.5, 2.0, 0.1 );
|
|
101
|
+
this.add( light5 );
|
|
102
|
+
|
|
103
|
+
// +y
|
|
104
|
+
const light6 = new Mesh( geometry, createAreaLightMaterial( 100 ) );
|
|
105
|
+
light6.position.set( 0.0, 20.0, 0.0 );
|
|
106
|
+
light6.scale.set( 1.0, 0.1, 1.0 );
|
|
107
|
+
this.add( light6 );
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
dispose() {
|
|
112
|
+
|
|
113
|
+
const resources = new Set();
|
|
114
|
+
|
|
115
|
+
this.traverse( ( object ) => {
|
|
116
|
+
|
|
117
|
+
if ( object.isMesh ) {
|
|
118
|
+
|
|
119
|
+
resources.add( object.geometry );
|
|
120
|
+
resources.add( object.material );
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
} );
|
|
125
|
+
|
|
126
|
+
for ( const resource of resources ) {
|
|
127
|
+
|
|
128
|
+
resource.dispose();
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function createAreaLightMaterial( intensity ) {
|
|
137
|
+
|
|
138
|
+
const material = new MeshBasicMaterial();
|
|
139
|
+
material.color.setScalar( intensity );
|
|
140
|
+
return material;
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { RoomEnvironment };
|
package/skills/lit-typographic-motion/engine/vendor/three/addons/geometries/RoundedBoxGeometry.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BoxGeometry,
|
|
3
|
+
Vector3
|
|
4
|
+
} from 'three';
|
|
5
|
+
|
|
6
|
+
const _tempNormal = new Vector3();
|
|
7
|
+
|
|
8
|
+
function getUv( faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength ) {
|
|
9
|
+
|
|
10
|
+
const totArcLength = 2 * Math.PI * radius / 4;
|
|
11
|
+
|
|
12
|
+
// length of the planes between the arcs on each axis
|
|
13
|
+
const centerLength = Math.max( sideLength - 2 * radius, 0 );
|
|
14
|
+
const halfArc = Math.PI / 4;
|
|
15
|
+
|
|
16
|
+
// Get the vector projected onto the Y plane
|
|
17
|
+
_tempNormal.copy( normal );
|
|
18
|
+
_tempNormal[ projectionAxis ] = 0;
|
|
19
|
+
_tempNormal.normalize();
|
|
20
|
+
|
|
21
|
+
// total amount of UV space alloted to a single arc
|
|
22
|
+
const arcUvRatio = 0.5 * totArcLength / ( totArcLength + centerLength );
|
|
23
|
+
|
|
24
|
+
// the distance along one arc the point is at
|
|
25
|
+
const arcAngleRatio = 1.0 - ( _tempNormal.angleTo( faceDirVector ) / halfArc );
|
|
26
|
+
|
|
27
|
+
if ( Math.sign( _tempNormal[ uvAxis ] ) === 1 ) {
|
|
28
|
+
|
|
29
|
+
return arcAngleRatio * arcUvRatio;
|
|
30
|
+
|
|
31
|
+
} else {
|
|
32
|
+
|
|
33
|
+
// total amount of UV space alloted to the plane between the arcs
|
|
34
|
+
const lenUv = centerLength / ( totArcLength + centerLength );
|
|
35
|
+
return lenUv + arcUvRatio + arcUvRatio * ( 1.0 - arcAngleRatio );
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
class RoundedBoxGeometry extends BoxGeometry {
|
|
42
|
+
|
|
43
|
+
constructor( width = 1, height = 1, depth = 1, segments = 2, radius = 0.1 ) {
|
|
44
|
+
|
|
45
|
+
// ensure segments is odd so we have a plane connecting the rounded corners
|
|
46
|
+
segments = segments * 2 + 1;
|
|
47
|
+
|
|
48
|
+
// ensure radius isn't bigger than shortest side
|
|
49
|
+
radius = Math.min( width / 2, height / 2, depth / 2, radius );
|
|
50
|
+
|
|
51
|
+
super( 1, 1, 1, segments, segments, segments );
|
|
52
|
+
|
|
53
|
+
// if we just have one segment we're the same as a regular box
|
|
54
|
+
if ( segments === 1 ) return;
|
|
55
|
+
|
|
56
|
+
const geometry2 = this.toNonIndexed();
|
|
57
|
+
|
|
58
|
+
this.index = null;
|
|
59
|
+
this.attributes.position = geometry2.attributes.position;
|
|
60
|
+
this.attributes.normal = geometry2.attributes.normal;
|
|
61
|
+
this.attributes.uv = geometry2.attributes.uv;
|
|
62
|
+
|
|
63
|
+
//
|
|
64
|
+
|
|
65
|
+
const position = new Vector3();
|
|
66
|
+
const normal = new Vector3();
|
|
67
|
+
|
|
68
|
+
const box = new Vector3( width, height, depth ).divideScalar( 2 ).subScalar( radius );
|
|
69
|
+
|
|
70
|
+
const positions = this.attributes.position.array;
|
|
71
|
+
const normals = this.attributes.normal.array;
|
|
72
|
+
const uvs = this.attributes.uv.array;
|
|
73
|
+
|
|
74
|
+
const faceTris = positions.length / 6;
|
|
75
|
+
const faceDirVector = new Vector3();
|
|
76
|
+
const halfSegmentSize = 0.5 / segments;
|
|
77
|
+
|
|
78
|
+
for ( let i = 0, j = 0; i < positions.length; i += 3, j += 2 ) {
|
|
79
|
+
|
|
80
|
+
position.fromArray( positions, i );
|
|
81
|
+
normal.copy( position );
|
|
82
|
+
normal.x -= Math.sign( normal.x ) * halfSegmentSize;
|
|
83
|
+
normal.y -= Math.sign( normal.y ) * halfSegmentSize;
|
|
84
|
+
normal.z -= Math.sign( normal.z ) * halfSegmentSize;
|
|
85
|
+
normal.normalize();
|
|
86
|
+
|
|
87
|
+
positions[ i + 0 ] = box.x * Math.sign( position.x ) + normal.x * radius;
|
|
88
|
+
positions[ i + 1 ] = box.y * Math.sign( position.y ) + normal.y * radius;
|
|
89
|
+
positions[ i + 2 ] = box.z * Math.sign( position.z ) + normal.z * radius;
|
|
90
|
+
|
|
91
|
+
normals[ i + 0 ] = normal.x;
|
|
92
|
+
normals[ i + 1 ] = normal.y;
|
|
93
|
+
normals[ i + 2 ] = normal.z;
|
|
94
|
+
|
|
95
|
+
const side = Math.floor( i / faceTris );
|
|
96
|
+
|
|
97
|
+
switch ( side ) {
|
|
98
|
+
|
|
99
|
+
case 0: // right
|
|
100
|
+
|
|
101
|
+
// generate UVs along Z then Y
|
|
102
|
+
faceDirVector.set( 1, 0, 0 );
|
|
103
|
+
uvs[ j + 0 ] = getUv( faceDirVector, normal, 'z', 'y', radius, depth );
|
|
104
|
+
uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'z', radius, height );
|
|
105
|
+
break;
|
|
106
|
+
|
|
107
|
+
case 1: // left
|
|
108
|
+
|
|
109
|
+
// generate UVs along Z then Y
|
|
110
|
+
faceDirVector.set( - 1, 0, 0 );
|
|
111
|
+
uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'z', 'y', radius, depth );
|
|
112
|
+
uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'z', radius, height );
|
|
113
|
+
break;
|
|
114
|
+
|
|
115
|
+
case 2: // top
|
|
116
|
+
|
|
117
|
+
// generate UVs along X then Z
|
|
118
|
+
faceDirVector.set( 0, 1, 0 );
|
|
119
|
+
uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'x', 'z', radius, width );
|
|
120
|
+
uvs[ j + 1 ] = getUv( faceDirVector, normal, 'z', 'x', radius, depth );
|
|
121
|
+
break;
|
|
122
|
+
|
|
123
|
+
case 3: // bottom
|
|
124
|
+
|
|
125
|
+
// generate UVs along X then Z
|
|
126
|
+
faceDirVector.set( 0, - 1, 0 );
|
|
127
|
+
uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'x', 'z', radius, width );
|
|
128
|
+
uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'z', 'x', radius, depth );
|
|
129
|
+
break;
|
|
130
|
+
|
|
131
|
+
case 4: // front
|
|
132
|
+
|
|
133
|
+
// generate UVs along X then Y
|
|
134
|
+
faceDirVector.set( 0, 0, 1 );
|
|
135
|
+
uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'x', 'y', radius, width );
|
|
136
|
+
uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'x', radius, height );
|
|
137
|
+
break;
|
|
138
|
+
|
|
139
|
+
case 5: // back
|
|
140
|
+
|
|
141
|
+
// generate UVs along X then Y
|
|
142
|
+
faceDirVector.set( 0, 0, - 1 );
|
|
143
|
+
uvs[ j + 0 ] = getUv( faceDirVector, normal, 'x', 'y', radius, width );
|
|
144
|
+
uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'x', radius, height );
|
|
145
|
+
break;
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { RoundedBoxGeometry };
|