Skip to content

Commit

Permalink
📝 Provide more delicate examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Flandia Yingman committed Aug 13, 2023
1 parent 513af9f commit 4fcb254
Showing 1 changed file with 47 additions and 6 deletions.
53 changes: 47 additions & 6 deletions examples/introduction/text.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
let movie
window.addEventListener('load', () => {
const canvas = document.createElement('canvas')
canvas.width = 600
canvas.height = 400
canvas.width = 1280
canvas.height = 720
document.body.appendChild(canvas)

initMovie(canvas)
Expand All @@ -19,12 +19,53 @@
const initMovie = canvas => {
movie = new etro.Movie({ canvas })
movie.addLayer(new etro.layer.Text({
textY: 140 * 0,
startTime: 0,
duration: 4,
text: 'Hello world',
font: '24px monospace',
color: 'blue'
})).play()
text: 'Simple Text',
font: '140px sans-serif',
color: 'white'
}))
movie.addLayer(new etro.layer.Text({
textY: 140 * 1,
startTime: 0,
duration: 4,
text: 'Outer Stroke Text',
font: '140px sans-serif',
color: 'white',
textStroke: {
color: 'green',
thickness: 5,
position: 'outside'
}
}))
movie.addLayer(new etro.layer.Text({
textY: 140 * 2,
startTime: 0,
duration: 4,
text: 'Center Stroke Text',
font: '140px sans-serif',
color: 'white',
textStroke: {
color: 'green',
thickness: 5,
position: 'center'
}
}))
movie.addLayer(new etro.layer.Text({
textY: 140 * 3,
startTime: 0,
duration: 4,
text: 'Inner Stroke Text',
font: '140px sans-serif',
color: 'white',
textStroke: {
color: 'green',
thickness: 5,
position: 'inside'
}
}))
movie.play()
}
</script>
</body>
Expand Down

0 comments on commit 4fcb254

Please sign in to comment.