HELP


Realizzare un'applicazione

Informazioni preliminari
Risorse necessarie
  1. crea una cartella dove salvare i i file di librerie e le tue applicazioni
  2. vai alla sezione download del sito ufficiale
  3. scarica il file più aggiornato della libreria e rinominalo come processing.js
  4. scarica il file init.js

Per ogni applicazione
  1. crea il file applicazione.html (nella cartella dove hai salvato i due file precedenti...)
    <script src="processing.js"></script>
    <script src="init.js"></script>
    <script type="application/processing">
        ...
        ...
    </script>
    <canvas width="www" height="hhh"></canvas>
  2. sviluppa l'applicazione funzionante utilizzando l'IDE di ProcessingOrg
    1. incolla il suo codice al posto dei ... ...
    2. sostituisci www e hhh con le dimensioni che hai fissato nella funzione size()
  3. esegui applicazione.html con Chrome, Firefox, Opera o Safari

Differenze importanti con Processing

Per chi conosce Processing ci sono alcuni aspetti da non trascurare
  1. La divisione / in Javascript è sempre con la virgola...
    Se il risultato deve essere intero allora arrotondalo con Math.round() oppure troncalo con (int) o parseInt()
  2. Le risorse non sono di default nella cartella data
  3. Le risorse non sono nel file .jar, ma caricate con protocollo http
    Firefox ha problemi nell'utilizzo immediato delle immagini:
  4. image(immagine)
    immagine.width
    immagine.height
    ...
  5. Evita le funzioni get(), set(), point(), ... perché lente.
    Usa pixels[]
  6. I font funzionano solo con Firefox >=3
  7. Le funzionalità seguenti non sono ancora implementate
Sistemadelay() / import / popStyle() / private / pushStyle() / cursor() / focused / noCursor() / online / screen
Tipi di datilong / HashMap / XMLElement / binary() / boolean() / hex() / unbinary() / unhex() / join() / match() / matchAll() / nfc() / nfp() / nfs() / split() / splitTokens() / trim() / append() / arrayCopy() / concat() / expand() / reverse() / shorten() / sort() / splice() / subset()
Primitive grafichePShape / quad() / bezierDetail() / bezierPoint() / bezierTangent() / curveDetail() / curvePoint() / curveTangent() / box() / sphere() / sphereDetail() / noSmooth() / strokeCap() / strokeJoin() / texture() / textureMode() / loadShape() / shape() / shapeMode()
Input/outputcreateInput() / loadBytes() / open() / selectFolder() / selectInput() / param() / status()
3DapplyMatrix() / printMatrix() / resetMatrix() / rotateX() / rotateY() / rotateZ()
Luci e camereambientLight() / directionalLight() / lightFalloff() / lightSpecular() / lights() / noLights() / normal() / pointLight() / spotLight() / beginCamera() / camera() / endCamera() / frustum() / ortho() / perspective() / printCamera() / printProjection() / modelX() / modelY() / modelZ() / screenX() / screenY() / screenZ() / ambient() / emissive() / shininess() / specular() / blendColor() / brightness() / hue() / saturation()
ImmaginiPImage / imageMode() / noTint() / requestImage() / blend() / copy() / filter() / PGraphics / hint()
TestocreateFont() / textAlign() / textLeading() / textMode() / textSize() / textWidth() / textAscent() / textDescent()
MatematicaPVector / exp() / log() / mag() / map() / acos() / asin() / atan() / tan() / noiseDetail() / noiseSeed() / randomSeed()

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki