Files
cocos4/cocos/3d/primitive/quad.js
T
Leslie Leigh f05972489c Skeleton asset and SkeletonInstance class (#3251)
* Modify part of asset classes

* Update import

* Update

* mesh-loader

* Update the import statement of JsonAsset as default import

* Rename files

* Remove old asset and asset-mng

* Copyrights

* Fix some bugs

* Fix imports of vmath classes; Fix errors of decorator property's ts comment notation;Adjust the order of member declarations for better IDE intelligense

* Transplant loader of animation clip; Unify export statement style according rules

* Skeleton asset and SkeletonInstance class

* Rename

* Fix material annotation

* fix import path

* fix annotation error

* Rename update to flush, fix index.js files.
2018-09-17 17:56:21 +08:00

47 lines
643 B
JavaScript

'use strict';
import { vec3 } from '../../core/vmath';
let positions = [
-0.5, -0.5, 0, // bottom-left
-0.5, 0.5, 0, // top-left
0.5, 0.5, 0, // top-right
0.5, -0.5, 0, // bottom-right
];
let normals = [
0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1,
];
let uvs = [
0, 0,
0, 1,
1, 1,
1, 0,
];
let indices = [
0, 3, 1,
3, 2, 1
];
// TODO: ?
let minPos = vec3.create(-0.5, -0.5, 0);
let maxPos = vec3.create(0.5, 0.5, 0);
let boundingRadius = Math.sqrt(0.5 * 0.5 + 0.5 * 0.5);
export default function () {
return {
positions,
indices,
normals,
uvs,
minPos,
maxPos,
boundingRadius
};
}