Skip to content

Commit

Permalink
Improved testarea and demo content
Browse files Browse the repository at this point in the history
  • Loading branch information
foorschtbar committed Oct 13, 2023
1 parent 92f8002 commit 0d1d36e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 21 deletions.
35 changes: 30 additions & 5 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,46 @@ export default new Vuex.Store({
json: JSON.stringify(
{
text: {
textString: 'Pixel it 😀',
textString: 'Hello world! 😀',
scrollText: 'auto',
bigFont: false,
centerText: false,
scrollTextDelay: 40,
hexColor: '#FFFFFF',
position: {
x: 0,
x: 9,
y: 1,
},
},
bitmapAnimation: {
data: [
[43008, 0, 0, 0, 0, 0, 0, 0, 64170, 0, 0, 0, 0, 0, 0, 0, 64853, 0, 0, 0, 0, 64853, 0, 0, 65535, 65535, 0, 0, 0, 65535, 0, 0, 65535, 65535, 0, 65535, 0, 65535, 0, 65535, 65535, 65535, 0, 65535, 65535, 65535, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64853, 0, 0, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 0, 0, 0, 65535, 65535, 65535, 0, 0, 65535, 0, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 65535, 65535, 65535, 0, 65535, 65535, 65535, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65535, 0, 0, 65535, 0, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 65535, 65535, 0, 0, 0, 65535, 65535, 0, 65535, 65535, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64853, 0, 0, 0, 0, 0, 65535, 0, 65535, 0, 0, 0, 0, 65535, 65535, 0, 65535, 65535, 0, 65535, 0, 65535, 65535, 65535, 65535, 65535, 0, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535],
],
position: {
x: 0,
y: 0,
},
animationDelay: 200,
rubberbanding: false,
limitLoops: 0,
},
},
function (k, v) {
if (v instanceof Array) return JSON.stringify(v);
return v;
},
null,
4
),
2
)
.replace(/\\/g, '')
.replace(/"\[/g, '[')
.replace(/\]"/g, ']')
.replace(/"\{/g, '{')
.replace(/\}"/g, '}'),
text: '€ ← ↑ → ↓ ★ 📁 📄 ♥ ↧ 🚗 😀',
image: '[33808,0,0,0,0,0,0,33808,43680,33808,0,0,0,0,33808,43680,43680,33808,44373,44373,44373,44373,33808,43680,33808,65535,65535,44373,44373,65535,65535,33808,33808,65535,0,44373,44373,65535,0,33808,33808,65535,0,33808,33808,65535,0,33808,0,33808,33808,43680,43680,33808,33808,0,0,0,33808,33808,33808,33808,0,0],[33808,0,0,0,0,0,0,33808,43680,33808,0,0,0,0,33808,43680,43680,33808,44373,44373,44373,44373,33808,43680,33808,65535,65535,44373,44373,65535,65535,33808,33808,0,65535,44373,44373,0,65535,33808,33808,0,65535,33808,33808,0,65535,33808,0,33808,33808,43680,43680,33808,33808,0,0,0,33808,33808,33808,33808,0,0],[33808,0,0,0,0,0,0,33808,43680,33808,0,0,0,0,33808,43680,43680,33808,44373,44373,44373,44373,33808,43680,33808,65535,65535,44373,44373,65535,65535,33808,33808,65535,0,44373,44373,65535,0,33808,33808,65535,0,33808,33808,65535,0,33808,0,33808,33808,43680,43680,33808,33808,0,0,0,33808,33808,33808,33808,0,0],[33808,0,0,0,0,0,0,33808,43680,33808,0,0,0,0,33808,43680,43680,33808,44373,44373,44373,44373,33808,43680,33808,44373,44373,44373,44373,44373,44373,33808,33808,44373,44373,44373,44373,44373,44373,33808,33808,0,0,33808,33808,0,0,33808,0,33808,33808,43680,43680,33808,33808,0,0,0,33808,33808,33808,33808,0,0]',
},
Expand Down
31 changes: 15 additions & 16 deletions src/views/TestArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@
<Liveview class="text-center" :data="liveview" :options="liveviewCanvasSettings" />
</v-card>
<br />
<v-card class="pa-2" elevation="4">
<v-card-title>
<h2>JSON String</h2>
</v-card-title>
<hr />
<br />
<prism-editor class="editor" v-model="testarea.json" :highlight="highlighter" line-numbers></prism-editor>
<br />
<div class="text-center">
<ButtonCondition color="info" :condition="sockedIsConnected" text="Send JSON" icon="mdi-cloud-upload" :onclick="sendJson" />
</div>
</v-card>
</v-col>
<v-col cols="12" lg="4">
<v-card class="pa-2" elevation="4">
<v-card-title>
<h2>Text / Brightness</h2>
Expand All @@ -39,8 +25,7 @@
<ButtonCondition color="info" :condition="sockedIsConnected" text="Send Text" icon="mdi-cloud-upload" :onclick="sendText" />
</div>
</v-card>
</v-col>
<v-col cols="12" lg="4">
<br />
<v-card class="pa-2" elevation="4">
<v-card-title>
<h2>Bitmap Array</h2>
Expand All @@ -54,6 +39,20 @@
</div>
</v-card>
</v-col>
<v-col cols="24" lg="8">
<v-card class="pa-2" elevation="4">
<v-card-title>
<h2>JSON String</h2>
</v-card-title>
<hr />
<br />
<prism-editor class="editor" v-model="testarea.json" :highlight="highlighter" line-numbers></prism-editor>
<br />
<div class="text-center">
<ButtonCondition color="info" :condition="sockedIsConnected" text="Send JSON" icon="mdi-cloud-upload" :onclick="sendJson" />
</div>
</v-card>
</v-col>
</v-row>
</v-container>
</template>
Expand Down

0 comments on commit 0d1d36e

Please sign in to comment.