~koehr/donatello

b3339125276da39fecb39582edd90ed6a7c254ec — Norman Köhring 1 year, 2 months ago 944fb8d
update docs, README, LICENSE
3 files changed, 60 insertions(+), 17 deletions(-)

A LICENSE
A README.md
M src/demo.ts
A LICENSE => LICENSE +21 -0
@@ 0,0 1,21 @@
The MIT License (MIT)

Copyright (c) 2020 Norman Köhring

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

A README.md => README.md +31 -0
@@ 0,0 1,31 @@
# Donatello

Like Raphaël, but for the modern web!

# EARLY PRE-ALPHA!

This is by far not a usable library yet. Please be patient.

## Usage

```ts
const paper = new Container('test', 800, 600, true)

// this will be easier and/or automated in the future
document.body.append(paper.getNode())

const circle = new Circle(
  paper,
  { r: 30, fill: "#FFF", stroke: "#A00", strokeWidth: 5 },
).animate({ r: 200, cx: 400 }, 2000)
```

**TODO**

## Contributing

Contributions are extremely welcome, but in the current, very early, stage, they should probably be about ideas and concepts, instead of code.

## License

MIT ̣-- see [./LICENSE](LICENSE file)
\ No newline at end of file

M src/demo.ts => src/demo.ts +8 -17
@@ 11,26 11,17 @@ document.querySelector<HTMLDivElement>('body > main')!.innerHTML = `
`

const demo01 = new Container('test', 800, 600, true)
const circle = new Circle(demo01, {
  r: 30,
  fill: "#FFF",
  stroke: "#A00",
  strokeWidth: 5,
})

document.getElementById('demo01').append(demo01.getNode())

circle.animate({
  r: 200,
  cx: 400,
}, 2000)
new Circle(
  demo01,
  { r: 30, fill: "#FFF", stroke: "#A00", strokeWidth: 5 }
).animate({ r: 200, cx: 400 }, 2000)

const demo02 = new Container('test', 800, 600)
new Circle(demo02, {
  r: 30,
  fill: "#FFF",
  stroke: "#0F0",
  "stroke-width": 2,
})
new Circle(
  demo02,
  { r: 30, fill: "#FFF", stroke: "#0F0", "stroke-width": 2 }
)

document.getElementById('demo02').append(demo02.getNode())