Platform
Solutions
Resources
Pricing
Sign in
Sign up
Processing Brasil
Comunidade brasileira de Processing e programação criativa
Workspace
Fork
Published
Introduções
By
Processing Brasil
Edited
Mar 7, 2021
Fork of
Ambiente P5 no Observable
5 stars
Introduções
O que se faz no Observable, não fica só no Observable
Desenhando com p5, canvas e SVG
As formas mais fáceis de se utilizar Processing no Observable
Diferenças na sintaxe que você está acostumado a usar em Javascript para programar no Observable
Ambiente P5 no Observable
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
p5
(
sketch
=>
{
sketch
.
setup
=
function
(
)
{
sketch
.
createCanvas
(
width
,
200
)
;
}
;
sketch
.
draw
=
function
(
)
{
sketch
.
stroke
(
'#2299FF'
)
;
sketch
.
rect
(
30
,
30
,
100
,
100
)
;
}
;
}
)
Insert cell
Insert cell
Insert cell
Insert cell
p5
(
sketchB
=>
{
sketchB
.
setup
=
function
(
)
{
sketchB
.
createCanvas
(
width
,
200
)
;
}
;
sketchB
.
draw
=
function
(
)
{
sketchB
.
stroke
(
'#2299FF'
)
;
sketchB
.
rect
(
width
-
120
,
30
,
100
,
100
)
;
}
;
}
)
Insert cell
Insert cell
Insert cell
Insert cell
function
centra
(
wdt
,
canvwdt
)
{
return
(
canvwdt
/
2
)
-
(
wdt
/
2
)
;
}
Insert cell
p5
(
sketchC
=>
{
sketchC
.
setup
=
function
(
)
{
sketchC
.
createCanvas
(
width
,
200
)
;
}
;
sketchC
.
draw
=
function
(
)
{
sketchC
.
stroke
(
'#2299FF'
)
;
sketchC
.
rect
(
centra
(
30
,
width
)
,
30
,
100
,
100
)
;
}
;
}
)
Insert cell
Insert cell
dadodeentrada
=
html
`<input type=range />`
Insert cell
p5
(
sketchD
=>
{
sketchD
.
setup
=
function
(
)
{
sketchD
.
createCanvas
(
width
,
200
)
;
}
;
sketchD
.
draw
=
function
(
)
{
sketchD
.
background
(
255
)
;
sketchD
.
stroke
(
'#2299FF'
)
;
sketchD
.
rect
(
(
width
*
dadodeentrada
.
value
)
/
120
+
30
,
30
,
100
,
100
)
;
}
;
}
)
Insert cell
Insert cell
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
centra
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dadodeentrada
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML