view nodejs/examples/simple/testimage.js @ 1293:10bffaffef82

Fix the supporting of removing key tween partially. - For key tween that only middle or right part of the ween being covered by removing range, we shrink the size of the tween and keep the key. - After shrink the size, start removing frames at the frame next to new end frame of the scene after shrinking.
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 15 Jan 2011 22:41:58 +0800
parents a74b4d986a91
children
line wrap: on
line source

// -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
// vim: sw=4:ts=8:sts=4
var svg = require("svg");
var mbapp = require("mbapp");
var sys=require("sys");
var animate=require("animate");
var fs = require("fs");

app = new mbapp.app();

coord = app.mb_rt.coord_new(app.mb_rt.root);
data=mbapp.ldr.load("sample.png");
paint = app.mb_rt.paint_image_new(data);
img = app.mb_rt.image_new(10,10,50,50);
paint.fill(img);
coord.opacity = 0.9;
coord.add_shape(img);

app.loop();