SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Peint
High-Performance,
 Evented Canvas
Who am I?
 I’m a developer for Blackcomb Games.
I build web & mobile games with HTML5.
Peint is...


• A Javascript graphics engine
• Supports HTML5 Canvas
• Component-based
• Good for any game (isometric, etc)
Philosophy

• Positioning and rendering should be
  handled separately
• High-frequency code should be as
  lightweight as possible
• Rendering should only happen when
  there are changes to render
Features


• Event-based rendering
• Object-based positioning
• Animation management
• Modular design will do CSS3 & WebGL
Event-based rendering
// Ugly nesting needed to ensure image
// is loaded before trying to draw it.
var img = new Image
img.onload = function () {
 function render () {
   requestAnimationFrame(render)

  // This image draws every frame,
  // even though it’s state hasn’t changed.
  context.drawImage(img, 0, 0)
 }
 render()
}
img.src = '/img.png'
Let’s clean that up
// Start canvas
var Game = Peint.all()
var canvas = new Game.Canvas('#viewport')
canvas.start()

// Load image and add to canvas
var img = new Game.Image({ url: '/img.png' })
canvas.add(img)

// Reposition later, redraw automatically
setTimeout(function () {
 img.set({ left: 200, top: 200 })
}, 5000)
Abstract rendering


• Support multiple render methods
• Add objects before loaded
• Change layer sorting
• Automate redraw
Animations
// Create animation
var animation = new Peint.Animation({
 url: '/img.png'
 , top: 330
 , left: 100
 , animation: {
   // Each column is a frame, and each
   // is a separate animation
   rows: 8, cols: 9
   // time between frames is adjustable
   // even while animating
   , duration: 40
 }
})
// play is called at image:loaded, let’s pause
animation.on('image:loaded', function () {
 this.pause()

 // Let’s unpause it later
 setTimeout(function () {
   animation.play()
 }, 1000)
})
Modularity
// Load selectively
var Canvas = Peint.require('canvas')
var Image = Peint.require('image')

// Start canvas
var canvas = new Canvas('#viewport')
canvas.start()

// Load and add image
var image = new Image({ url: '/img.png' })
canvas.add(image)
Advantages


• Easier to support multiple back-ends
• Execution order becomes irrelevant
• Only executes what it needs to
Alternatives

• Easel - monolithic, pollutes global
• Fabric - intended for drawing apps
• Paper - vector transform scripting
• Raphael - SVG, graphs and vector
• Processing - vector visualization
Limitations

• Primitives other than rectangle not
  yet implemented, low priority
• Currently canvas-only, needs at least
  CSS3 to better support mobile
• Alpha-stage, likely to change a lot and
  needs some better optimization
Planned


• Scaling & rotations (Partially done)
• Primitives, lines, etc
• CSS3 & WebGL renderers
• Better examples & tutorials
github.com/qard/peint

Mais conteúdo relacionado

Mais procurados

Pokelabo flash 2013/4
Pokelabo flash 2013/4Pokelabo flash 2013/4
Pokelabo flash 2013/4Shota Suzuki
 
飛び道具ではないMetal #iOSDC
飛び道具ではないMetal #iOSDC飛び道具ではないMetal #iOSDC
飛び道具ではないMetal #iOSDCShuichi Tsutsumi
 
Image manipulationworkshop amit
Image manipulationworkshop amitImage manipulationworkshop amit
Image manipulationworkshop amitAmit Singhai
 
BGF 2012 (Browsergames Forum)
BGF 2012 (Browsergames Forum)BGF 2012 (Browsergames Forum)
BGF 2012 (Browsergames Forum)Christof Wegmann
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esCreating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esdavrous
 
Photon Session / Unite12 Conference
Photon Session / Unite12 ConferencePhoton Session / Unite12 Conference
Photon Session / Unite12 ConferenceChristof Wegmann
 
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能Unity Technologies Japan K.K.
 
Beginners Guide to Modeling with Maya
Beginners Guide to Modeling with MayaBeginners Guide to Modeling with Maya
Beginners Guide to Modeling with MayaPaddy Lock
 
Sergey Gonchar - Fast rendering with Starling
Sergey Gonchar - Fast rendering with StarlingSergey Gonchar - Fast rendering with Starling
Sergey Gonchar - Fast rendering with StarlingFlash Conference
 
NGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.jsNGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.jsdavrous
 
OGDC2013_ Spine Animation_ Mr Alviss Ha
OGDC2013_ Spine Animation_ Mr Alviss HaOGDC2013_ Spine Animation_ Mr Alviss Ha
OGDC2013_ Spine Animation_ Mr Alviss Haogdc
 

Mais procurados (12)

Pokelabo flash 2013/4
Pokelabo flash 2013/4Pokelabo flash 2013/4
Pokelabo flash 2013/4
 
飛び道具ではないMetal #iOSDC
飛び道具ではないMetal #iOSDC飛び道具ではないMetal #iOSDC
飛び道具ではないMetal #iOSDC
 
Image manipulationworkshop amit
Image manipulationworkshop amitImage manipulationworkshop amit
Image manipulationworkshop amit
 
Photon Load Test #1
Photon Load Test #1Photon Load Test #1
Photon Load Test #1
 
BGF 2012 (Browsergames Forum)
BGF 2012 (Browsergames Forum)BGF 2012 (Browsergames Forum)
BGF 2012 (Browsergames Forum)
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esCreating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
 
Photon Session / Unite12 Conference
Photon Session / Unite12 ConferencePhoton Session / Unite12 Conference
Photon Session / Unite12 Conference
 
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
 
Beginners Guide to Modeling with Maya
Beginners Guide to Modeling with MayaBeginners Guide to Modeling with Maya
Beginners Guide to Modeling with Maya
 
Sergey Gonchar - Fast rendering with Starling
Sergey Gonchar - Fast rendering with StarlingSergey Gonchar - Fast rendering with Starling
Sergey Gonchar - Fast rendering with Starling
 
NGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.jsNGF2014 - Create a 3d game with webgl and babylon.js
NGF2014 - Create a 3d game with webgl and babylon.js
 
OGDC2013_ Spine Animation_ Mr Alviss Ha
OGDC2013_ Spine Animation_ Mr Alviss HaOGDC2013_ Spine Animation_ Mr Alviss Ha
OGDC2013_ Spine Animation_ Mr Alviss Ha
 

Destaque

The library website
The library websiteThe library website
The library websiteBHCLRC
 
LRC News
LRC NewsLRC News
LRC NewsBHCLRC
 
Never travel without a (career) map talent zoo
Never travel without a (career) map   talent zooNever travel without a (career) map   talent zoo
Never travel without a (career) map talent zoovijayaprasad
 
Grouped time-series forecasting: Application to regional infant mortality counts
Grouped time-series forecasting: Application to regional infant mortality countsGrouped time-series forecasting: Application to regional infant mortality counts
Grouped time-series forecasting: Application to regional infant mortality countshanshang
 
Michael Wall - Writing Portfolio
Michael Wall - Writing PortfolioMichael Wall - Writing Portfolio
Michael Wall - Writing PortfolioWall8188
 
Virtual Tour of the Library
Virtual Tour of the LibraryVirtual Tour of the Library
Virtual Tour of the LibraryAmy Chadwell
 
Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...
Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...
Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...hanshang
 
Research posters 2015 Update
Research posters 2015 UpdateResearch posters 2015 Update
Research posters 2015 UpdateAmy Chadwell
 
Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...
Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...
Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...aldila Hairunnisya
 
Visualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time SeriesVisualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time Serieshanshang
 
Using a Library Database - Academic Search Complete
Using a Library Database - Academic Search CompleteUsing a Library Database - Academic Search Complete
Using a Library Database - Academic Search CompleteAmy Chadwell
 
Windows Movie Maker
Windows Movie MakerWindows Movie Maker
Windows Movie MakerAmy Chadwell
 
ใบงานสำรวจตนเอง M6
 ใบงานสำรวจตนเอง M6 ใบงานสำรวจตนเอง M6
ใบงานสำรวจตนเอง M6NuTty Quiz
 
Tes Slide Share
Tes Slide ShareTes Slide Share
Tes Slide Shareputra177
 
ใบงานสำรวจตนเอง M6
 ใบงานสำรวจตนเอง M6 ใบงานสำรวจตนเอง M6
ใบงานสำรวจตนเอง M6NuTty Quiz
 

Destaque (17)

The library website
The library websiteThe library website
The library website
 
LRC News
LRC NewsLRC News
LRC News
 
Never travel without a (career) map talent zoo
Never travel without a (career) map   talent zooNever travel without a (career) map   talent zoo
Never travel without a (career) map talent zoo
 
Grouped time-series forecasting: Application to regional infant mortality counts
Grouped time-series forecasting: Application to regional infant mortality countsGrouped time-series forecasting: Application to regional infant mortality counts
Grouped time-series forecasting: Application to regional infant mortality counts
 
Michael Wall - Writing Portfolio
Michael Wall - Writing PortfolioMichael Wall - Writing Portfolio
Michael Wall - Writing Portfolio
 
Virtual Tour of the Library
Virtual Tour of the LibraryVirtual Tour of the Library
Virtual Tour of the Library
 
Ch7 brand
Ch7 brandCh7 brand
Ch7 brand
 
Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...
Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...
Modeling and forecasting age-specific mortality: Lee-Carter method vs. Functi...
 
Research posters 2015 Update
Research posters 2015 UpdateResearch posters 2015 Update
Research posters 2015 Update
 
Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...
Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...
Anti acne-and-tyrosinase-inhibition-properties-of-taxifolin-and-some-flavanon...
 
IMovie2015
IMovie2015IMovie2015
IMovie2015
 
Visualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time SeriesVisualizing, Modeling and Forecasting of Functional Time Series
Visualizing, Modeling and Forecasting of Functional Time Series
 
Using a Library Database - Academic Search Complete
Using a Library Database - Academic Search CompleteUsing a Library Database - Academic Search Complete
Using a Library Database - Academic Search Complete
 
Windows Movie Maker
Windows Movie MakerWindows Movie Maker
Windows Movie Maker
 
ใบงานสำรวจตนเอง M6
 ใบงานสำรวจตนเอง M6 ใบงานสำรวจตนเอง M6
ใบงานสำรวจตนเอง M6
 
Tes Slide Share
Tes Slide ShareTes Slide Share
Tes Slide Share
 
ใบงานสำรวจตนเอง M6
 ใบงานสำรวจตนเอง M6 ใบงานสำรวจตนเอง M6
ใบงานสำรวจตนเอง M6
 

Semelhante a Peint talk

Core Animation
Core AnimationCore Animation
Core AnimationBob McCune
 
XNA L07–Skybox and Terrain
XNA L07–Skybox and TerrainXNA L07–Skybox and Terrain
XNA L07–Skybox and TerrainMohammad Shaker
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobaoyarshure Kong
 
Lets go vanilla
Lets go vanillaLets go vanilla
Lets go vanillaRan Wahle
 
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...Plain Concepts
 
Java ME - 05 - Game API
Java ME - 05 - Game APIJava ME - 05 - Game API
Java ME - 05 - Game APIAndreas Jakl
 
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...AMD Developer Central
 
Building animated UI with Core Animation
Building animated UI with Core AnimationBuilding animated UI with Core Animation
Building animated UI with Core AnimationMarco Zoffoli
 
Rotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billyRotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billynimbleltd
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdffeelinggifts
 
Demystifying Angular Animations
Demystifying Angular AnimationsDemystifying Angular Animations
Demystifying Angular AnimationsGil Fink
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platformJussi Pohjolainen
 
5 tips for your HTML5 games
5 tips for your HTML5 games5 tips for your HTML5 games
5 tips for your HTML5 gamesErnesto Jiménez
 

Semelhante a Peint talk (20)

Intro to HTML5
Intro to HTML5Intro to HTML5
Intro to HTML5
 
Core Animation
Core AnimationCore Animation
Core Animation
 
XNA L07–Skybox and Terrain
XNA L07–Skybox and TerrainXNA L07–Skybox and Terrain
XNA L07–Skybox and Terrain
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
 
COMP340 TOPIC 4 THREE.JS.pptx
COMP340 TOPIC 4 THREE.JS.pptxCOMP340 TOPIC 4 THREE.JS.pptx
COMP340 TOPIC 4 THREE.JS.pptx
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobao
 
iOS Core Animation
iOS Core AnimationiOS Core Animation
iOS Core Animation
 
Lets go vanilla
Lets go vanillaLets go vanilla
Lets go vanilla
 
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
DotNet 2019 | Marcos Cobeña - Llevando Wave Engine a la web a través de WebGL...
 
Core animation
Core animationCore animation
Core animation
 
Java ME - 05 - Game API
Java ME - 05 - Game APIJava ME - 05 - Game API
Java ME - 05 - Game API
 
HTML 5_Canvas
HTML 5_CanvasHTML 5_Canvas
HTML 5_Canvas
 
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by  Mikael ...
WT-4069, WebCL: Enabling OpenCL Acceleration of Web Applications, by Mikael ...
 
Building animated UI with Core Animation
Building animated UI with Core AnimationBuilding animated UI with Core Animation
Building animated UI with Core Animation
 
Rotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billyRotoscope inthebrowserppt billy
Rotoscope inthebrowserppt billy
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdf
 
Demystifying Angular Animations
Demystifying Angular AnimationsDemystifying Angular Animations
Demystifying Angular Animations
 
AWS EC2
AWS EC2AWS EC2
AWS EC2
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
5 tips for your HTML5 games
5 tips for your HTML5 games5 tips for your HTML5 games
5 tips for your HTML5 games
 

Último

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Último (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Peint talk

  • 2. Who am I? I’m a developer for Blackcomb Games. I build web & mobile games with HTML5.
  • 3. Peint is... • A Javascript graphics engine • Supports HTML5 Canvas • Component-based • Good for any game (isometric, etc)
  • 4. Philosophy • Positioning and rendering should be handled separately • High-frequency code should be as lightweight as possible • Rendering should only happen when there are changes to render
  • 5. Features • Event-based rendering • Object-based positioning • Animation management • Modular design will do CSS3 & WebGL
  • 7. // Ugly nesting needed to ensure image // is loaded before trying to draw it. var img = new Image img.onload = function () { function render () { requestAnimationFrame(render) // This image draws every frame, // even though it’s state hasn’t changed. context.drawImage(img, 0, 0) } render() } img.src = '/img.png'
  • 9. // Start canvas var Game = Peint.all() var canvas = new Game.Canvas('#viewport') canvas.start() // Load image and add to canvas var img = new Game.Image({ url: '/img.png' }) canvas.add(img) // Reposition later, redraw automatically setTimeout(function () { img.set({ left: 200, top: 200 }) }, 5000)
  • 10. Abstract rendering • Support multiple render methods • Add objects before loaded • Change layer sorting • Automate redraw
  • 12. // Create animation var animation = new Peint.Animation({ url: '/img.png' , top: 330 , left: 100 , animation: { // Each column is a frame, and each // is a separate animation rows: 8, cols: 9 // time between frames is adjustable // even while animating , duration: 40 } })
  • 13. // play is called at image:loaded, let’s pause animation.on('image:loaded', function () { this.pause() // Let’s unpause it later setTimeout(function () { animation.play() }, 1000) })
  • 15. // Load selectively var Canvas = Peint.require('canvas') var Image = Peint.require('image') // Start canvas var canvas = new Canvas('#viewport') canvas.start() // Load and add image var image = new Image({ url: '/img.png' }) canvas.add(image)
  • 16. Advantages • Easier to support multiple back-ends • Execution order becomes irrelevant • Only executes what it needs to
  • 17. Alternatives • Easel - monolithic, pollutes global • Fabric - intended for drawing apps • Paper - vector transform scripting • Raphael - SVG, graphs and vector • Processing - vector visualization
  • 18. Limitations • Primitives other than rectangle not yet implemented, low priority • Currently canvas-only, needs at least CSS3 to better support mobile • Alpha-stage, likely to change a lot and needs some better optimization
  • 19. Planned • Scaling & rotations (Partially done) • Primitives, lines, etc • CSS3 & WebGL renderers • Better examples & tutorials