mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
f05972489c
* 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.
47 lines
643 B
JavaScript
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
|
|
};
|
|
}
|