Skip to content

Commit

Permalink
Add demo application utilizing partsbin contents
Browse files Browse the repository at this point in the history
  • Loading branch information
linusha committed Aug 2, 2023
1 parent 3d7cf28 commit 3c0ddc7
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: LivelyKernel/lively.next
ref: 34f27b39a9805265b86369a67ee0ffe665dc1f8e
ref: 3596b124e6edc271afc4baf4666b759442e25016
- name: Setup node
uses: actions/setup-node@v2
with:
Expand All @@ -33,4 +33,4 @@ jobs:
# wait until server is guaranteed to be running
sleep 30
- name: Run CI Test Script
run: ./scripts/test.sh LivelyKernel--froscon-2023
run: ./scripts/test.sh LivelyKernel--froscon-2023
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
'format esm';
import { AnOnlineDemo } from './ui/online-demo.cp.js';
import { part } from 'lively.morphic';

export async function main () {
const demo = part(AnOnlineDemo).openInWorld();
demo.center = $world.center;
}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
"rollup-plugin-polyfill-node": "0.9.0"
},
"lively": {
"projectDependencies": [],
"boundLivelyVersion": "34f27b39a9805265b86369a67ee0ffe665dc1f8e"
"projectDependencies": [
{
"name": "LivelyKernel--partsbin",
"version": "0.6.3"
}
],
"boundLivelyVersion": "3596b124e6edc271afc4baf4666b759442e25016"
},
"version": "0.1.2"
}
33 changes: 33 additions & 0 deletions ui/online-demo.cp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { part, component } from 'lively.morphic';
import { pt } from 'lively.graphics/geometry-2d.js';
import { Clock } from 'LivelyKernel--partsbin/ui/clock.cp.js';
import { ThermometerConverter, TemperatureConverter } from 'LivelyKernel--partsbin/ui/temperature-converter.cp.js';
import { Color } from 'lively.graphics/color.js';
'format esm';
const AnOnlineDemo = component({
borderColor: Color.rgb(23, 160, 251),
borderWidth: 1,
extent: pt(614.5, 559),
position: pt(675.5, 261.5),
submorphs: [part(Clock, {
name: 'anEllipse',
position: pt(16, 12),
scale: 0.2903970893354072,
submorphs: [{
name: 'minute hand',
rotation: 6.492624817418905
}, {
name: 'hour hand',
rotation: 4.468042885105484
}]
}), part(ThermometerConverter, {
name: 'thermometer',
position: pt(122.4, 282)
}),
part(TemperatureConverter, {
name: 'orig',
position: pt(122.9, 25.5)
})]
});

export { AnOnlineDemo };

0 comments on commit 3c0ddc7

Please sign in to comment.