Code merge of pointer example and physjs